Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

advise on catch

Could someone please explain the concept or

message e100 raising XXXXX

aand the concept of calling a FM and if an exception is raised catch it . (how do you catch that???)

Tags:
replied

Hi..

An exception arises in a FM when sy-subrc is NE 0.

so after the calling of FM....chk for the condn sy-subrc <> 0.

This will catch ur exception, and the message defined in the FM will be displayed

Uncomment your exception part in the FM and add this

 IF SY-SUBRC NE  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

where SY-MSGV1 SY-MSGV2 .....depends on the no. of exceptions defined by the FM

Regards

Winnie

Edited by: Winnie Clarence on Oct 7, 2008 12:11 PM

Edited by: Winnie Clarence on Oct 7, 2008 12:15 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question