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
889

How errors can returnd in RFC?

3 REPLIES 3

Former Member
0 Kudos
72

Hi,

You can define them in Exceptions & raise them appropriately.

Regards,

Nameeta

former_member181962
Active Contributor
0 Kudos
72

You have to declare a tables parameter of type bapiret2 and appropriately fill it in case of errors.

See any bapi to know how to do it.

Regards,

Ravi

Former Member
0 Kudos
72

Hi,

Define your function module call as follows:

For example:

*--- Call RFC to check commitment

CALL FUNCTION 'BBP_ACC_PURCHASE_REQUI_CHECK'

DESTINATION LW_DESTINATION

TABLES

PURCHASEREQUI = T_ACCPR

RETURN = RETURN

EXCEPTIONS

COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT

SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT

OTHERS = 3.

MSG_TEXT is populated with any errors.

MSG_TEXT is defined as DATA: MSG_TEXT(80) TYPE C.

Cheers

Colin.