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_ALM_ORDER_MAINTAIN ATPCHECK method,

Former Member
0 Likes
939

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 .

3 REPLIES 3
Read only

Former Member
0 Likes
680

Hi Sunil,

I am facing the same problem can you help me out in this issue.

Thanks and Regrds,

Nikhil.

Read only

0 Likes
680

Nikhil,

Please follow the link below, Got more responses there,

Read only

Former Member
0 Likes
680

same issue.