04-10-2018 9:40 AM
Hi there,
Is there a way to capture an error message or at least make it not break the program flow ?
BDC solution is not an option.
Scenario:
REPORT ZPROG_1.
FORM test.
message e001(00).
ENDFORM.
REPORT ZPROG_2.
PERFORM test(ZPROG_1).
WRITE: / 'I would like to continue here'.
Cheers,
Bart
04-10-2018 10:35 AM
Hi Bart,
You can use the a TRY CATCH block to solve this problem, the links bellow can help you:
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abaptry.htm
Best regards,
Salah.
04-10-2018 12:22 PM
04-10-2018 12:24 PM
Best solution: refactor the external program so that the application logic can be run directly. I.e. put the application logic into a class.
Not the best solution: Encapsulate the external program call in an RFC enabled function module. Then use
CALL FUNCTION... STARTING NEW TASK... CALLING method ON END OF TASK.
04-16-2018 10:47 AM
message E always Ends the program.
you can message I Display like E.
or :message E into "variable"
Write: /"variable"
regards
04-17-2018 11:37 AM
Message type E will always break the current processing .
You can come up with either solutions
1) change type to 'S' or 'I' and display like 'E' if you want to show it.
2) if you want to capture you can use "Message with Into " clause.
Regards
himanshu