‎2006 Oct 17 9:54 AM
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
‎2006 Oct 17 9:57 AM
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.
‎2006 Oct 17 10:02 AM
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
‎2006 Oct 17 10:12 AM
Hi,
use commit work after BAPI_GOODSMVT_CREATE in
your custom Function module
Regards
amole
‎2006 Oct 17 11:06 AM
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.