‎2011 Sep 03 12:29 AM
Hello all,
I use this function in a loop and i process some records with this fm from my internal table. But when a record is wrong, It gives type 'E' error and stops program. I want to process all lines of my records without stopping and after that i will show them in alv with the errors if they have. In exceptions part of this FM, i used : ERROR_MESSAGE = 1 and it helped me to continue processing but i cant collect error messages. How can i collect the error messages for this FM?
I tried to use MESSAGES_INITIALIZE and MESSAGES_GIVE but i coulnd succeed.
Anyone has ideas? maybe i used these fm's wrong.
‎2011 Sep 03 5:14 AM
Hi,
It is having 3 exceptions and also there no specific text for these. You have to manage based on the exception no.
http://help-abap.blogspot.com/2008/10/function-module-exception-handling.html
http://www.sapgeek.net/2011/03/abap-programming-exception-handling/
Once you get the error, don't message statement capture the error details to your Work area and modify the ALV ITAB.
If you display the message using message details and message type as 'E' it will stop further processing.
Shiva
‎2011 Sep 07 2:13 PM
Hello,
I dont think it is about the exceptions part. The FM is giving the error with type 'E' message inside the FM.
I even cant debug till the end of this FM. the message appears on the screen and bapi stops and also my loop stops.
In the exceptions part: if i write message_error = 1. the error message doesnt appear and bapi finishes with sy-subrc = 1.
But in this case i cant read the message text.
‎2013 Aug 13 5:03 PM
I am having a similiar issue. Using MESSAGES_INITIALIZE suppresses a message like FICUSTOM175 thrown as a warning; but message FH004 thrown as an error still halts processing.
‎2019 Jun 24 3:15 PM
Create a Z copy of FMFR_CREATE_FROM_DATA, RFC enable the FM and then call it using destination of your local/own logical system. This will complete the call to the FM and return the error in the system variables.