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

BDC

Former Member
0 Likes
307

How does a BDC program get to know no of line item for a particular Sales Order?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
290

Hi,

in bdc

you will be having an indicator of header and line item

in your flat file

so take all the H lines into header internal table

and take the H as indicator and maintain a small number to differentiate the sale order header and put the line items in the another internal table

so after that

sort the itab

loop at item.

at end of item-itemfield.

l_count1 = l_count.

l_count = sy-index.

l_count = l_count - l_count1.

here l_count will be no of line items in first order.

endat.

endloop.

regards,

Venkatesh

1 REPLY 1
Read only

Former Member
0 Likes
291

Hi,

in bdc

you will be having an indicator of header and line item

in your flat file

so take all the H lines into header internal table

and take the H as indicator and maintain a small number to differentiate the sale order header and put the line items in the another internal table

so after that

sort the itab

loop at item.

at end of item-itemfield.

l_count1 = l_count.

l_count = sy-index.

l_count = l_count - l_count1.

here l_count will be no of line items in first order.

endat.

endloop.

regards,

Venkatesh