Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: How to avoid commit if any error occurs in further processing

$
0
0

Hi,

 

Use the BAPI Commit outside loop.

 

for eg.

Loop..

     call BAPI..

     if returntable has error..

       lv_flag = 'X'.

        BAPI rollback back.

       exit.

     endif.

Endloop.

 

if lv_flag = X.

  idoc status = 51.

else.

  BAPI commit work.

  idoc status = 53.

endif.


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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