Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

raise exception in function module call from SAP owned program

Former Member
0 Likes
348

I need to raise an exception in a function module to terminate a transaction, display a error message and return to to previous selection screen so the user can fix the error before moving forward.......

How do you do this when the program using the function module is SAP owned?

Thank You!

Jeff

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
326

Hi,

After calling the function module, you can do something like this.


IF SY-SUBRC <> 0.
  RAISE EXCEPTION.
ENDIF.

Regards,

Ferry Lianto

1 REPLY 1
Read only

ferry_lianto
Active Contributor
0 Likes
327

Hi,

After calling the function module, you can do something like this.


IF SY-SUBRC <> 0.
  RAISE EXCEPTION.
ENDIF.

Regards,

Ferry Lianto