How To Email Short Dump Details Upon Encounting Exception
Submitted by Anonymous (not verified) on Sat, 06/23/2018 - 17:30
Venkat
Dear Jimbo,
Request you to kindly provide me the logic on the below issue.
Mail needs to be triggered to the user immediately with the short dump details if encountered short dump while executing the LSMW.
Best regards
Venkat
Duration:
1 month
Comments
Send Email With Details Of Short Dump Upon Encounting Exception
Hi Venkat,
I would put the code throwing the exception in a TRY-CATCH-ENDTRY block and then email the values to the user. Here is some sample code and a link to an snippet of code for sending email from LSMW using ABAP.
data: OREF type ref to CX_ROOT,
it_MAILTXT TYPE STANDARD TABLE OF SOLI WITH HEADER line.
TRY.
'***** Put buggy code here. *****
catch CX_ROOT into OREF.
it_MailTxt = OREF->GET_TEXT( ). append it_MailTxt.
perform SendEmail tables it_MailTxt using 'recipient@server.meh' 'LSMW Short Dump Details'.
endtry.
Snippet of code to send email.