cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_TRANSACTION_COMMIT in Business Connector

Former Member
0 Kudos

Hi,

I am moving business partner master data into CRM via the business connector, using BAPI_BUPA_CREATE_FROM_DATA. This BAPI requires a 2nd BAPI: BAPI_TRANSACTION_COMMIT as a closing step. However, the BuPa is not saved in the database.

The 1st BAPI returns without errors and a business partner number. The 2nd BAPI is called with WAIT = X.

I think the problem is that the second BAPI is called in another LUW or session. I also tried using a sequence, but still the error occurs.

Can someone help me?

Accepted Solutions (0)

Answers (3)

Answers (3)

krzysztof_konitz4
Contributor
0 Kudos

Hi,

You can also try:

1. pub.sap.client:createTID and assign created tid to variable $tid

2. INVOKE sap.map:outbound for your BAPI and assign created tid in step 1 to parameter $tid

3. pub.sap.client:confirmTID and assign created tid in step 1 to parameter $tid

It should work.

Krzys

Former Member
0 Kudos

Hi Toine,

You should try adding service pub.sap.client:lockSession before you call the BAPI BAPI_BUPA_CREATE_FROM_DATA. Then you call the BAPI_TRANSACTION_COMMIT and the last step is to call pub.sap.client:releaseSession.

This worked for me.

Former Member
0 Kudos

Thanks a lot,

the solution with lockSession and releaseSession worked fine!

Message was edited by: Toine Pothuizen

gregorw
Active Contributor
0 Kudos

Hello,

the simplest solution is to write a Z- RFC enabled Function moduls which call both: BAPI_BUPA_CREATE_FROM_DATA and BAPI_TRANSACTION_COMMIT. And has the interface of BAPI_BUPA_CREATE_FROM_DATA.

Regards

Gregor