Question:
Hi,
I am new in SAP ABAP. I am learning BDC.
I have populated messages into internal table of type BDCMSGCOLL
in call transaction method.
i.e
call transaction 'xxx' using bdcdate messages into itab.
now i want to know to which record their r errors.
what should i do to get records with errors and appropriate messages.
and how to run bdc in to background.
anyone experienced please guide me and tell me how bdc's are done in real time.
Answer:
Hi,
The error messages for you records are stored in the itab you put in the MESSAGES INTO addition. You only have to look for entries in the itab with field msgtyp = 'E' (or 'W' for warnings) and then look at fields msgv1, ..., msgv4 for the message.
When you talk about runing the BDC in background i assume you are talking about not-visible mode.... if so, the you should use the OPTIONS FROM <it_opt> addition and set <it_opt>-dis_mode='N'.
Hope it helps,
mr.
Answer:
Hi,
Thanks a lot for kind reply. But how can i get the record for which error
has occured so that i can correct them.
Answer:
most often the document number is in the error message as one of the MSGV1 through MSGV4 fields that mr mentioned earlier. In order to get a good feel for the messages in the table you might try running it in foreground once putting a breakpoint at your next statement (which should be a statement checking the return code) after your call transaction. Then look in the table to find the message and data that you are looking for.
KeithS