‎2006 Aug 28 8:04 PM
Hey friends,
I am developing BDC for MM01,using call transactions.How do i handle errors in it? i need to select the error files and give an email to the users that these were the material number that failed.
Then those errors along with the other new materials to be created should be processed the nextday.
Please give me an idea to proceed with this.
Thanks in advance
Rinky.
‎2006 Aug 28 8:18 PM
I am assuming you are reading your current file into an internal table, then loop at it, prepare BDC and call transaction. You can implement a logic like below.
loop at file_recs.
.....
.....
prepare bdc data.
.....
.....
call transacton ... messages into bdcmsgcoll_tab.
read table bdcmsgcoll_tab with key msgty = 'E'.
if sy-subrc = 0.
*-- error occured
move file_recs to error_recs.
if first_error_rec = 'Y'.
open dataset errorfile....
endif.
transfer error_recs to errorfile.
endif.
....
....
endloop.