Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8540

Re: insert lines of internal table into another internal table for particular position wrt 'TAO'

$
0
0

Do you have same structure for both tables? If yes, then do something like this:

 

DATA : lv_index TYPE sy-tabix.


LOOPAT t_final INTO wa_final WHERE pstyv = 'TAO' AND <ADD CONDITION TO SKIP NEWLY ADDED RECORDS>.

lv_index = lv_index + 1.

LOOP AT t_final2 INTO wa_final2 WHERE vbeln = wa_final-vbeln and posnr =                     wa_final-posnr.

  INSERTwa_final2 INTOTABLE t_final index lv_index.

  lv_index = lv_index + 1.

ENDLOOP.

ENDLOOP.




Viewing all articles
Browse latest Browse all 8540

Trending Articles



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