‎2009 Mar 27 9:01 AM
Hi gurus,
Good afternoon every one,
I need to collect qty field in workarea in vl01n Badi. some time user create delivery using batch splitup so i need to collect qty field. collect is not working with workarea. pls provide any solution to my issue.
for ex
LOOP AT IT_XLIPS INTO WA_LIPS .
COLLECT WA_LIPS INTO IT_LIPS..
ENDLOOP.
Thanks and Regards
G.Vendhan
Edited by: vendhan g on Mar 27, 2009 10:01 AM
‎2009 Mar 27 9:28 AM
Hi Vendhan...
Try this..
Create the internal table it_lips with only VBELN,POSNR and LFIMG.
LOOP AT IT_XLIPS INTO WA_LIPS .
wa_lips1-vbeln = wa_lips-vbeln.
wa_lips1-posnr = wa_lips-posnr.
wa_lips1-lfimg = wa_lips-lfimg.
COLLECT WA_LIPS1 INTO IT_LIPS..
ENDLOOP.
The above code should work.
Best Regards,
Pradeep.
‎2009 Mar 27 9:05 AM
HI,
Collect works only if all the Other Char fields have the same value then it sums the numberic fields.
So check all the char fields have the same value or not.
.
‎2009 Mar 27 10:01 AM
Thank u for reply,
Its possible to declare table with headerline in badi. Because i want to collect qty field in using internal table, i can t declare internal table inside method. i having the values in wa. kindly give solution.
Thanks & regards
G.Vendhan
‎2009 Mar 27 10:09 AM
Hi,
you cannot declare the table with headerline in the BADI. Just decalre the internal table without headler line.
try belo declaration..
DATA : ITAB TYPE STANDARD TABLE OF <Types>. --> Internal table without header line
DATA ITAB_LINE LIKE LINE OF ITAB. --> work Area
‎2009 Mar 27 10:16 AM
‎2009 Mar 27 9:28 AM
Hi Vendhan...
Try this..
Create the internal table it_lips with only VBELN,POSNR and LFIMG.
LOOP AT IT_XLIPS INTO WA_LIPS .
wa_lips1-vbeln = wa_lips-vbeln.
wa_lips1-posnr = wa_lips-posnr.
wa_lips1-lfimg = wa_lips-lfimg.
COLLECT WA_LIPS1 INTO IT_LIPS..
ENDLOOP.
The above code should work.
Best Regards,
Pradeep.