Skip to Content
avatar image
Former Member

BAPI_ACC_DOCUMENT_POST function nothing posts

Hi,

I am trying to post a document of type DR (simulating transaction FB70) using BAPI_ACC_DOCUMENT_POST function.

The function returns success code (605) and the message that document was successfully posted but indeed it is not in the database. I have tried to call this BAPI from ABAP program and from non-SAP system using RFC enabled wrapper function that calls this BAPI. I need this wrapper function in order to perform some checking routines before calling BAPI. The result was the same. I have tried to debug the code. There are a lot of calls to functions in update mode in BAPI_ACC_DOCUMENT_POST function logic but I was unable to find the commit work statement. It seems, that changes were not committed to the database.

Any help would be very appreciated.

Regards,

Gediminas

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Mar 03, 2004 at 06:23 PM

    In most BAPIs you have to implicitly trigger the Commit Work by calling BAPI_TRANSACTION_COMMIT. The following is from the online help for this function:

    FU BAPI_TRANSACTION_COMMIT

    ____________________________________________________

    Short text

    Execute external Commit when using BAPIs

    Functionality

    This method executes a COMMIT WORK command. It is required for transactions developed externally to the R/3 System that change data in the R/3 System via BAPI calls.

    When you call BAPIs in your program that change data in the R/3 System, afterwards you must call this method to write the changes to the database.

    Notes

    Messages are returned in the parameter 'return'. This parameter documentation contains the return codes and their descriptions.

    Further Information

    Use the method BapiService.TransactionRollback to prevent changes to the database being committed.

    Add comment
    10|10000 characters needed characters exceeded