I'll technical complete an order. The order has 9 operations. Before I complete the order I book some time on every operation in this order, then I complete the order. To complete the order I use the BAPI
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
IT_METHODS = WA_IT_METHODS
IT_HEADER = WA_IT_HEADER
IT_OPERATION = WA_IT_OPERATION
RETURN = WA_RETURN
ET_NUMBERS = WA_ET_NUMBERS.
The tables are filled as follows:
WA_IT_METHODS
1 REFNUMBER N 6 000001
2 OBJECTTYPE C 32 HEADER
3 METHOD C 32 TECHNICALCOMPLETE
4 OBJECTKEY C 90 009999999999
1 REFNUMBER N 6 000000
2 OBJECTTYPE C 32
3 METHOD C 32 SAVE
4 OBJECTKEY C 90
WA_IT_HEADER
1 ORDERID C 12 009999999999
WA_IT_OPERATION is initial
Mostly the order will complete. But sometimes I get the following error back from the BAPI(WA_RETURN):
1 TYPE C 1 E 2 ID C 20 IWO_BAPI 3 NUMBER N 3 162 4 MESSAGE C 220 Order 009999999999 cannot be put in process, as no operation is maintained 5 LOG_NO C 20 6 LOG_MSG_NO N 6 000000 7 MESSAGE_V1 C 50 009999999999 1 TYPE C 1 E 2 ID C 20 IWO_BAPI2 3 NUMBER N 3 113 4 MESSAGE C 220 Error during processing of BAPI methods
Does anybody know where the problem is? Maybe it is a timing problem?