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

How to raise the exception in function module

Former Member
0 Likes
783

Dear abaper's.

I am creating a Function module .In that in' EXCEPTION' Tab i am giving

3 exception .1.NO_DATA_FOUND 2.NO_PRINTER_FOUND 3.SMARTFORM_INTERFACE_NOT_FOUND.

In my coding if this condtion matches i want to raise this exception.how can i do this in my coding .can any one suggest me..

advance thanks,

Warm regards,

Veera

6 REPLIES 6
Read only

Former Member
0 Likes
731

Hi

after calling the function module

check/write

if sy-subrc <> 0

RAISE EXCEPTION.

endif.

Reward points if useful

Regards

Anji

Read only

Former Member
0 Likes
731

Hi,

if condition.

raise exception_name.

endif.

rgds,

bharat.

Read only

Former Member
0 Likes
731

Hi,

IF <your field check> NE <your condition>

RAISE <exception name>.

ENDIF.

Read only

0 Likes
731

DEAR ABAPERS,

how can i see that exception, when iam excuting

Regards,

veera

Read only

0 Likes
731

Hi,

if that condition is not satisfied,and u didn't handle that exception while calling function module then in the runtime error u will get the text as the description of the exception in function module definition.

rgds,

bharat.

Read only

0 Likes
731

Hi

when you execute the code, if that condition failed,

the respective exception is raised and displayed.

Reward points if useful

Regards

Anji