‎2012 Dec 20 11:03 AM
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
‎2012 Dec 21 6:22 AM
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.