cancel
Showing results for 
Search instead for 
Did you mean: 

Multiline BAPI return structure and RFC Adapter

Former Member
0 Kudos

Since SP14 RFC Adapter check return structure of RFC function.

But how it works if BAPI returns multiline BAPIRET2?

Will adapter loop all elements and perfom commit only if <b>all</b> alements don't have errors.

Accepted Solutions (0)

Answers (1)

Answers (1)

STALANKI
Active Contributor
0 Kudos

RFC adapter does not take care of the data validation details.BAPI at your other end will take care of it.

Generally if we take the normal functionality of BAPI might not commit until there are no errors...

Former Member
0 Kudos

I'am about this:

<i>As of SP 14 support for commit handling for single BAPI calls was added to the RfcAdapter receiver channel. If activated in the receiver channel setting, the received XI message will be executed as synchronous RFC (sRFC) in the receiving system. This is also true for asynchronous (QoS EO) XI messages to receive and analyze the execution result by the RfcAdapter.

The received response is parsed by the RfcAdapter to get the BAPI return parameter with name "RETURN". This return parameter can be of BAPIRETURN, BAPIRET1 or BAPIRET2 types. The "RETURN" parameter is checked for the response status (field TYPE) which can take following values:

1. 'S' : Success

2. 'I' : Information

3. 'W' : Warning

4. '' : Empty String

5. 'A' : Abort

6. 'E' : Error

If the response contains one amongst the first four response status then it implies that the BAPI was successful. If the response contains one amongst the last two response then the BAPI failed. If the BAPI "RETURN" parameter is of not of type ABAP structure rather of type ABAP table, a empty table is also considered as successful execution result.

In case of a successful execution the BAPI function module "BAPI_TRANSACTION_COMMIT" is called within the same context to trigger the commit of the BAPI. In case of a failure the BAPI function module "BAPI_TRANSACTION_ROLLBACK" is executed by RFC Adapter which rolls back the changes.</i>