cancel
Showing results for 
Search instead for 
Did you mean: 

Using of BAPI_TRANSACTION_COMMIT in BPM

Former Member
0 Kudos

Hi,

I have a scenario where I will be changing salesorder using BAPI_SALESORDER_CHANGE and as we know it will not commit automatically. So I am trying to call BAPI_TRANSACTION_COMMIT synchrnously in BPM after first bapi.... I see that still the values are not getting updated. Is calling commit bapi in BPM directly works?

Could any one help me to solve this issue?

Thanks,

Yaseen Mahammad.

Message was edited by: Yaseen Mahammad

Accepted Solutions (0)

Answers (2)

Answers (2)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

if you don't have SP14 then you cannot call BAPI directly

you have to use a bapi wrapper

in which you call original bapi and BAPI_TRANSACTION_COMMIT

Regards,

michal

Former Member
0 Kudos

Hi Yaseen,

Please can you look at the following paramter of the Receiver RFC adapter: Commit Control for Individual BAPI Calls

If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.

From SAP HELP:

If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.

The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values “”, “S”, “I”, and “W” are displayed. All other values are regarded as errors.

To change this setting, set the indicator BAPI Advanced Mode.

In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

I am using autocommit by checking the coomit handling or single BAPI calls option. I also checked the 'send confirm transaction'. In our interface, even though we are executing the BAPI_PO_CREATE1 with errors, the synchronous message is sending back as 'PO created successfully'. But, in fact it is calling the BAPI_TRANSACTION_ROLLBACK. Is there any option where we can set the indicator so that the XI sends the message only after it knows that BAPI_TRANSACTION_COMMIT is called?

Please help.

Kalyan

Former Member
0 Kudos

Hi Kalyana,

I have tried with same BAPI_PO_CREATE1 and it is commiting to the database.

If you want to control at the commit level then you will have to use a wrapper RFC whein you call a COMMIT WORK BAPI.

Regards

Vijaya

Former Member
0 Kudos

Vijaya,

thanks for the quick reply. I am able to commit the transactions also. But this one time, I got the transaction rollback runs, but the XI sends message to webservices saying that the PO create is successfull. Can you explain me how to use the wrapper in this case? Can I use the BAPI Advanced mode to create the messages and use them to send messages only after the commit transaction is called? By the way, this is not BPM I am using.

Thanks for your help.

Kalyan

Message was edited by: kalyana veerapaneni

Former Member
0 Kudos

RWB will show BAPI rollback Error , only when BAPI called in Asynchronous Mode. If there is a BAPI Error, RWB will go into WAIT mode and eventually System Error.

Former Member
0 Kudos

Prasad,

I am using synchronous call.