‎2007 Sep 13 12:27 PM
How does a BDC program get to know no of line item for a particular Sales Order?
‎2007 Sep 13 12:33 PM
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
‎2007 Sep 13 12:33 PM
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