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

Problem in fetching line items based on header record

$
0
0

Hi Experts,

   

       itab1 is header table & itab2 is line itam table.we dontknow how many entries in both the

tables.Here for each header i need to pick max 9 line items(morethan 9 line items not

supportd for FM) then i need to pass these header and 10 line items to FM...

 

          But at the end of the below process still there some line items remaining in the itab which are not

processed...

 

sort itab1 by key1.                                              "(itab1 is header table)

sort itab2  by key1.                                            "(itab2 is line item table)

 

loop at itab1 into wa1.

           loop at itab2  into wa2 where key1 = wa1-key1.

           append wa2 to itab3.

           if sy-tfill eq 9.

              delete itab1 from index 1 to 9.

              call <..function module...>

              {

                  wa1 & itab3(9 line items)            "here our fm supports max 9 line items eventhough

                 }                                                        " if we have  100 line items for heade1 in itab1

            endif.

           endloop.

endloop.

 

 

                                  Please help me ...thanks in advance....

 

 

 

 

Regards,

kranthi


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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