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

Re: [ABAP SQL] INSERT dbtab FROM TABLE itab ?

$
0
0

Moderator notice: the example here is NOT an example of best practice. Please read the discussion following and do not blindly follow this code.

 

HI Rachid Roughi

 


datalt_bseg_tmp type table of bseg. " records not inserted

data lv_count TYPE i.

loop at lt_bseg into ls_bseg.
INSERT bseg  fromls_bseg.
ifsy-subrc <> 0.
appendls_bseg into lt_bseg_tmp.
endif.

endloop.


DESCRIBE TABLE lt_bseg_tmp LINES lv_count.

Write:/ lv_count, ' Records could not be inserted'.
loop at lt_bseg_tmp into ls_bseg.

write:/ ls_bseg-BUKRS , ls_bseg-BELNR, ls_bseg-GJAHR, ls_bseg-BUZEI.

endloop.

 

Regards.

Ibr

 

Message was edited by: Matthew Billingham


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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