09-08-2008 5:48 AM
I want to capture the information for my delivery, e.g. qty when user do a PGI.
So I tried the user exit "MV50AFZ1".
When I debug into the program, I can see the data I want from LIPS and LIKP. As I may have 2 item in my delivery order, so I have to loop LIPS, however, I found that the syntax
"loop at lips" does not work, also when I try to see the data from lips[1], SAP said LIPS is not an internal table.
Can anyone tell me how I can retrieve the data from LIPS when I got more than 1 item in the document?
Thank,
Vicki
09-08-2008 5:58 AM
09-08-2008 5:52 AM
Hi,
Welcome to SDN.
Before all this, Please go through the [Internal table Concept|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/frameset.htm] and also [Open SQL Concept|http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3969358411d1829f0000e829fbfe/frameset.htm] perfectly.
Regards,
Swapna.
09-08-2008 5:55 AM
Hi,
At runtime, LIKP structure would have only a single value. Which means if there are multiple items, then the exit would be called multiple times.
So move the data to an internal table. Dont loop over LIKP.
LIKP-zzfield = xxxx-zzfield2.
move-corresponding LIKP to wa_data.
Append wa_data to gt_data.
Best regards,
Prashant
09-08-2008 5:58 AM
09-08-2008 5:59 AM
Hi,
Use " loop at xlips " instead "loop at lips".
You will find the line items for the document.
Regards,
Raju.
09-08-2008 6:04 AM
In which form your are doing all this?
May be you need to code in FORM USEREXIT_READ_DOCUMENT
Amit.