tag:blogger.com,1999:blog-232073882024-03-14T16:51:40.215+08:00Is Sky The Limit : The TechnicalThis page is full of technical and programming entries. Read at your own risk, time, and dimension. There is no jokes, humours, love issues or coffee breaks here. All are related to SAP R/3 ABAP. (Most likely there will be some .NET related issues - if there is). Readers are welcome to contribute thoughts, ideas, comments, and suggestions to each and every of my entry.william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.comBlogger71125tag:blogger.com,1999:blog-23207388.post-23983402728778128182009-09-12T10:36:00.003+08:002009-09-12T10:51:03.239+08:00Moved To New Technical Blog<div align="justify"><span style="font-family:arial;">Dear all,<br /><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">We grew old each day, and it has been in my mind to upgrade this blog too. Today, I upgraded my blog and now it has moved to a new blog as follows :<br /><br /><br /></span><span style="font-family:arial;"><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="center"><span style="font-family:arial;"><a href="http://www.williamwilstroth-devs.blogspot.com/">WILLIAM WILSTROTH - DEVELOPMENT</a><br /><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;"><br /><br /></span></div><div align="justify"><span style="font-family:arial;">As there are still some unpublished entries, which I was still in the midst of writing, it will be published in the new blog. Time has moved one, this blog will move on too so it reflects my motivation to keep contributing to this technical blog of mine.<br /><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Thank you for all your support to this day. I hope you will enjoy more of my technical blog at the new site. Please provide your feedback and advice, if you have one...<br /><br /><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Yours truly,<br /><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;"><strong><a href="http://www.blogger.com/www.williamwilstroth.blogspot.com">William Wilstroth</a></strong></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-68574928434525073262009-08-13T15:11:00.005+08:002009-08-13T15:18:16.002+08:00SAP ECC6.0 : Associative attachment error...<div align="justify"><span style="font-family:arial;"><strong>Associative file error</strong>, is a common problem if your programming to attach a file without an extension in your send email attachment. This function module is 'SO_NEW_DOCUMENT_ATT_SEND_API1'. <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><a href="http://3.bp.blogspot.com/_QmHghJr_hU0/SoO9A7eG1-I/AAAAAAAAAIQ/gZLEOAGBLsQ/s1600-h/Asso+Err.JPG"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5369343004417382370" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 76px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_QmHghJr_hU0/SoO9A7eG1-I/AAAAAAAAAIQ/gZLEOAGBLsQ/s320/Asso+Err.JPG" border="0" /></span></a> <span style="font-family:arial;"></span><br /><span style="font-family:arial;">There are 2 steps you can check whether if your file association (extension is supported):</span></div><div align="justify"><span style="font-family:arial;font-size:85%;">1. Go to Control Panel, Default Program, Set Associative. Check if your file is supported. </span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">2. If your file is supported in Set Associative, the go to your coding, particularly at parameter OBJECT_HEADER. Make sure your file has an extension otherwise the above error popup will appear.</span> <br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>Is sky the limit...</strong> associative error</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-28049878345904711472009-08-07T20:43:00.011+08:002009-09-20T12:47:41.630+08:00SAP ECC6.0 : SO-DO (No Pricing Display)<div align="justify"><span style="font-family:arial;"><strong>Recently I had an issue that cracked my brain left and rigth</strong>. An Sales Order(SO) created that will initiate a DO in the background (Rush Order). In the event of doing so, this DO will automatically print a Pre-Invoice form. Unfortunately, the price was not display and as a result, the total price became zero. So I had to figure out the root cause. First few days of troubleshooting the SO to DO was painstaking. I loose patient as I am not sure which part was causing it. Several question popped here and there.</span><br /><span style="font-family:arial;"></span><br /><strong><em><span style="font-size:85%;"><span style="color:#000066;"><span style="font-family:arial;"><blockquote><strong><em><span style="font-size:85%;"><span style="color:#000066;"><span style="font-family:arial;">1. Is it the print program that causes it?</span><br /><span style="font-family:arial;">2. Is it the upgrade that cause the print program to loose it mind?</span><br /><span style="font-family:arial;">3. Is there any difference between ECC6 standard print program and the customized one?</span><br /><span style="font-family:arial;">4. Did we forget to transport certain versions of the print program?</span></span></span></em></strong></blockquote></span></span></span></em></strong><span style="font-family:arial;">So I had to take out my gloves and grind and till the land until my glove gone and my hand bruised! One big hassle if the price suddenly gone somewhere after an upgrade. It was working fine in 4.6c. After the upgrade the price was missing. So where had it gone to?</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Tracing it wasn't easy though as it being produced by DO in the background. I couldn't make the system to stop at the break-point even though I'd put more than 10 in it. TCODE JDBG was helpless. SM58 was not stopping at correct points because SO was travelling at unknown location towards DO. So it was brain crushing! The hell was it I still need to prove that the print program was fine!</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">As tracing was helpless, I took another option to put in some trace log in the print program so at least I can trace data movement to SAP Directory AL11. Proven as good as it is, the standard function module "RV_PRICE_PRINT_ITEM" was not getting any pricing condition out at all by the print program. So the conclusion was simply : during the process of saving DO at the background, Sales Order's SO number (VBELN) and Pricing ID (KNUMV) had not yet COMMIT WORK. That's a pretty straight guess! So it had to be it. Afterall, I can get back my pricing condition if I did the DO manually or after that. So, while SO was not committed to save, the print program will forever not be able to retrieve it's pricing condition. </span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">Now I had to go out to the jungle to find the ultimate root cause why the function module "RV_PRICE_PRINT_ITEM" unable to retrieve pricing condition back from SO while its generating DO at the background. So its like finding the golden needle in the haystack! </span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">All over again, but I had only question in mind as I race against time to get that root cause:</span><br /><span style="font-family:arial;"></span><br /></div><blockquote><p align="justify"><span style="font-family:arial;color:#000066;"><strong><em>Where the hell happen?! </em></strong></span></p></blockquote><div align="justify"><span style="font-family:arial;">It took me painfully the next 4 days to track and hunt the error. Adding salt to the situation, the error had gone from thin air in the development system. Out of nowhere had it gone to and my functionals had their heels on me whether I had fixed anything or done anything. My answer was NO. So all over again and again, several questions add to another unsolved question:</span><br /><span style="font-family:arial;"></span><br /></div><span style="font-size:85%;"><strong><em><span style="color:#000066;"><span style="font-family:arial;"><blockquote><span style="font-size:85%;"><strong><em><span style="color:#000066;"><span style="font-family:arial;">Who made the changes?</span><br /><span style="font-family:arial;">What changes was made?</span></span></em></strong></span></blockquote><div align="justify"></span></span></em></strong></span><span style="font-family:arial;">Time was running out and I was running out of ideas and ways to solve this problem day by day. My boss kept coming to me if it will be solve. Given any day or any moment my answer to him was always YES. Unfortunately, this issue is a real mess and if things go disappear suddenly then I can say this is a serious X-files! Bear in mind, SAP problems always had a cause and an explanation behind but you need to take the pain before you gain it. So I had to force myself, this time, I repeated this time, I will go line by line and open up each door to see what was behind the mechanism.</span><br /><span style="font-family:arial;"></span><br /><span style="font-family:arial;">As I went to each line, I was determined that someone, had to be a person, from another team who did something to a user exit, an enhancement-point or a BADI that suddenly make the DO to correctly print the price out. </span></div><p align="justify"><span style="font-family:arial;">You would have said, "Hey buddy, wait for the next transport of whatever into the quality system and production system to correct the error!" However, this will not be the case, things just do not dissappear for a reason. I need to find that out. <em><span style="color:#000066;">Furthermore, the quality system and production system still having the error.</span></em> So it need to be fix pronto even though development is correct! Anyway, I went along thousand of lines of ABAP coding, I found an alternative solution instead of the root cause.</span></p><p><span style="font-family:arial;">I will make use of the following : </span></p><span style="font-family:arial;"><blockquote><span style="font-family:arial;"><span style="font-size:85%;color:#000066;"><em>1.</em></span> <span style="font-size:85%;color:#000066;"><em>USER EXIT->MV45AFZZ->USEREXIT_SAVE_DOCUMENT</em></span></span><span style="font-size:85%;color:#000066;"><em><br /><span style="font-family:arial;">2. A customized TABLE</span><br /></em></span><em><span style="color:#000066;"><span style="font-family:arial;font-size:85%;">3. Modified the PRINTPROGRAM</span><br /></span></em></blockquote></span><div align="justify"><br /><span style="font-family:arial;">Before I go on to explain why I would use such crude way, it is best that you follow my trace below.</span> </div><span style="font-family:arial;font-size:78%;"><blockquote><p align="justify"><span style="font-family:arial;font-size:78%;">01. SAPFV45K->FV45KFKD_VBKD_BEARBEITEN->VBKD_BEARBEITEN</span><br /><span style="font-family:arial;font-size:78%;">02. SAPMV45A->MV45AIAK_VBAK_FUELLEN->VBAK_FUELLEN</span><br /><span style="font-family:arial;font-size:78%;">03. SAPFV45K->FV45KFKD_XVBKD_LESEN_DIREKT->XVBKD_LESEN_DIREKT</span><br /><span style="font-family:arial;font-size:78%;">04. SAPFV45P->FV45PFAP_VBAP_BEARBEITEN_VORBE>VBAP_BEARBEITEN_VORBEREITEN</span><br /><span style="font-family:arial;font-size:78%;">05. SAPFV45P->FV45PF0K_KALKULATION_BEARBEITE->KALKUlATION_BEARBEITEN_ENDE</span><br /><span style="font-family:arial;font-size:78%;">06. SAPMV45A->MV45AF0B_BELEG_BEARBEITEN_ENDE</span><span style="font-family:arial;font-size:78%;">->PREISFINDUNG_GESAMT_BELEG_ENDE</span><br /><span style="font-family:arial;font-size:78%;">07. SAPMV45A->MV45AF0P_PREISFINDUNG_GESAMT->PREISFINDUNG_GESAMT->(38)</span><br /><span style="font-family:arial;font-size:78%;">08. SAPMV45A->MV45AF0P_PREISFINDUNG_GESAMT->PRICING_COMPLETE(61)</span><br /><span style="font-family:arial;font-size:78%;">09. SAPMV45A->MV45AF0B_BELEG_BEARBEITEN_ENDE->BELEG_BEARBEITEN_ENDE->(315)</span><br /><strong><span style="color:#660000;"><span style="font-family:arial;font-size:78%;">10. SAPMV45A->MV45AF0B_BELEG_SICHERN->BELEG_SICHERN->NUMBER_GET_NEXT(654)->GET VBAK-VBELN</span><br /><span style="font-family:arial;font-size:78%;">11. SAPMV45A->MV45AF0B_BELEG_SICHERN->BELEG_SICHERN->NUMBER_GET_NEXT(792)</span></span></strong> </p><p align="justify"><strong><em><span style="color:#330033;">Editor's note : Yes I took my pain ass going around the merry go round to get those traces out. Yes, MV45AF0B_BELEG_SICHERN is the standard include file that is for SAVING THE SO! Mind me, I haven't finish tracing to DO!</span></em></strong></p><p align="justify"></span></p></blockquote><div align="justify"><span style="font-family:arial;">Look at item 10 onwards, this line gives me that idea to use an user exit to solve the problem. This line 10 and line 11 is the important part of the standard coding that SO begin to create a SO no. and KNUMV id. <strong><em>But bear in mind standard internal tables XKOMV still not updated with the new KNUMV id though it had its pricing determine.<br /><br /></em></strong></span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;">So at this point, I have a new SO number, a new KNUMV number and a table of pricing condition not tied to the new KNUMV yet. Three new things that is untied of each other. Therefore, I had to tied these three together and make the DO's form to print them out.</span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;"><blockquote><div align="justify"><span style="font-family:Arial;font-size:85%;color:#000066;"><em>1. A new SO no. </em></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;color:#000066;"><em>2. A new KNUMV</em></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;color:#000066;"><em>3. A table of determined pricing condition with no KNUMV yet.</em></span></div></blockquote></span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;">The userexit (MV45AFZZ->USEREXIT_SAVE_DOCUMENT and CUSTOMIZED TABLE) now come into role. I wrote a piece of logic to combine these three things into the CUSTOMIZED TABLE. The customized table has underlying KONV structure and added VBELN and a RUNID to it. This whole portion will be use by the print program.<br /><br /></span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;">At the print program and just after the function module "RV_PRICE_PRINT_ITEM", I will make use of the customized table. If RV_PRICE_PRINT_ITEM can get the price condition out, this customized table will not be use. Else, it will be processed and fill back the TKOMV adn TKOMVD tables. TKOMV and TKOMVD are table parameters of "RV_PRICE_PRINT_ITEM".<br /><br /></span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;">So that's the alternative solution that I had implemented for the time being. Now back to those questions:</span></div><div align="justify"></div><span style="font-family:Arial;"><blockquote><p align="justify"><span style="font-family:Arial;font-size:85%;color:#000066;"><em><strong>What happend to DO's Pre-Inv, during background creation by SO, unable to capture those pricing condition out by the function module RV_PRICE_PRINT_ITEM?</strong></em></span></p></blockquote></span><div align="justify"></div><div align="justify"><span style="font-family:Arial;">It is stil an unanswered question till today. Anyone out there who knows this mysterious issue?<br /><br /></span></div><div align="justify"></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> SO->DO->RV_PRICE_PRINT_ITEM...</span> </div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com2tag:blogger.com,1999:blog-23207388.post-35572048077786865592009-05-12T16:14:00.009+08:002009-08-11T20:53:06.323+08:00SAP ECC6.0 : IDOC stuck at status 30<div align="justify"><span style="font-family:arial;"><strong>Certain assignments</strong> will require you to purpose write a program to send out IDOCs to your business partner to process data. So you will need to process your Partner Profiles information, deciding which segments, basic type and message type to use. However, you will not run away from not using Function Module 'MASTER_IDOC_DISTRIBUTE'.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">This function module will help you to issue out IDOC (send) to your customer and business partners. However, there is a problem to using this function module. You need to use another function module together with 'MASTER_IDOC_DISTRIBUTE'. This function module is 'EDI_DOCUMENT_DEQUEUE_LATER'.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">As per HELP.sap.com description, if one wants to sent out IDOC with '03' status, function module 'EDI_DOCUMENT_DEQUEUE_LATER' need to be process after distributing IDOC then only COMMIT WORK.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">1. MASTER_IDOC_DISTRIBUTION</span></div><div align="justify"><span style="font-family:arial;">2. EDI_DOCUMENT_DEQUEUE_LATER</span></div><div align="justify"><span style="font-family:arial;">3. COMMIT WORK.<br /><br /></span></div><span style="font-family:Arial;"><blockquote><p align="justify"><span style="font-family:Arial;"><em><span style="font-size:85%;">If you do not want to use 'EDI_DOCUMENT_DEQUEUE_LATER', then your partner profile's port should be set either to FILE or CPIC. Futhermore, TRFC will not direct send your IDOC (status 03) even though you select 'Transfer Immediately'. As of ECC6.0, function module 'EDI_DOCUMENT_DEQUEUE_LATER should be use between 'MASTER_IDOC_DISTRIBUTION' and COMMIT WORK</span>.<br /><br /></em></span></p></blockquote></span><div align="justify"><span style="font-family:arial;">Reference:</span></div><div align="justify"><a href="http://help.sap.com/saphelp_nw04/helpdata/en/52/16adef543311d1891c0000e8322f96/content.htm"><span style="font-family:arial;">http://help.sap.com/saphelp_nw04/helpdata/en/52/16adef543311d1891c0000e8322f96/content.htm</span></a><br /><br /></div><div align="justify"></div><div align="justify"><span style="font-family:arial;">OSS Notes: </span></div><div align="justify"><span style="font-family:arial;">150202, 1097730<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> status 30 to 03...</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com1tag:blogger.com,1999:blog-23207388.post-10210737742396394072009-02-17T17:55:00.003+08:002009-02-17T20:57:57.238+08:00SAP R/3 : Constructing form with style<div align="justify"><span style="font-family:arial;"><strong>Detailing the form</strong> either portrait or landscape can determine if the form can display more information to the user and at the same time can even save paper.<br /><br />1. It is very important that only certain information are display or user requires. Therefore, user requirement should be carried out in detail so the developer can come out the correct form. However, SAP does provide standard templates according to specific business solution (module). These SAPScript templates are developed by developers as required by users in the industries that has been used for many years all over the world. Hence, these templates eventually assimilated into SAP modules as standard templates.<br /><br />2. In every form, there should have at least a header, a body and a footer but the body is a must and should exist in every form development. Every form in SAP referring SAPScript and SMARTFORMS. I am not too sure about PDF Forms that is now the rave among SAP Developers. I will surely look into it when time permits. Continue on, as repeated, a header in a form depending on the module it might display information differently. A Sales order, the header will display Sales Order Number, Date Document, Partner address, Delivery address, Company name and address and so on. Each of this can be display separated in a window. This window is not the MAIN window. A MAIN window is a fixed window that usually displays ITEM HEADER, LINE ITEM and ITEM DETAIL. ITEM DETAIL usually display items such BATCH No, SERIAL No, Component dates like Delivery Date, Expiry Date, or even Batch Description.<br /><br />3. In SD module, it is pretty straight forward, the print program or program that drives the flow and display nature of the form is accordingly GET_DATA, OPEN_FORM, DISPLAY_HEADER, DISPLAY_ITEM_HEADER, DISPLAY_ITEM, and CLOSE_FORM. Each of this subroutine plays a distinctive role in coming up of Sales form. Get DATA normally retrieves primary data especially sales data like price header condition, sales partner and sales document information.<br /><br />4. In SAPScript, there is one part call PARAGRAPH Element that derives the font attributes and tab alignments. You can do adjustment at this part. Moreover, apart from this adjustment, you can use SAPScript command or TAGS. TAGS for word, text or characteristics specific manipulations are on limited to </span><span style="font-family:arial;">Bold, </span><span style="font-family:arial;">Italics and </span><span style="font-family:arial;">Underlines and ending with forward slash tags </>. Apart from using tags and SAPScript commands, you can use SAPScript STYLE to manipulate SAPScript templates.<br /><br />5. SAPScript templates are normally stored in client 000 and if required you can copied them out to your specific client development. Or, you can developed up from scratch only if your requirements are fulfilled. SAPScript development requires not only the basic understanding of form but technique to come up with a stable form. Stable forms will display line items, boxes, lines, and other information accurately (including text remarks, sub totals and grand totals when there is a page break or protected section of a window).<br /><br />6. It's a good practice to always process your data in the print program before it is display in the form. FORM should always display information only. If FORM should meddles into processing data during display it might get messier and your coding can get disorganize. I am saying the PERFORM of subroutine in INCLUDE from FORM which appears most of the time in MM module. Managing MM forms can be tedious and one should be very careful when managing MM forms especially PO forms because it involves a lot of PERFORM calling from the FORM itself.<br /><br />7. Lastly, a good UNDERSTANDING of the flow and logic of the print program is important to FORM modification and FORM development.<br /><br /></div></span><div align="justify"><em><strong>Below are transaction codes that you can use to create/maintain SAPScript:</strong></em></div><div align="justify"><em>SE71 - SAPScript Layout Create/Change</em></div><div align="justify"><em>SE72 - SAPScript Styles</em></div><div align="justify"><em>SE73 - SAPScript Font Maintenance</em></div><div align="justify"><em>SE74 - SAPScript Format Conversion </em></div><div align="justify"><em>SE75 - SAPScript Settings</em></div><div align="justify"><em>SE76 - SAPScript Layout Translation Sets</em></div><div align="justify"><em>SE77 - SAPScript Translation Styles<br /><br /></em></div><div align="justify"><em></em></div><div align="justify"><span style="font-size:85%;"><strong>is sky the limit... </strong>SAPScript Concern</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-42137816287505887912009-01-16T21:00:00.004+08:002009-08-07T20:38:03.478+08:00SAP R/3 : QM BADI<div align="justify"><span style="font-family:arial;"><strong>INSPECTIONLOT_UPDATE</strong> is a very good BADI to enhance TCODE especially QA11, QA12 and QA13. It has all the following methods that you can use in your enhancement:<br /><br /></span></div><div align="justify"></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong><blockquote><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_AT_SAVE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_BEFORE_UPDATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_IN_UPDATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_UD_AT_SAVE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_UD_BEFORE_UPDATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CHANGE_UD_IN_UP</strong></span><span style="font-family:arial;font-size:85%;"><strong>DATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CREATE_AT_SAVE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CREATE_BEFORE_UPDATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>CREATE_IN_UPDATE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>SET_UD_AT_SAVE</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>SET_UD_BEFORE_UPDATE<br />SET_UD_IN_UPDATE</strong></span></div></blockquote></strong></span><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">It is a very important BADI if one needs to do assignment on updating Inspection Lots and Usage Decision. You can even use this BADI in ME23N from another use exit to auto create Inspection Lot, update Usage Decision and also Shelf Life Expiry Date.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><p align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> qm badi</span> </p>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-33121725373570871562008-11-23T09:50:00.009+08:002009-08-07T19:45:00.726+08:00SAP R/3 : READ_TEXT and WRITE_TEXT<div align="justify"><span style="font-family:arial;"><strong>In any SAP modules'</strong> standard screen functions, users and functionals get to maintain certain text like remarks, vendor notes, and others important elements in the header. These extra notes are stored somwhere in SAP's transparent table. Furthermore, SAP forms and customize forms also make use abundant of such feature like having a certain format of signature stored somewhere at a specific location and later read out to the template for printing or viewing.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">These are what I call <em>free texts</em> that is non specific that is not specifically catered by SAP to be saved by certain fields. Hence, these texts are not similar to fields like BUKRS, MATNR, or MEINS but its of RAW format. </span></div><div align="justify"><span style="font-family:arial;"></span></div><blockquote><p align="justify"><span style="font-family:arial;font-size:85%;"><em>"RAW text is a machine readable form of characters or string of characters that is before being process by any analytical software, in this case our very own SAP"</em></span></p></blockquote><div align="justify"><span style="font-family:arial;">RAW text is gibberish to any developer's view. User or functional will not be able to read it straight from SE16. SE16 won't even show this field that contains RAW format. RAW format for this entry I am referring to non other tables than STXH and STXL. All your free text wheter used in SAPScript or standard screens are stored here in STXL. TCODES such as SO10 and SE75 are both tools for you to create text. Underlying code that keeps such data are RAW format. So the question will be how do i see those RAW text without using those TCODES?<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">You will need the following functino module : <strong>'READ_TEXT', 'EDIT_TEXT', 'WRITE_TEXT' </strong>and so on.<strong> </strong><em>You can always refer to this function module's documentation to know more about STXH and STXL tables. Afterall, this is one functino module provided by SAP for you to see RAW format</em>.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">This function module is an analytic processing logic to read RAW formatted string of characters. As an ABAP developer, this function module is your next best girl friend to develop/maintain your SAPScript fonts or programs that need to extract long text out from the system.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Another alternative, you can go to SPRO to maintain it.</span></div><div align="justify"><br /><span style="font-family:arial;"><blockquote><span style="font-family:arial;font-size:85%;"><em>SPRO->IMG->TO CONFIG TEXT ID</em></span></span></blockquote></div><div align="justify"><span style="font-family:Arial;">STXH is the text header transparent table</span></div><div align="justify"><span style="font-family:Arial;">STXL is the text line transparent table</span></div><div align="justify"><span style="font-family:Arial;">STXD is the text file header<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">In addition to the above, I found several tables that normally associates itself to RAW format are as follows : </span></div><div align="justify"><span style="font-family:Arial;">1. VBBP (Billing)</span></div><div align="justify"><span style="font-family:Arial;">2. EBAN (Requisition)</span></div><div align="justify"><span style="font-family:Arial;">3. BELEG (JV)</span></div><div align="justify"><span style="font-family:Arial;">4. PMS (Project and WBS)<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">I list the following above in the following order of what I usually get acquainted with my daily assignments.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">Here's a link that I'd found: </span></div><div align="justify"><span style="font-family:Arial;">1. <a href="http://fuller.mit.edu/SAPWebDocs/LongComment.html">Fuller(MIT)</a><br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> read text and write text for RAW</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com1tag:blogger.com,1999:blog-23207388.post-72209464161873499562008-10-16T18:05:00.002+08:002009-08-09T22:03:25.950+08:00SAP R/3 : LOTUS Notes Receive .SCR File<div align="justify"><span style="font-family:arial;"><span style="font-size:85%;color:#000066;"><em>Editor: This will be a simple entry. Source of error is directed at email format receiving at your email end has error.</em></span> <br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:arial;"><strong>Email content</strong> <strong>displayed as .SCR.</strong> Recently, my development with SO_NEW_DOCUMENT_SEND_API1 had a problem which my email display its content incorrectly. Instead of the content I wanted, it was attached with a file. This file is a .SCR file. I am using LOTUS Mail and this error had occured at my workplace. I am not sure if any of you guys using other type of email servers having this error. Maybe Microsoft Exchange does not have this issue at all. <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">Nevertheless, if you come across this issue, you can check out this OSS notes 171698. Again, <strong>the attachment in the email display your contents with .SCR file format</strong>. This normally occurs if your developer uses <em>SO_NEW_DOCUMENT_SEND_API1</em> to send notification to users. The problem is not restricted to this FM but other send email function modules too.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:arial;">OSS noteNote 171698 - SAPconnect: Formats, conversion, and device type.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> 171698, Email as .SCR</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-54708336893331962272008-10-16T17:57:00.007+08:002009-02-19T21:48:36.778+08:00SAP R/3 : Spelling Currency to Words<div align="justify"><span style="font-family:arial;"><strong>There are a few ways</strong> to spell currency into words. However, it is limited to few languages and its denominations that you can maintain in the <strong>T015Z</strong> table or your server's language. In order to spell a string of currency, for example, USD 102034.00 or VN 23,000 then you will either need to use an SAP standard FM or you might need to write it out yourself. Here are some options:<br /><br />1. Call function <strong>'SPELL_AMOUNT'</strong><br />2. Call function <strong>'HR_IN_CHG_INR_WRDS'</strong><br />3. Customized a function to convert currency that is not supported by SAP<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify">PS: Another option is check SCC4 for your language/currency or see table T015z or TCURC for currency.<br /><br /></div><div align="justify"></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> currency to wordings</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-13193039098623327542008-09-20T11:39:00.007+08:002009-08-11T20:52:37.960+08:00SAP ECC6.0 : Proper customer table creation...<div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;"><strong><em>Editor: I will not touch SE11's EVENT MODIFICATION under Table Maintenance Generator. I will probably do it at a later period.<br /><br /></em></strong></span></div><div align="justify"><span style="font-family:arial;"><strong>Every company</strong> have their own customize development guidelines for customer table developments. Specific naming convention and specific type of data declaration. All this are part and puzzle of development team rules. Unfortunately, I observed that this doesn't really help much when it comes down to gist of realization of what fields should be included into a customize table. I emphasized here about what fields should be used because we are only, as usual, informed which fields will be required by our functionals. Essentially they only want to see and use that particular fields. However what of other additional fields that is required for your proper development? This entry, I want to share with you of my experience in customize table development.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">A proper customized table as required by functionals should always has the following structure:<em><span style="font-size:85%;">(I did not purposely come out with this recommendation because of ECC6, <strong>I'd practiced doing this since 4.6c. Moreover, this practice was passed it down from one of my seniors who is now in Singapore!</strong>)</span></em><br /><br /></span></div><div align="justify"><span style="font-family:arial;"><blockquote><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">MANDT (this is to tell which data belongingto which client)</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">KEY FIELD 1 - CHECK TABLE (it can be your required field)</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">KEY FIELD 2 - CHECK TABLE (it can be your required field)</span></div><div align="justify"><span style="font-size:85%;color:#000066;">...</span></div><div align="justify"><span style="font-size:85%;color:#000066;"><em>KEY FIELD n </em></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">non key field 1 - CHECK TABLE (it can be your required field)</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">non key field 2 - CHECK TABLE (it can be your required field)</span></div><div align="justify"><span style="font-size:85%;color:#000066;">...</span></div><div align="justify"><span style="font-size:85%;color:#000066;"><em>non key field n</em></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CHECKBOX 1 (optional)</span></div><div align="justify"><span style="font-size:85%;color:#000066;">...</span></div><div align="justify"><span style="font-size:85%;color:#000066;"><em>CHECKBOX n</em></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CREATED ON </span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CREATED AT</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CREATED BY</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CHANGED ON</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CHANGED AT</span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#000066;">CHANGED BY</span></span></div></blockquote></div><div align="justify"><span style="font-family:Arial;">Observed those additional fields especially CREATED ON until CHANGED BY fields. Those fields will help your user to especially keep track of line data's accountability. With these fields users are able to monitor who at a certain period created this or update the line item. This can be important when it comes to troubleshooting and determination of responsibility and safety (compromised?). It may not be as important but there may be expectation that this fields can be made use in future (who knows) to be use part of report filtering.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">Yes, you may not need to do this, because at the SE16, you can view your CHANGE LOG feature. This feature is only guaranteed if your customized table had its "Changed Log" checked at Technical Attributes in SE11. So it is still fine that those additional fields are put in. As i said, you might never know when an executive or someone from the department comes over to you and ask "Who change the table's data?". So credibility on this part plays a great deal!.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">Though now we had moved from 4.6c to ECC6, SE11 had made several changes which included a new feature called 'Enhancement'. You can actually regulate your customize program whether the next developer can change the fields, specific fields, or cannot change the customize program at all. Look it up, my friend. You won't miss it because everytime you activate your customized table, there will always be a <span style="color:#ffcc00;">WARNING</span> message telling you that this table is not set for certain enhancement!.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> proper customized table</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-32055058332082677372008-09-16T22:37:00.004+08:002008-09-20T10:51:52.126+08:00SAP R/3 : ALV Limitation...<div align="justify"><span style="font-family:arial;"><strong>ALV report</strong> itself is a nice tool that allow developers to quickly come out with a nice report that does not require much of programming to build columns, pump in data, sort it, or providing it a few icons or additional instructions. Allowing you to focus on processing data only. Unfortunately, ALV report itself presents a few problems or limitations that somehow hampers our requirements when it comes to large and long report that user wants.<br /><br /></span></div><div align="justify"><span style="font-family:arial;">OSS Notes : 857823</span></div><div align="justify"><span style="font-family:arial;">Detailing that cells with CHAR or STRING type are truncated after 128. This affects ALV Grid function control and some other SAPGUI display. This is a standard behavior.<br /><br /></span></div><div align="justify"><span style="font-family:arial;">OSS Notes : 910300</span></div><div align="justify"><span style="font-family:arial;">Next, this notes detailing (UNICODE) that it is also a program limitation for ALV Grid that truncates text. The only solution is to modify the program to only take in a maximum of 42 character for a cell.<br /><br /></span></div><div align="justify"><span style="font-family:arial;">OSS Notes : 959775</span></div><div align="justify"><span style="font-family:arial;">Also, ALV GRID column of text based cells are truncated or replace '...' so to display that there are more text after that position. This is considered by SAP as an error. You might include the layout method optimize_colwidth = 'X' but it is not the solution but applying SAP Patch. </span></div><div align="justify"><span style="font-family:arial;"><strong><span style="color:#336666;">PATCH : SAPGUI 640 PATCH 21 (Release since 6.0)<br /></span></strong><br />OSS Notes : 78401</span></div><div align="justify"><span style="font-family:arial;">In addition, last year, I did mention there's another limitation to downloading xls from ALV. Here is the link: <a href="http://isskythelimittechnical.blogspot.com/2007/02/sap-r3-spool-converting-report-to-xls.html"><em>http://isskythelimittechnical.blogspot.com/2007/02/sap-r3-spool-converting-report-to-xls.html</em></a><br /><br /><br /><br /></div></span><div align="justify"><span style="font-family:arial;font-size:85%;"><strong><em>Reference : 857823, 910300 and 959775 and obtain from </em></strong></span><a href="https://www.sdn.sap.com/irj/sdn/thread?messageID=4770708#4770708" target="_blank"><span style="font-family:arial;font-size:85%;"><strong><em>https://www.sdn.sap.com/irj/sdn/thread?messageID=4770708#4770708</em></strong></span></a><br /><br /></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> alv grid limitation...</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-78425155270792067772008-09-16T21:32:00.011+08:002009-03-28T09:09:56.163+08:00SAP R/3 : Overcome ALV limitations...<div align="justify"><span style="font-family:arial;"><strong>As an alternative solution</strong> to make your icon in ALV to download xls file smoothly as a result of a few notes due to </span><a href="http://isskythelimittechnical.blogspot.com/2008/09/sap-r3-alv-limitation.html"><span style="font-family:arial;">http://isskythelimittechnical.blogspot.com/2008/09/sap-r3-alv-limitation.html</span></a><span style="font-family:arial;"><br /><br /><em>I would normally recommend a few options:</em><br />1. IF your ALV is a list (not GRID), and your xls downloads are messy, most probably, the spool does not recognize the vertical lines from the list. Spool buffers often recognize ALV grid's vertical line as the optical border to help it separate the columns neatly. Solution: convert your report to grid.<br /><br />2. IF your ALV GRID, present a problem during xls downloads, you might want to consult BASIS to enable the spool to collect more than its limited number of column. Or, you can go to SPAD and modify the spool column.<br /><br />3. IF your ALV GRID, present a problem during xls downloads, and your BASIS does not want to modify it for fear of other situations - you can custom your standard ALV toolbar's xls icon to download using FM GUI_DOWNLOAD.<br /><br />(Use <strong><em>SE41</em></strong>) Modifying ALV toolbar is not difficult. You can disable certain ICONS from the ALV toolbar which you do not want user to use it. You can even enable a custom ICON into the standard ALV toolbar so to fullfil user requirement. Thus there are two objects that you need to know in order to custom standard ALV toolbar:<br /><br /></span></div><blockquote><p align="justify"><span style="font-family:arial;font-size:85%;color:#333399;"><strong>Program : SAPLKKBL<br />Status : STANDARD*</strong></span></p></blockquote><div align="justify"><span style="font-family:arial;">Copy that status and re-paste it to your custom program. Copy button will popup a dialogue that allows you to transfer that copied ALV status to yours. From there you can edit the toolbar's icon you like.<br /><br />You will know which icon to modify because xls button is easily recognized by its excels spreadsheet avatar. At the function portion for that xls button, change the function code to your own zXXX so you can use it during CALLBACK from your ALV report.<br /><br />However, there are 2 things you need to do before you can use your custom xls icon. First, at your ALV function module, you call I_CALLBACK_PF_STATUS_SET to set your copied status so your custom ALV toolbar appears at the report. Second, use I_CALLBACK_USER_COMMAND to trigger your GUI_DOWNLOAD to download your excel files. I_CALLBACK_USER_COMMAND will throw your icon's function code to sy-ucomm.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:Arial;">There you are, in conclusion, a neat step to overcome your ALV problems. I hope there will be more solutions being handled by SAP ECC6.0. Any one who has other alternative solution or some steps I miss you can email to me personally.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> managing your excel download...</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-74537363868261004732008-09-16T20:49:00.004+08:002008-09-20T11:11:20.159+08:00SAP R/3 : GET PERNR or SELECT or PROVIDE...<div align="justify"><span style="font-family:arial;"><strong>To access employee's record</strong> in HR module are multiple ways of doing so. You can use GET PERNR, SELECT, PROVIDE or even function modules. However, the question lies on the difference of each of this syntaxes that allows you to access employee information when we are using it for reporting, enhancement and other data queries.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">First, GET PERNR is a macro that contains PROVIDE statements and a logic of filteration based on the logical database PNP. GET PERNR allows you to focus on processing data immediately and less worry on the data selection because the PNP automatically provide a set of predefine group of selection screens. You can even modify and set your own selection screens using HR Report Category and still able to use GET PERNR. HR macros are all stored in this<strong><em> table TRMAC.</em></strong> You will see that each of this line items in that table are specific ABAP coding. GET PERNR should be use when your reporting does not max out the database processing (where there is many read and write) or mass processing. Mass processing will not be very suitable to be queried by GET PERNR. GET PERNR gets each record of an employee of a cycle. Each cycle in GET PERNR does 4 events that will listen to set handler to get data, process data, present data and lastly checking if there are user exit or enhancement to the GET PERNR.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Second, SELECT statement/syntaxes are more suitable to query for large data (mass processing) especially if you are downloading employee data at one shot to a text file or to an IDOC for data transfer. You should use SELECT statement to select a lot of employees for a certain condition so to minimise table read transaction so your performance in an ABAP program can focus more on ABAP processing. In my personal opinion, <strong><em>getting side topic a bit</em></strong>, analysis result yield by SE30 after checking a certain ABAP program should have its performance shoulder towards on ABAP processing side. In other words, it is okay to see the percentage falls towards ABAP processing rather than sliding towards database read. High percentage of database reads indicates your program contains a lot of SELECT SINGLE and a whole START-OF-SELECTION filled with SELECT-END SELECT statements. Worse, there might be a possibility that your program contains NESTED SELECT statement. You should group your SELECT statement in one place and gather all data before going to processing stage.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Third, a good mixture usage of GET PERNR and INFOTYPE syntax can help you ease your HR report processing reading your infotype tables a great deal. At each read of GET PERNR, INFOTYPE syntax will be automatically filled with data related to the particular employee so it helps you to reduce coding and in one way, getting correct rows of record for an employee that is time dependent. Time dependent in HR meaning each record of transaction for an employee has a trace of time that dictates the time and date that affect that record. Not all infotype is dependent time. Infotype like 0000 (Action) is time dependent because it can tell you when an employee is recruited, confirm, transfer, promoted, terminated or on leave.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">GET PERNR and SELECT statement should be used accordingly to reporting condition. GET PERNR sometime can slows down your report. Also, instead of using PROVIDE statement, you should use GET PERNR because PROVIDE is in the macro itself.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-size:85%;"><span style="font-family:arial;"><strong>is sky the limit...</strong> GET PERNR/PROVIDE/SELECT</span></span></div><div align="justify"><span style="font-family:arial;"></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-40095730404808178792008-05-14T19:52:00.003+08:002008-05-14T20:14:16.568+08:00SAP R/3 : Trailing The Pricing Condition<div align="justify"><span style="font-family:arial;"><strong>Last several weeks</strong>, an unusual incident occured at the area of pricing condition in which one of the pricing (condition type) is not populating price correctly. Initial coding were done in one of the user exit to recorrect the value. However, the value was not updated as the functional wanted. So I had to follow the trail of Indiana Jones by tracing the standard program. So below is one of the gruesome steps on how the pricing condition was determine during invoice creation (VF01).<br /><br />Put a break point accordingly to each of the path below:<br /><br /><span style="font-size:85%;">1. SAPMV60A <span style="color:#990000;"><strong>(Travel Here)</strong></span></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>MV60AF0X_XKOMFK_ENDE </span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">**********>RV_INVOICE_CREATE<br /><br />2. SAPLV60A <span style="color:#990000;"><strong>(Travel</strong> <strong>Here)</strong></span> </span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV60AU01</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PERFORM FAKTURA_ERZEUGEN<br /><br />3. SAPLV60A <strong><span style="color:#990000;">(Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV60AA26</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PERFORM FAKTURA_LIEFERBEZ0GEN<br /><br />4. SAPLV60A<strong><span style="color:#990000;"> (Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV60AA22</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PERFORM FAKTURAPOSI_LIEFERBZ0GEN<br /><br />5. SAPLV60A <strong><span style="color:#990000;">(Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV60AA21</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PRICING_COPY<br /><strong><em><span style="color:#3333ff;">******>(INITIALLY JIN1 KWERT IS STILL 0.00)<</span></em></strong>br><br />6. SAPLV60A <strong><span style="color:#990000;">(Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV60AA60</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PRICING<br /><strong><em><span style="color:#3333ff;">******>(At this point, JIN1 KWERT WAS REINITIALIZE TO 0.22 -> Which We do not WANT!)<</span></em></strong>br><br />7. SAPLV61A<strong> <span style="color:#990000;">(Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV61AU01</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>PERFORM XKOMV_BEWERTEN<br /><strong><em><span style="color:#3333ff;">******>(How all 0.22 started)</span></em></strong><br /><br />8. SAPLV61A <strong><span style="color:#990000;">(Travel Here)</span></strong></span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">*****>LV61AA55</span></span></div><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;">********>XKOMV_BEWERTEN<br /><strong><em><span style="color:#3333ff;">******>(91 - LOOP AT XKOMV - WHERE IT ALL HAPPEN!)<br />******> KSTEU and KMPRG (This is the two brothers that caused it!)</span></em></strong><br /></span><br />Therefore, we had the good owner to initialize the KSTEU and KMPRG to a certain value so it the value can be remain as the Functional wanted to meet the requirements.<br /><br /><strong><span style="font-size:85%;">is sky the limit... pricing procedures rocks!</span></strong></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-46287003327446508852008-05-14T18:28:00.004+08:002010-01-04T16:55:39.267+08:00SAP R/3 : User Exits in VF01<div align="justify"><span style="font-family: arial;"><strong>Something to help everyone</strong> on all the userexits and BADI for transaction code VF01. VF01 is to create invoice. Below are the list of all userexits and some BADI invoke (maybe). In which of late, i had a headache to check out why VF01 had problem in creating invoice successfully.<br />
</span><br />
</div><br />
<div align="justify"><span style="font-family: arial;">EXIT_SAPLV60B_006<br />
EXIT_SAPLV60B_002<br />
EXIT_SAPLKBER_002<br />
COPA_CALL_CUSTOMER_EXIT_KEAB04<br />
EXIT_SAPLKEAB_003<br />
SD_CIN_LV60AU02<br />
EXIT_SAPLMCS6_000<br />
EXIT_SAPLMCS6_999<br />
EXIT_SAPLMCS6_001<br />
BADI_SD_DOCUMENTFLOW<br />
IDOC_OUTPUT_INVOIC</span><br />
<span style="font-family: arial;">SDVFX010 - <em><span style="font-size: x-small;">for those who wants to do something during SAVE</span></em><br />
<br />
</span><div align="justify"><span style="font-family: arial;">In any way, if you find this user exit unable to help you and would want to know more if there are other user exits. You can always punch up the ST05 to do an analysis on your VF01.<br />
</span><br />
</div><br />
<br />
<div align="justify"><span style="font-family: arial; font-size: 85%;"><strong>is sky the limit... user exits on VF01</strong></span><br />
</div><br />
</div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-48409859170114661322008-05-06T21:49:00.011+08:002009-02-16T17:22:09.333+08:00SAP R/3 : Sending Multiple PDF Invoice From Output Type<div align="justify"><span style="font-family:Arial;"><strong>Sending email with an invoice attached</strong> to it has never occured to me if it can be done without the working mechanism of business workflow. The requirement was fairly simple during discussion and it was seriously sounded simple enough to put it straight to development immediately. However, I am not very familiar with business workflow. So the question now was how am I going to send an email out with an invoice attach to it. So here is the requirement in question: </span><br /></div><div align="justify"><span style="font-family:Arial;"><br /><blockquote><br /><p align="justify"><span style="font-family:Arial;"><span style="font-size:85%;"><strong><em><span style="color:#3333ff;">"When user create an invoice via VF01 or from a customized IDOC that creates invoice, several output types are created and one of them is an outbound IDOC that will send back to the sender to let them know invoice has been created. Now, after the invoice and IDOC has been sent out, there should be a mechanism to check whether the outbound IDOC is successfully send out. If it is successfully sent out, the mechanism will grab that invoice, convert it to PDF, attach it to an email and send it to responsible recipients</span>..."</em></strong></span></span></p></blockquote></span></div><br /><div align="justify"><span style="font-family:Arial;">Oh boy, it sounds easy to one who is not aware of the workaround behind or does it sounds very technical to one who has minimal working knowledge on it? I was the latter. So below are some of the questions which had formed in my brain: </span></div><br /><br /><div align="justify"><span style="font-family:Arial;font-size:85%;"><em>1. How do you grab an invoice which has been produced by the system (VF01)?</em></span><br /><em><span style="font-size:85%;"><span style="color:#cc0000;">The <strong>CLOSE_FORM</strong> function module will return a spool no when the SAPSCript has finish processing and display.</span><br /></span></em></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><em>2. How do you convert an invoice to a PDF?</em></span></div><span style="font-family:arial;font-size:85%;color:#cc0000;"><em>The <strong>CONVERT_OTFSPOOLJOB_2_PDF</strong> function module take the input of SAPScript and returns in PDF format.</em></span><br /><br /><div align="justify"><span style="font-family:Arial;font-size:85%;"><em>3. How do you attach a PDF to the email?</em></span></div><em><span style="color:#cc0000;"><span style="font-size:85%;">The <strong>SO_NEW_DOCUMENT_ATT_SEND_API1</strong> function module will hold the PDF</span><br /></span></em><br /><div align="justify"><span style="font-family:Arial;font-size:85%;"><em>4. How do you send an email?</em></span></div><div align="justify"><span style="font-size:85%;color:#cc0000;"><em>The <strong>SO_NEW_DOCUMENT_ATT_SEND_API1</strong> function module will hold the PDF and send the email</em></span> <br /><br /><br /></div><div align="justify"><span style="font-family:Arial;">After giving some thoughts to those questions above, now comes the big part of the whole mother of all questions: </span></div><br /><div align="justify"><span style="font-family:Arial;">How on earth at which point in the VF01 should I initiate this whole process?</span></div><br /><div align="justify"><span style="font-family:Arial;">So the my mind start to processing again. The answer to this might be using USER EXITS or Business Add-Ins (BADI). These two solutions seem to be the most absolute answer to the problem. However, when I revealed a solution at the end of this entry, you might find it with disbelief. But to the very few people who started with that solution was real good! </span><span style="font-family:Arial;">Now, let me tell you what I had implemented initially to cater to that problem. </span></div><br /><div align="justify"><span style="font-family:Arial;"><blockquote><div align="justify"><span style="font-size:85%;"><em><span style="color:#333333;"><span style="font-family:Arial;">I went ahead to ST05 to get down all the USER EXITS and BADI from VF01 so I see which of them are more suitable to initiate this process. Doing so, I'd found one, it was XXXX. At this point, my imagination went beyond. Somehow, it is sometimes bad to venture too far from my own imagination. Because the next step I wanted to know how do I check the outbound IDOC's status from this USER EXIT XXX. It was simple, I used transparent table NAST and EDIDC to check the outbound IDOC's status. If its status are 03, 30 and XX, then it should go ahead to process the invoice convertion and IDOC send out. For the time being I'd solved 2 major problems.<br /><br /></span><br /></span></em></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;color:#333333;"><em>Next, I need to get the latest invoice to do conversion. Unfortunately, with the current USER EXIT, I might not be able to get that SPOOL ID because it has not been created yet. VF01 has to be finished first. This pose another problem, how do I let VF01 finish off so I can get the SPOOL ID? After an overnight sleep, I decided that creating another RFC function module in the USER EXIT will do the trick. An RFC that executes with a new process created in the background. Thus, with this RFC initated as a new process run and letting the VF01 to finish processing, I can get the SPOOL ID.</em></span></div></blockquote></span></div><div align="justify"><span style="font-family:Arial;">Hence, I was definitely sure that my concept will surely work. However that will not work. Because of the RFC that i am using, it will cause overlapping. If you ever do my silly method, you will come across overlapping problem. RFC does not care if your PDF has been generated and sent by previoius document. It will just grab and resent everything including the new. Thus, my way does not work.<br /><br /></span><br /></div><div align="justify"><span style="font-family:arial;">The only solution is to have the PDF converted, attached and sent from the print program. Not only does this eliminate duplicates of document but will ensure that it will not sent out duplicate copies of form due to overlapping. Printprogram should be any program that is used to process and display your SAPScript. For any standard program that prints forms, you can go to NACE to find out which program and form that it is using for print out. This way you also know the output type that is used by the standard program.<br /><br /><br /></div><p align="justify"></span><span style="font-family:arial;font-size:85%;"><strong>is sky the limit....</strong> print, converting and sending...<br /></span><br /><br /><br /></p><div align="justify"><span style="font-family:Arial;"></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-24406322851198425152008-05-06T21:44:00.006+08:002008-05-15T20:40:59.286+08:00SAP R/3 : Tracing Outbound IDOC<div align="justify"><span style="font-family:arial;"><strong>Troubleshooting outbound IDOCS</strong> can be very exciting and interesting activity. You get to see the wonders of sending data out of SAP to some other 3rd party systems. If you are unaware of some technicalities and behavorial of outbound IDOCS then testing it can be quite a challenge. Recently, I had this problem of trying to trace an outbound IDOC.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Previously, I could trace the outbound IDOC with minimal difficulty in WE19. If you put a break-point in your outbound process code or function module, the WE19 will stop at that point. But, what if WE19 fails to stop at that point? You will be scratching your head until you reach to a certain point you want to write an extra program just to trace the outbound IDOC. That is just what i did. Read my statement, I wrote an extra program to do that.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Though its a bit consuming but if you know which table and which fields to use then the concept will work just like the my now <strong><span style="color:#990000;">ever loving standard output type program RSNAST00</span></strong>. I shall have to thanks one person who let me know this existing program. But first, I would like to let you know what I'd gone through the latter method. <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">To developed an extra program to trace outbound programs is not as difficult as it seems. <strong><span style="color:#660000;">All you need is declare three tables i.e. NAST, EDIDC and EDID4. </span></strong>NAST is the output type control table that stores all of your 6 output types from printout to telefax. EDIDC is the IDOC control table. EDID4 is the IDOC data table. Therefore, you need to access the first table, NAST, in order to get the output type that you are supposed to execute. After you had obtain the necessary data from NAST, you will need to approach the EDIDC to get the DOCNUM and subsequently the EDID4 for its data. Then you pass all these three data selected data to your outbound's function module. Therefore, you can primitively test your outbound data. However, you will still need to set your output type to be scheduled run at other time.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Now, let us move on to life saving method to test your outbound IDOC or output types. In any of your standard programs that can send out IDOC, Telefax, Print out, set it to 1 (scheduled run at other time) in the FURTHER DATA section. Then you turn to RSNAST00 program where you put in your APPLICATION, OBJECT KEY, MEDIUM and OUTPUT TYPE. Before executing, put a break-point at your function module. Then you are ready to trace your outbound IDOC.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">A note, the RSNAST00 does not only let you trace your outbound IDOC it is in fact a standard program that let you execute output types that you have schedule for later run. Hence, a very great thanks to <strong><span style="color:#330000;"><em>Vincent Teoh</em></span></strong> from the SD (Sales and Distribution) module team. The RSNAST00 had definitely helped me a lot. Though I am still keeping my old program for reference. Concept still work very the same like RSNAST00.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> RSNAST00 and NAST, EDIDC, EDID4</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-83336466500356377122007-11-03T00:19:00.000+08:002007-11-03T00:41:26.648+08:00SAP R/3 : Payroll Detail and Field Symbol<div align="justify"><span style="font-family:arial;"><strong>Very similar to a past report</strong> which I had done and requires it to display dynamic numbers of column and it occurs to me maybe I should just put a template here and share it with everyone who are using it. The report which I had just completed displayed list of employees with all of their basic pay, allowance, deductions and employer contribution from left to right.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Thus, any employee at one point might not have the same number of wagetypes [allowance/deductions] with hers or his peers. So the list that displaying those wage types will need to be very flexible when its display an employee and spreading their wagetypes to right of the report. Here goes the coding that I used to display it dynamically.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Assumingly your field for wagetypes in a structure looks like below:<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>DATA : BEGIN OF ta_wage,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>pernr like pernr-pernr,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>col001(010) type c,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>col002(010) type c, </strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>col003(010) type c,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>col004(010) type c,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>...</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>col050(010) type c,</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>DATA : END OF ta_wage.<br /><br /></strong></span></div><div align="justify"><span style="font-family:arial;color:#663300;"></span></div><div align="justify"><span style="font-family:arial;color:#000000;">As you see the above data structure has 50 columns. Each of this columns will hold a number of wagetypes [allowance/deductions] for an employee. So it should be dynamically to recognize a column that is occupied and to append it with the next employee's wagetype. Otherwise, it will use the next column.<br /><br /></span></div><div align="justify"><span style="font-family:arial;color:#000000;"></span></div><div align="justify"><span style="font-family:arial;color:#663300;"><span style="color:#000000;">Thus the coding to recognize the degree of each column that spread from left to right is as follows.</span><br /><br /></span></div><div align="justify"><span style="font-family:arial;color:#663300;"></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>DATA : tp_ind(003) TYPE n.</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong></strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>CONSTANTS : cn_col(011) TYPE c VALUE 'TA_WAGE-COL'.</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong></strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>FIELD SYMBOLS : <column>TYPE any.<br /><br /></strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong></strong></span></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;">LOOP ta_wagetype.</span></strong></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>DO VARYING tp_value FROM ta_wage-col001 NEXT ta_wage-col002.</strong></span></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;">IF tp_ind = 50.</span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;">exit.</span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;">ENDIF.<br /><br /></span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;"></span></strong></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#663300;"><strong>CONCATENATE cn_col tp_ind INTO tp_dyncol.</strong></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong><span style="color:#663300;">ASSIGN (tp_dyncol) TO <column></span></strong></span><span style="font-family:arial;font-size:85%;color:#663300;"><strong>tp_value.<br /><br /></strong></span></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;"></span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;"><em>[add your logic here]<br /><br /></em></span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;"></span></strong></div><div align="justify"><strong><span style="font-family:Arial;font-size:85%;color:#663300;">ADD 1 TO tp_ind.</span></strong></div><div align="justify"><span style="font-family:arial;font-size:85%;"><span style="color:#663300;"><strong>ENDDO</strong>.</span></span></div><div align="justify"><span style="font-family:arial;font-size:85%;color:#333333;"><strong><span style="color:#663300;">ENDLOOP.<br /></span><br /></strong></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">Notice that i had declared an index variable to hold the count of item; a constant to assign to a field symbol to capture the column dynamically; and the field symbol to move contents fluidly (in my terms <strong><em><span style="color:#660000;">not SAP official explanation</span></em></strong>).<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">After that i perform a DO VARYING in the INTERNAL TABLE ta_wagetype so that for each employee, I can scroll the columns dynamically to the right and get the content. As I go to the right of each column's content I can actually assign a new value, shift left or shift right and determine which is the last column that it last stop.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> do varying and field symbol...</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-83350694601970969462007-10-18T10:58:00.001+08:002007-11-03T00:18:24.651+08:00SAP R/3 : Transaction Codes<div align="justify"><span style="font-family:arial;"><strong>I have gathered</strong> a few important transaction codes along the way in my projects and it had helped me a lot. Here are the following and I hope it will help you like it had helped me in the past, the present and the future:<br /><br /></span></div><div align="justify"><span style="font-family:arial;">SE43 - Menu Customization</span></div><div align="justify"><span style="font-family:arial;">SE93 - Transaction Code Maintenance</span></div><div align="justify"><span style="font-family:arial;">SE16N - Enjoy Screen version of SE16 for data viewing<br />SCC1 - Transport Copy</span></div><div align="justify"><span style="font-family:arial;">SE18 - Class and Methods templates for creation and maintenance</span></div><div align="justify"><span style="font-family:arial;">SE19 - Class and Methods maintenance </span></div><div align="justify"><span style="font-family:arial;">PA03 - Payroll Run - Release </span></div><div align="justify"><span style="font-family:arial;">FS00 - GL master data maintenance (create, change, delete, display)</span></div><div align="justify"><span style="font-family:arial;">FK03 - Display vendor master data</span></div><div align="justify"><span style="font-family:arial;">FK01 - Create vendor master data</span></div><div align="justify"><span style="font-family:arial;">FK02 - Change vendor master data</span></div><div align="justify"><span style="font-family:arial;">F-02 - FI posting</span></div><div align="justify"><span style="font-family:arial;">S_ALR_87012086 - <span style="color:#990000;"><em><span style="font-size:85%;">to be confirmed</span></em> </span></span></div><div align="justify"><span style="font-family:arial;"><span style="color:#990000;"><span style="color:#000000;">PC00_M99_DKON - GL account and wage type display (payroll)</span></span></span></div><div align="justify"><span style="font-family:arial;"><span style="color:#990000;"><span style="color:#000000;">PE01 - Schema maintenance</span></span></span></div><div align="justify"><span style="font-family:arial;"><span style="color:#990000;"><span style="color:#000000;">PA40 - HR maintenance</span><br /></span>RSTXSCRP - SAPScript Export/Import<br /><br /><br /><span style="font-size:85%;"><strong>is sky the limit...</strong> transaction codes</span></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-17891861040577874942007-10-10T22:39:00.000+08:002007-10-10T22:49:35.547+08:00SAP R/3 : GUI_UPLOAD with # as SPACE...<div align="justify"><span style="font-family:arial;"><strong>There are many times</strong> when we need to upload a text file into an internal table we are not aware that the SPACE among the line of strings in the text file is represented as '#'. When we unknowingly get a row of items and started to split it, using SPLIT syntax with the normal '#' symbol, into the columns of your internal table then we get garbage or unreadable contents in the internal table. <br /><br /></span></div><span style="font-family:arial;"><div align="justify"><br />That is because the space is not recognized during upload by GUI_UPLOAD function module. The SPACE among the strings of line items will be replace by '#'. However, this hash or '#' is not your average character '#' but it is an ASCII character of value 09. Thus it showed as '#' in your strings of line items.<br /><br /></div><div align="justify"> </div><div align="justify">Therefore, you will need to do something in your coding so you can SPLIT your string of items properly with the '#'. So, you have to declare a variable with X and value of 09 at the begining of your code. Then only you can use it in your SPLIT syntax. For example, the code below.<br /><br /></div><div align="justify"> </div><div align="justify">Data : tp_hash TYPE x VALUE '09'.</div><div align="justify">Data : tp_result1(15) TYPE c.</div><div align="justify">Data : tp_result2(15) TYPE c.<br /><br /></div><div align="justify"> </div><div align="justify">Assuming variable <strong>tp_file-item</strong> contains <strong>'WILLIAM#WILSTROTH'</strong> and obtained via GUI_UPLOAD.<br /><br /></div><div align="justify"> </div><div align="justify">SPLIT tp_file-item AT tp_hash INTO tp_result1 tp_result2.<br /><br /></div><div align="justify"> </div><div align="justify">Write : / tp_result1, tp_result2.<br /><br /></div><div align="justify"> </div><div align="justify">Thus, it now shows:<br /><br /></div><div align="justify"> </div><div align="justify"><strong>William Wilstroth<br /><br /></strong></div><div align="justify"> </div><div align="justify"><br /><span style="font-size:85%;"><strong>is sky the limit...</strong> split with ASCII 09... not #...</span></span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-54986457663251018042007-07-19T08:40:00.000+08:002007-11-02T23:37:21.460+08:00SAP ECC6.0 : GEN - RSTXSCRP<div align="justify"><span style="font-family:arial;"><strong>There is a need</strong> when you had created a SAPScript in one server and you need to move that SAPScript to another server. Or, you wanted to download the SAPScript and later upload it back to another server. Maybe, you wanted to copy one SAPScript from one to another server. The solution to this is this transaction code : <strong>RSTXSCRP. </strong>This program is called the <em><strong><span style="color:#666666;">'SAPScript Export to Dataset OR Import from Dataset'</span></strong></em>.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">It allows you to capture the following SAPScript items:</span></div><div align="justify"><span style="font-family:Arial;">1. Form</span></div><div align="justify"><span style="font-family:Arial;">2. Style</span></div><div align="justify"><span style="font-family:Arial;">3. Standard Text </span></div><div align="justify"><span style="font-family:Arial;">4. Device Type<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;">Thus, this program is very handy when you need to do a copy from one server to another server.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><div align="justify"><span style="font-family:Arial;font-size:85%;"><strong>is sky the limit...</strong> RSTXSCRP</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-5982988444248182802007-05-30T16:40:00.000+08:002007-05-30T16:42:50.696+08:00SAP ECC6.0 : Payroll - DELIMIT<div align="justify"><span style="font-family:arial;"><strong>This is i must put</strong> credit to Hisyam who shared this knowledge with me on how to delimit a record in a table. Needless to say, one of my original requirement needs this feature so we go straight to the procedure:<br /><br /></div></span><div align="justify"><span style="font-family:arial;">1. I assume that you have created a master table</span></div><div align="justify"><span style="font-family:arial;">2. I also assume that you had made the table maintainable.</span></div><div align="justify"><span style="font-family:arial;">3. Go to table generator maintenance.</span></div><div align="justify"><span style="font-family:arial;">4. click "generate time dependent" button.</span></div><div align="justify"><span style="font-family:arial;">5. Click "maintenance object" then "Generate".<br /><br /></div></span><div align="justify"><span style="font-family:arial;">There you are, your table can be maintain...<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> delimit your record</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-45125642815050371212007-05-29T08:41:00.000+08:002007-05-31T09:09:04.767+08:00SAP ECC6.0 : Payroll - SAPMail Function Module<div align="justify"><span style="font-family:arial;"><strong>Sometimes</strong> you might want to include an email alert to users when they run their program. Recently, I was asked to provide an email alert if one of the records failed to process when run overnight. Thus in the morning, they can get feedback and proceed with their next course of action. So the very nice function module which you can use is below:<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">FM : <strong><span style="color:#336666;">SO_NEW_DOCUMENT_SEND_API1<br /><br /></span></strong></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">To use this function module, fill up the following parameter:</span></div><div align="justify"><span style="font-family:arial;">1. DOCUMENT_DATA : obj_name, obj_descr</span></div><div align="justify"><span style="font-family:arial;">2. OBJECT_HEADER : line.</span></div><div align="justify"><span style="font-family:arial;">3. OBJECT_CONTENT : line.</span></div><div align="justify"><span style="font-family:arial;">4. RECEIVERS : line. (SAP Users)<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">Then you are ready to send. Check your email in your SAP Business Workplace at the main menu or you can use TCODE : SBWP.<br /><br /></span></div><div align="justify"><span style="font-family:arial;font-size:85%;"><strong>is sky the limit...</strong> you've got mail...</span></div>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0tag:blogger.com,1999:blog-23207388.post-34999115184459454392007-05-29T08:37:00.001+08:002007-05-31T08:50:25.450+08:00SAP ECC6.0 : TAX - EC Form Enhancement<div align="justify"><span style="font-family:arial;"><strong>Annually,</strong> Malaysians working either in private or public sector will received a tax form from their employers. Those working in the private sector will get the EA Form. Others in the public sector will get the EC Form. EC Form describes how much one earns and gets remunerated (benefits) as well as how much of one earnings gets deducted. Thus the calculation of taxable of one employee. Therefore EC/EA Form denotes all of this in one year. <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">EC Form which i had to modify to fill up some blank spaces which was not filled up by SAP standard program took me nearly a week or more. I had to go through the standard program and see how the SAPScript (EC Form) and the standard program goes together to process payroll information. Nevertheless, I had to enhance one include file and pump the data into the SAPScript EC Form.<br /><br /><br />Although SAP did provide 2 BADI for developers to enhance those forms but it only work on certain way and i find it hard to fullfil my functional request thus forcing me to activate enhancement on the standard program itself. This solved one issue over another. Perhaps I would like to meet people who have experience similar situation in modifying or enhancing the EC Form.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">So here goes the famous BADI offered by SAP:<br />1. HRPAYMY_ECFORM - calculation for BIK (Benefit In Kind). This generally displays a lump sum of benefit in kind into the section B (Manfaat Barangan). Unfortunately, my request was to display the breakdown list of all the benefits to one person.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:Arial;">2. HRPAYMY_EAFORM - process to fill up EA Form header only.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">Now for those who had not gone through the EC Form or just started to modify it, my adviced is to really go over the program thoroughly because SAP did provide us a EC/EA Form Breakdown List. You need not to modify it.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">Yet, that does not solve my problem because the EC Form still does not display the total amount of earnings, benefit and tax deductible. Thus I have to enhance the standard program. <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">That took me another few days to trace so i can find the best logical and reasonable point to make the enhancement. As you see, enhancement does not allow you to modify the standard program but you may add your coding at the top or bottom of a standard function without modify the mid section part. If you get my point, enhancement only allows addition of custom code at the top and bottom of the standard code. That is where i have to think where is the best part. Not to mention, that customized code should not affect other process too. It should be safe. So far my enhancement has not yield any justifiable complain that will lead to taking off the code. God knows if that happens!<br /><br /></span></div><div align="justify"><blockquote><em><span style="color:#666666;">Note : RPCTEAL0 is the original version given by SAP. RPCTEAL0_01 in this context is the new version given to the customer by SAP after a report was make to correct a certain mistake in the past.</span></em> </blockquote></div><div align="justify"><span style="font-family:arial;">So, in order to enhance the EC Form, there is this INCLUDE file named RCPTEAL3_01 that you can enhance to fullfil the request as above mentioned. RPCTEAL3_01 is an include file that do all the calculation process and also assigning of data to SAPScript. That is where you can modify it. In the process, the following are what i have done:<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">1. Enhancing subroutine FUELLEN : FUELLEN is a subroutine that will pass data to the SAPScript. This portion i put control to certain feature of the SAPScript to only display a specific format of PERNR(PNALT). <br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">2. Changing PERNR to display a concatenated version PERNR(PNALT) and pass it to FUELLEN.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">3. Changing DEPT to hold WERK/TEXT and KOSTL/TEXT and pass it to FUELLEN. Currently the DEPT field in SAPScript is left empty even though SAP did provided logic to determine it.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:arial;">4. Calculation of earnings and benefits from internal table IT_BLTAB and pass it to EC Form Breakdown List.<br /><br /></span></div><div align="justify"><span style="font-family:arial;"></span> </div><div align="justify"><span style="font-family:Arial;">For points 1 to 4, enhanced subroutine Fill_HD_TAB to cater the changes.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:Arial;">For points 1, enhanced subroutine FUELLEN to cater the changes.<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span> </div><div align="justify"><span style="font-family:arial;">SAPScript involves:<br />1. HR_MY_TAXECLM05Y - EC Form<br />2. HR_MY_TAXEABL007 - EC BreakDown List <br /><br /></span><span style="font-family:arial;"></div><div align="justify"> </div><div align="justify"> </div><div align="justify"><blockquote><em><strong><span style="font-size:85%;color:#336666;">IMPORTANT: You will need to open up your SAPScript EC Form to see what fields are displaying your value as you do your enhancement.</span></strong></em></blockquote><br /></div></span><div align="justify"><span style="font-family:arial;"><span style="font-size:85%;"><strong>is sky the limit...</strong> EC Form the best enhancement ever done so far....</span><br /></div></span>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com2tag:blogger.com,1999:blog-23207388.post-86317285364464948622007-05-17T23:35:00.000+08:002007-06-11T16:43:13.955+08:00SAP ECC6.0 : Payroll - Steps to create schema functions<div align="justify"><span style="font-family:arial;"><strong>Just like previous</strong> assignment in this <a href="http://isskythelimittechnical.blogspot.com/2007/04/sap-ecc60-payroll-driver-change-old.html">entry</a>, an additional 6 more functions to be added to the Payroll Driver Malaysia to validate existence:<br /></span><span style="font-family:arial;"><em><span style="font-size:85%;">- IT0003 (Payroll Status)<br />- IT0009 (Bank Details)<br />- IT0185 (Personnel IDs)<br />- IT0196 (EPF)<br />- IT0000 (BackDated Pay)<br />- IT0198 (Check if record exist)</span> </em><br /><br /></span><span style="font-family:arial;">When you need to create or add functions to payroll driver of a certain country, you will need to know three things and there are: </span></div><div align="justify"><span style="font-family:arial;"><br /></div></span><div align="justify"><span style="font-family:arial;"><strong>- <em><span style="color:#000066;">PE01 - Schema Directory<br /></span></em></strong><br /></div></span><div align="justify"><span style="font-family:arial;"></span></div><div align="justify"><span style="font-family:arial;">Schema directory allows you to include steps, constraints and functions to be group together (its like maintaining a group of belonging functions or steps). In a schema, it can have subschemas, processess and instructions. Schema directory must be created if you are customizing a new functions for standard payroll driver. PE01 does not only cater for payroll but time management too.<br /><br /></div></span><div align="justify"><span style="font-family:arial;"><strong>Steps to create a schema structure:</strong><br /><br /></div></span><div align="justify"><span style="font-family:arial;">Step 1: Enter a name e.g. ZTSW<br /><br /></span></div><div align="justify"><span style="font-family:Arial;"></span></div><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5074683720290547954" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_QmHghJr_hU0/Rmzl9O9gOPI/AAAAAAAAAA0/UVsRHcErj4w/s320/pe01+1+screen.JPG" border="0" /> <p align="center"></span><span style="font-family:arial;"><span style="font-size:85%;">Figure 1.0 : PE01 Main Screen</span> </span></p><p align="justify"><span style="font-family:arial;">Step 2: Click create to get into the schema attributes. <em>(<strong>Note</strong> : Choose country grouping accordingly to which payroll is being used. E.g. <strong>14 is for Malaysia</strong> because this example is using Malaysian payroll).</em></span></p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5074684557809170690" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_QmHghJr_hU0/Rmzmt-9gOQI/AAAAAAAAAA8/5weXqPT9A1M/s320/pe01+2+screen.JPG" border="0" /> <p align="center"></span><span style="font-family:arial;"><span style="font-size:85%;">Figure 1.1 : Schema attributes.</span> </span></p><p align="justify"><span style="font-family:arial;">Step 3: Choose <strong><span style="color:#660000;">program class</span></strong> either payroll or time management.</span></p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5074683166239766754" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_QmHghJr_hU0/Rmzlc-9gOOI/AAAAAAAAAAs/iqwAj4v_GXk/s320/pe01+3+screen.JPG" border="0" /></span> <p align="center"><span style="font-family:arial;"><span style="font-size:85%;">Figure 1.3 : Program class selection</span> </span></p><p align="left"><span style="font-family:arial;">Step 4 : Save and exit. <em>(<strong>Note</strong> : For the time being we go to PE04 to create functions before we come back to link both of them up)</em></span></p><em><span style="font-family:Arial;"></span></em><p align="left"><span style="font-family:arial;color:#000066;"><strong><em>- PE04 - Maintain Functions and Directories </em></strong></span></p><p align="justify"><span style="font-family:arial;">PE04 allows you to create functions/operations for either payroll or time management. This functions will be saved and enabled in the following program and link to the schema directory above. Thus completing your setting up of additional schemas to your payroll program.</span></p><p align="justify"><strong><span style="font-family:arial;">Steps to create function(s) in schema functions </span></strong></p><p align="justify"><span style="font-family:arial;">Step 1: create a new name e.g. zsub1.</span><br /></p><p align="justify"><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5074689088999667986" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_QmHghJr_hU0/Rmzq1u9gORI/AAAAAAAAABE/UHNZsHZM4qI/s320/pe04+1+screen.JPG" border="0" /></span></p><p align="center"><span style="font-family:arial;font-size:85%;">Figure 2.0 : Create a function</span></p><p align="justify"><span style="font-family:arial;">Step 2: Click create to go into characteristics of function payroll. Provide description and country assignment should be according to which country payroll are being run by the client.</span></p><span style="font-family:arial;"><img id="BLOGGER_PHOTO_ID_5074695144903555362" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_QmHghJr_hU0/RmzwWO9gOSI/AAAAAAAAABM/LpHqVuVClwc/s320/pe04+2+screen.JPG" border="0" /> </span><p align="center"><span style="font-family:arial;"><span style="font-size:85%;">Figure 2.1 : Choosing country assignment and description.</span><br /><br /></span></p><p align="justify"><span style="font-family:arial;"></span></p><span style="font-family:arial;">Step 3 : Click Save. (Note : Ensure your country assignment is selected correctly.)<br /><br /></span><p align="justify"><span style="font-family:arial;color:#000066;"><strong><em>- PCBURZMY0</em></strong></span></p><p align="justify"><span style="font-family:Arial;color:#000000;">After performing the above steps, you can start to insert functions into include program (PCBURZMY0) of main program (RPCALCL0). Additional functions of payroll schema/driver are added to PCBURZMY0. RPCALCL0 will go through each of the functions in PCBURZMY0 when payroll administrator runs payroll.<br /><br /><span style="font-size:85%;"><strong>is sky the limit</strong>... payroll driver... how-to</span></span></p>william wilstrothhttp://www.blogger.com/profile/13231002078454165216noreply@blogger.com0