Hi all,
here is the scenario:
I'm writing a program which post some kind of documents into SAP based on a flat input file with data. To post the document I'm using a complex function module. Results from post are tracked into some log-file.
Problem is:
Sometimes, due to incorrect input data, function module returns an error messages directly into a system line, but not in an output message from the FM. That brokes my flow and I'm unable to proceed with next record from my flat file.
Question is:
Is it possible to prevent error message occurance into a system line? I would like to get the error, if possible, and to pass it to my log-file instead.
Any help would be highly appreciated.
Many thanks in advance.
Regards,
Ivaylo
If it raises an exception you can catch it.
cx_root is the root class for exceptions.
DATA: ex TYPE REF TO CX_ROOT.
TRY.
call fm.
...
CATCH cx_root INTO ex.
ENDTRY.
message = cx_root->get_text( ).
-
If it helps please give points.
You might want to try calling that function module in background task or in separate task. Otherwise, I don't think you can skip that error messages that does not raise exception in the function module you call.
Anand:
Pleae mail to me also.
id : suresh_karan@rediffmail.com
Thanks in Advance
Suresh Babu Karanam
Add a comment