Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Best way to process line items in an internal table?

$
0
0

Hiya,

 

I have an internal table that's has columns:

 

EBELN - Document number

EBELP - Document Item

Quantity

Price
Other data,

blah, blah, blah

 

Now I would like to process this internal table so that each Document and its items are processed together.

So I was thinking I would need to split them out.

 

I was thinking of doing something like this:

 

Loop at itab into wa_itab.

if sy-tabix = 1.

     Append wa_itab to another_itab.

     Continue.

endif.

if wa_itab-ebeln = another_itab-ebeln.

     continue.

else.

     Process all the items for the document via another_itab.

     clear another_itab.

endif.

Endloop.

 

Would that be okay or is there a better way of doing something like this?

Thanks for any input.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>