Application Development 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: 

Error handling in RFC

Former Member
0 Kudos
93

Hi all,

how do we trap errors in a normal RFC?

Thanks

Nazmul

3 REPLIES 3

Former Member
0 Kudos
44

you can RAISE EXCEPTION .

Just put exception name in EXCEPTION tab in function module.

by putting condition in coding u can RAISE EXCEPTION.

Ex

IF <condition>

Your code

Else.

RAISE EXCEPTION <exception name> "Which used in tab page

Endif.

Reward Point if find useful.

Regards,

Swarup

Former Member
0 Kudos
44

Hi,

Call function 'RFC name ' Destination 'destination name'

exproting

....

tables

....

exceptions

communication_failure = 1

...................... = 2.

these exception, you have to defina in your RFC.

regards

Rams

Edited by: ramesh on Jun 27, 2008 8:23 AM

Former Member
0 Kudos
44

Hi,

Call function 'RFC name ' Destination 'destination name'

exproting

....

tables

....

exceptions

communication_failure = 1

...................... = 2.

these exception, you have to defina in your RFC.

In your code write like :

if sy-subrc ne 0.

CASE SY-SUBRC.

WHEN 1. MESSAGE E600 WITH NAME ID LANGUAGE RAISING XXXXXXXXXXXX.

WHEN 2. MESSAGE A020 RAISING XXXXXXXXXX.

ENDCASE.

regards

Rams

Edited by: ramesh on Jun 27, 2008 8:23 AM