11-02-2006 8:17 PM
Someone at my current client is testing "BAPI_ACC_GL_POSTING_POST" in SE37 and getting a successful completion message.
Document posted successfully: BKPFF 310600001120002006 BFSBFS030
But he's worried that when he goes to SE16, he doesn't see the new document in BKPF/BSEG.
Isn't this because the actual "commit" must be handled outside of the BAPI call in an actual program environment? (So in effect, the SE37 test is only a simulation ????)
Could someone authoritatively confirm this or tell me what else is causing this result ????
11-02-2006 8:23 PM
That's the problem. You have to do an explicit commit.
You can do this in SE37, by going to the menu at the entry screen and selecting
Function module -> Test -> Test sequences
and then entering BAPI_ACC_GL_POSTING_POST followed by BAPI_TRANSACTION_COMMIT.
Rob
Message was edited by: Rob Burbank
11-02-2006 8:23 PM
That's the problem. You have to do an explicit commit.
You can do this in SE37, by going to the menu at the entry screen and selecting
Function module -> Test -> Test sequences
and then entering BAPI_ACC_GL_POSTING_POST followed by BAPI_TRANSACTION_COMMIT.
Rob
Message was edited by: Rob Burbank
11-02-2006 8:58 PM
Rob -
Thanks very much - the point is made quite clearly on p 418 of Matzke's ABAP/4 book but I thought it would be good for the client to see some "independent" confirmation.
Dave
11-02-2006 8:27 PM
Hi,
Most BAPI's need an external COMMIT/ROLLBACK to save the actual work done by the bapi.
Programmatically, you can handle this after the bapi call and based on the sy-subrc or return paramters.
To do the same from SE37, there is a special procedure to follow. From SE37 Screen follow the menu path:
Function Module -> Test -> Test Sequence.
This will display a popup. Here you need to enter the name of the BAPI you are testing (BAPI_ACC_GL_POSTING_POST) and also the bapi to commit, which is BAPI_TRANSACTION_COMMIT. And then test it. This will post your FI doc and also commit it in the same LUW.
Hope this helps,
Sumant.
11-02-2006 8:59 PM
Hi Sumant - Since Rob was chronologically first, I gave him the points, but I'm emailing Craig to ask him to give you 10 also, since yours was only 4 minutes after Rob's.