Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC error handling

Former Member
0 Likes
311

Hi EXPERTS,

I have a requirement in BDC.I have read five files from application server and upload it

using call transaction method.while uploading if there is any error i have record the error

description along with the file name and record that genrated error and send a mail

to a particular id.I dont know how to create error log details with the file name and record that genrated error.

Please Help.

Best Regards,

Noufal.P

1 REPLY 1
Read only

Former Member
0 Likes
278

Dear noufal,

Use the call transaction with message table addition.

DATA it_message type table of BDCMSGCOLL.

DATA wa_messafe like line of it_message.

CALL TRANSACTION 'XK01' USING BDCDATA MODE 'N'

MESSAGES INTO it_MESSage.

loop at it_message into wa_message where msgtyp = 'E'.

"use format_message FM.

append your error table here with the filename as one column and other columns needed

with the message.

endloop.

You can use FM 'SO_NEW_DOCUMENT_SEND_API1' to send mail

the FM documentation has a sample code for it.