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: 

Problem with BAPI_TRANSACTION_COMMIT

Former Member
0 Kudos

Hello all,

I am running into a issue here and hope someone can help me figure out what's goin on here. I have a custom report with BAPI for goods movement called twice inside this program. BAPI structure inside my program is something like this.

BAPI_GOODSMVT_CREATE

BAPI_TRANSACTION_COMMIT

BAPI_GOODSMVT_CREATE

BAPI_TRANSACTION_COMMIT

This program is working fine when I run it individually but my issue is when I call this program from a custom function module by using 'CALL TRANSACTION' statement, the control jumps out of the custom program after first BAPI_TRANSACTION_COMMIT statement. I am wondering why this is happening. Any thoughts are much appreciated. Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Call transaction terminates when it encounters a COMMIT when you are using "USING bdcdata" option. Now if you want to bypass this, you will have to also use "OPTIONS FROM opt" and set RACOMMIT = 'X' to avoid commit terminating the call transaction.

6 REPLIES 6

Former Member
0 Kudos

Call transaction terminates when it encounters a COMMIT when you are using "USING bdcdata" option. Now if you want to bypass this, you will have to also use "OPTIONS FROM opt" and set RACOMMIT = 'X' to avoid commit terminating the call transaction.

former_member194669
Active Contributor
0 Kudos

Instead of using call transaction to your program try to use SUBMIT your program AND return.

0 Kudos

Hello Srinivas,

That was very helpful. Infact I am using CALL TRANSACTION using "using BDCDATA". I will give your suggestion a try and award full points accordingly.

a@s,

Thanks for your suggestion. The reason I am using CALL TRANSACTION with BDCDATA is I need to call my program in foreground meaning user has to manually input few more values on the selection screen of my program once it is called. Your suggestion would call my program in background and it would not let the user to enter any input values on my program selection screen. So I do not think SUBMIT would work in my case.

Thanks guys.

0 Kudos

Adrian,

If you are using SUBMIT ·.. VIA SELECTION-SCREEN then user can fill the selection screen

Please check this link

http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm

0 Kudos

You can use SUBMIT VIA SELECTION SCREEN, if you need your user to enter selections in your program.

0 Kudos

Thanks guys. RACOMMIT = 'X' solved my issue.