Application Development and Automation 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: 
Read only

Bapi and RFC

Former Member
0 Likes
783

Hi,

I have developed a custom function module which calls the bapi: BAPI_GOODSMVT_CREATE.

Before calling that bapi I do some verifications and I call the bapi

BAPI_PO_CHANGE to change the asset of the purchase order.

When I execute the function module (with transaction SE37) it modifies the

purchase order with the new asset and it does correctly the goods movement but

it doesn't inform the posting information of the asset. If I execute again the

function (there's no change in the asset this time) without leaving the screen

in transaction SE37 it happens the same (it doesn't inform posting info). But

if I leave transaction SE37, call it again and execute the function it informs

everything correctly.

Any idea of what is happening?

Thanks in advance.

Roser

4 REPLIES 4
Read only

Former Member
0 Likes
673

Hi caprabo,

1. It could happen because of implicit commit.

2. After executing a FM in se37,

and when we come out,

the screen changes, and hence commit automatically happens.

(So data is saved at that time)

3. OR We again run the fm, the screen changes,

and commit occurs.

4. This time, give commit work in your FM as the last statement, and try.

regards,

amit m.

Read only

Former Member
0 Likes
673

Hello Caprabo,

Execute the FM in Se37 like this.

In the initial screen of Se37 In the Menu Function Module>Test>Test Sequence. First give ur Fm and then BAPI_TRANSACTION_COMMIT and Execute.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
673

Hi,

use commit work after BAPI_GOODSMVT_CREATE in

your custom Function module

Regards

amole

Read only

Former Member
0 Likes
673

I've already tried with commit work and it doesn't work... I've 'BAPI_TRANSACTION_COMMIT' after bapi BAPI_PO_CHANGE and after bapi BAPI_GOODSMVT_CREATE.