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: 

Testing the BAPI "BAPI_ACC_GL_POSTING_POST in SE37

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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.