2015 May 14 4:12 PM
Hi experts,
I'm trying to call a bapi BAPI_FIXEDASSET_CHANGE within an EXIT to change "useful life of an asset", but after call bapi i can`t call bapi_transaction commit because i think the main program will finish if i use commit explicit.
Then i leave the implicit commit update the bapi but this is not happening (working). Anyone have any suggested solution?
Hi Jim,
The implementation was in "Enhancement Point", but not in an EXIT. Analyzing the standard code, i saw the following code below. I think is possible use a commit work to solve my problem. What do you think about ?
* leave transaction after processing of list -> clear all global values
if sy-binpt = on. "Sonst Fehler in BTCI-Modus
commit work.
endif.
if sy-calld is initial.
leave to transaction sy-tcode.
else.
set screen 0.
leave screen.
endif.
Best regards,
Emerson
2015 May 15 7:39 AM
Hi,
Have u checked that bapi 'BAPI_FIXEDASSET_CHANGE' is wroking correct or not if it working properly then u can call bapi_transaction_commit . There will not be any problem .
Best Regards ,
Sabir.
2015 May 15 6:23 PM
Hi Sabir Shah,
I think that's not possible call bapi_transaction_commit inside an EXIT because this cause a premature end of main transaction.
Best Regards,
Emerson
2015 May 15 6:48 PM
Hi Emerson,
Which user exit have you implemented?
Try setting a breakpoint on the COMMIT statement to confirm that the transaction you're using does perform an explicit COMMIT. If so you should not need to worry about BAPI_TRANSACTION_COMMIT since that's really all that function does.
I certainly agree that you should not call the commit function during a user exit!
2015 May 18 1:41 PM
Hi Jim,
The implementation was in "Enhancement Point", but not in an EXIT. Analyzing the standard code, i saw the following code below. I think is possible use a commit work to solve my problem. What do you think about ?
* leave transaction after processing of list -> clear all global values
if sy-binpt = on. "Sonst Fehler in BTCI-Modus
commit work.
endif.
if sy-calld is initial.
leave to transaction sy-tcode.
else.
set screen 0.
leave screen.
endif.
Best regards,
Emerson
2015 May 18 1:49 PM
The code bellow exist after my Enhancement point implementation.
* leave transaction after processing of list -> clear all global values
if sy-binpt = on. "Sonst Fehler in BTCI-Modus
commit work.
endif.
if sy-calld is initial.
leave to transaction sy-tcode.
else.
set screen 0.
leave screen.
endif.
2015 May 21 4:18 PM
Hi Emerson,
Sorry for slow response, I've been out of touch for a few days. If the code that you show does follow immediately after your call to the BAPI, I would agree that it seems safe (in this rare instance) to program a commit work in an exit or enhancement point.
Jim
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |