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: 

BAPI_TRANSACTION_COMMIT along with CALL FUNCTION BAPI_PO_CHANGE DESTINATION 'NONE'

Former Member
0 Kudos

Hi All,

I need a little clarification on the use of BAPI_TRANSACTION_COMMIT.

We have a custom program which updates lot of POs sequentially using BAPI_PO_CHANGE and then calls BAPI_TRANSACTION_COMMIT(for each call)

After the support pack upgrade recently, we are getting a erratic dump 'OBJECTS_OBJREF_NOT_ASSIGNED' from this custom program

We checked the Note 2406654 - Strange behavior when calling different BAPIs in a
custom program, the note recommends to use DESTINATION 'NONE' clause along with MM BAPIs to prevent the dump.

I understand DESTINATION 'NONE' will invoke a implicit commit, and so, is it safe to call BAPI_TRANSACTION_COMMIT after the BAPI_PO_CHANGE DESTINATION 'NONE' ?

Regards,

Arunkumar C N

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

If only standard SAP BAPI are called, yes it's safe. Usually such implicit commit can only mess with data in customer program which executed some open-sql statements.

5 REPLIES 5

raymond_giuseppi
Active Contributor

If only standard SAP BAPI are called, yes it's safe. Usually such implicit commit can only mess with data in customer program which executed some open-sql statements.

Chintu6august
Contributor
0 Kudos

Hello,

yes its safe to use BAPI_TRANSACTION_COMMIT

as DESTINATION 'NONE'.

it pushes the execution of a RFC/ BAPI in a new separate session and need to explicitly close that session so that all relevant database commits are actually triggered before continuing.

BAPI_TRANSACTION_COMMIT is called to COMMIT a database operation as commit has to take place in remote work process.

As we can not write COMMIT WORK statement after BAPI, we need to call BAPI_TRANSACTION_COMMIT is used to update the database after all the transactions in a LUW are completed successfully.

for more details refer the following link

https://wiki.scn.sap.com/wiki/display/ABAP/BAPI_TRANSACTION_COMMIT+versus+COMMIT+WORK

thank you!!

As we can not write COMMIT WORK statement after BAPI, we need to call BAPI_TRANSACTION_COMMIT is used to update the database after all the transactions in a LUW are completed successfully.

We cannot or we should not? There's a difference ...

0 Kudos

should not

omer_sakar
Participant
0 Kudos

Hi,

While Calling RFC with DESTINATION 'NONE',consider attached part of document on link : https://www.virtualforge.com/tl_files/web/Theme/Presentations/BIZEC14_SAP_Security_beyond_authorizat...