Skip to Content

BAPI_TRANSACTION_COMMIT along with CALL FUNCTION BAPI_PO_CHANGE DESTINATION 'NONE'

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 16, 2017 at 10:33 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 16, 2017 at 10:45 AM
    -1

    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!!

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 16, 2017 at 02:37 PM

    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_authorizations.pdf

    Add comment
    10|10000 characters needed characters exceeded