Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

collect workarea fields value

Former Member
0 Likes
581

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
546

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.

5 REPLIES 5
Read only

Former Member
0 Likes
546

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.

.

Read only

0 Likes
546

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

Read only

0 Likes
546

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

Read only

0 Likes
546

Thank u pradeep,

i got it.

Regards

G.Vendhan

Read only

Former Member
0 Likes
547

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.