2009 Aug 27 4:03 PM
Guys I am trying to run a material availabity check on mulitple orders using BAPI 'BAPI_ALM_ORDER_MAINTAIN'.
The problem is, it is not working on the first run, but on the second exection it is working fine. I called 'BAPI_TRANSACTION_COMMIT' after calling the BAPi, so thats not an issue.
Am I missing somethng here?
LOOP at object_tab.
clear: xmethod, methods, lt_return.
xmethod-refnumber = 1.
xmethod-objecttype = 'HEADER'.
xmethod-method = 'ATPCHECK'.
xmethod-objectkey(12) = object_tab-aufnr.
append xmethod to methods.
clear xmethod.
xmethod-refnumber = 1.
xmethod-method = 'SAVE'.
xmethod-objectkey(12) = object_tab-aufnr.
append xmethod to methods.
call function 'BAPI_ALM_ORDER_MAINTAIN'
tables
it_methods = methods
return = lt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
.
ENDLOOP .
Guys I am trying to run a material availabity check on mulitple orders using BAPI 'BAPI_ALM_ORDER_MAINTAIN'.
The problem is, it is not working on the first run, but on the second exection it is working fine. I called 'BAPI_TRANSACTION_COMMIT' after calling the BAPi, so thats not an issue.
Am I missing somethng here?
LOOP at object_tab.
clear: xmethod, methods, lt_return.
xmethod-refnumber = 1.
xmethod-objecttype = 'HEADER'.
xmethod-method = 'ATPCHECK'.
xmethod-objectkey(12) = object_tab-aufnr.
append xmethod to methods.
clear xmethod.
xmethod-refnumber = 1.
xmethod-method = 'SAVE'.
xmethod-objectkey(12) = object_tab-aufnr.
append xmethod to methods.
call function 'BAPI_ALM_ORDER_MAINTAIN'
tables
it_methods = methods
return = lt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
.
ENDLOOP .
2009 Aug 31 8:03 AM
Hi Sunil,
I am facing the same problem can you help me out in this issue.
Thanks and Regrds,
Nikhil.
2009 Sep 02 5:25 PM
2009 Sep 02 5:26 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |