10-07-2008 10:56 AM
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???)
10-07-2008 11:03 AM
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
10-07-2008 11:03 AM
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
10-07-2008 11:09 AM
To add a little bit to the previous answer. You will have to add an EXCEPTIONS part to the CALL FUNCTION command to be able to catch the exceptions in your program. You will also have to code the display of the message yourself.
Hope this helps,
Gert.