We can help. Together we learn....

Suppose we have a standard SAP function module issuing an error message because of invalid input data. Now if we are calling this function module from any custom conversion program and such an error message is issued by the function module, the entire processing would stop and program would terminate displaying this error message. In case of a background job, it would also show an error and abruptly stop.

In order to handle such scenarios, we can provide an additional parameter in the function module exception called 'ERROR_MESSAGE' and give a sy-subrc value to it. This should be before the normal OTHERS parameter.

Now when the error is issued in the function module, the program doesn't terminate immediately. But the SAP function module returns with the SY-SUBRC value corresponding to the ERROR_MESSAGE exception.

Also the error message details can be found in the standard system message fields (SYST structure) and can be used by the custom program to populate any processing log / report.

3 comments:

  1. Malathy m on April 26, 2016 at 11:53 AM

    Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on SAP SD

     
  2. Ramya k on June 18, 2016 at 11:19 AM

    Thanks for the great information in your blogSAP SD Training in Chennai

     
  3. Bhavya Kumar on September 22, 2016 at 2:22 PM

    Great place to learn about the new things and got great knowledgeSAP MM Training in Chennai

     

Categories