Saturday, September 12, 2009
Moved To New Technical Blog
Thursday, August 13, 2009
SAP ECC6.0 : Associative attachment error...
Friday, August 07, 2009
SAP ECC6.0 : SO-DO (No Pricing Display)
1. Is it the print program that causes it?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?
2. Is it the upgrade that cause the print program to loose it mind?
3. Is there any difference between ECC6 standard print program and the customized one?
4. Did we forget to transport certain versions of the print program?
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!
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.
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!
All over again, but I had only question in mind as I race against time to get that root cause:
Where the hell happen?!
Who made the changes?
What changes was made?
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.
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. Furthermore, the quality system and production system still having the error. 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.
I will make use of the following :
1. USER EXIT->MV45AFZZ->USEREXIT_SAVE_DOCUMENT
2. A customized TABLE
3. Modified the PRINTPROGRAM
Before I go on to explain why I would use such crude way, it is best that you follow my trace below.
01. SAPFV45K->FV45KFKD_VBKD_BEARBEITEN->VBKD_BEARBEITEN
02. SAPMV45A->MV45AIAK_VBAK_FUELLEN->VBAK_FUELLEN
03. SAPFV45K->FV45KFKD_XVBKD_LESEN_DIREKT->XVBKD_LESEN_DIREKT
04. SAPFV45P->FV45PFAP_VBAP_BEARBEITEN_VORBE>VBAP_BEARBEITEN_VORBEREITEN
05. SAPFV45P->FV45PF0K_KALKULATION_BEARBEITE->KALKUlATION_BEARBEITEN_ENDE
06. SAPMV45A->MV45AF0B_BELEG_BEARBEITEN_ENDE->PREISFINDUNG_GESAMT_BELEG_ENDE
07. SAPMV45A->MV45AF0P_PREISFINDUNG_GESAMT->PREISFINDUNG_GESAMT->(38)
08. SAPMV45A->MV45AF0P_PREISFINDUNG_GESAMT->PRICING_COMPLETE(61)
09. SAPMV45A->MV45AF0B_BELEG_BEARBEITEN_ENDE->BELEG_BEARBEITEN_ENDE->(315)
10. SAPMV45A->MV45AF0B_BELEG_SICHERN->BELEG_SICHERN->NUMBER_GET_NEXT(654)->GET VBAK-VBELN
11. SAPMV45A->MV45AF0B_BELEG_SICHERN->BELEG_SICHERN->NUMBER_GET_NEXT(792)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!
1. A new SO no.2. A new KNUMV3. A table of determined pricing condition with no KNUMV yet.
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?
Tuesday, May 12, 2009
SAP ECC6.0 : IDOC stuck at status 30
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.
Tuesday, February 17, 2009
SAP R/3 : Constructing form with style
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.
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.
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.
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 Bold, Italics and Underlines and ending with forward slash tags >. Apart from using tags and SAPScript commands, you can use SAPScript STYLE to manipulate SAPScript templates.
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).
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.
7. Lastly, a good UNDERSTANDING of the flow and logic of the print program is important to FORM modification and FORM development.
Friday, January 16, 2009
SAP R/3 : QM BADI
CHANGE_AT_SAVECHANGE_BEFORE_UPDATECHANGE_IN_UPDATECHANGE_UD_AT_SAVECHANGE_UD_BEFORE_UPDATECHANGE_UD_IN_UPDATECREATE_AT_SAVECREATE_BEFORE_UPDATECREATE_IN_UPDATESET_UD_AT_SAVESET_UD_BEFORE_UPDATE
SET_UD_IN_UPDATE
is sky the limit... qm badi
Sunday, November 23, 2008
SAP R/3 : READ_TEXT and WRITE_TEXT
"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"
SPRO->IMG->TO CONFIG TEXT ID
Thursday, October 16, 2008
SAP R/3 : LOTUS Notes Receive .SCR File
SAP R/3 : Spelling Currency to Words
1. Call function 'SPELL_AMOUNT'
2. Call function 'HR_IN_CHG_INR_WRDS'
3. Customized a function to convert currency that is not supported by SAP
Saturday, September 20, 2008
SAP ECC6.0 : Proper customer table creation...
MANDT (this is to tell which data belongingto which client)KEY FIELD 1 - CHECK TABLE (it can be your required field)KEY FIELD 2 - CHECK TABLE (it can be your required field)...KEY FIELD nnon key field 1 - CHECK TABLE (it can be your required field)non key field 2 - CHECK TABLE (it can be your required field)...non key field nCHECKBOX 1 (optional)...CHECKBOX nCREATED ONCREATED ATCREATED BYCHANGED ONCHANGED ATCHANGED BY
Tuesday, September 16, 2008
SAP R/3 : ALV Limitation...
OSS Notes : 78401
SAP R/3 : Overcome ALV limitations...
I would normally recommend a few options:
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.
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.
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.
(Use SE41) 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:
Program : SAPLKKBL
Status : STANDARD*
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.
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.
SAP R/3 : GET PERNR or SELECT or PROVIDE...
Wednesday, May 14, 2008
SAP R/3 : Trailing The Pricing Condition
Put a break point accordingly to each of the path below:
1. SAPMV60A (Travel Here)
2. SAPLV60A (Travel Here)
3. SAPLV60A (Travel Here)
4. SAPLV60A (Travel Here)
5. SAPLV60A (Travel Here)
******>(INITIALLY JIN1 KWERT IS STILL 0.00)<br>
6. SAPLV60A (Travel Here)
******>(At this point, JIN1 KWERT WAS REINITIALIZE TO 0.22 -> Which We do not WANT!)<br>
7. SAPLV61A (Travel Here)
******>(How all 0.22 started)
8. SAPLV61A (Travel Here)
******>(91 - LOOP AT XKOMV - WHERE IT ALL HAPPEN!)
******> KSTEU and KMPRG (This is the two brothers that caused it!)
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.
is sky the limit... pricing procedures rocks!
SAP R/3 : User Exits in VF01
EXIT_SAPLV60B_002
EXIT_SAPLKBER_002
COPA_CALL_CUSTOMER_EXIT_KEAB04
EXIT_SAPLKEAB_003
SD_CIN_LV60AU02
EXIT_SAPLMCS6_000
EXIT_SAPLMCS6_999
EXIT_SAPLMCS6_001
BADI_SD_DOCUMENTFLOW
IDOC_OUTPUT_INVOIC
SDVFX010 - for those who wants to do something during SAVE
Tuesday, May 06, 2008
SAP R/3 : Sending Multiple PDF Invoice From Output Type
"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..."
The CLOSE_FORM function module will return a spool no when the SAPSCript has finish processing and display.
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.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.
is sky the limit.... print, converting and sending...
SAP R/3 : Tracing Outbound IDOC
Saturday, November 03, 2007
SAP R/3 : Payroll Detail and Field Symbol
Thursday, October 18, 2007
SAP R/3 : Transaction Codes
SCC1 - Transport Copy
RSTXSCRP - SAPScript Export/Import
is sky the limit... transaction codes
Wednesday, October 10, 2007
SAP R/3 : GUI_UPLOAD with # as SPACE...
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.
is sky the limit... split with ASCII 09... not #...