‎2015 Apr 27 2:44 AM
Hello Team,
Good Day. i had a requirement to create PM order with reference - since there is no FM or BAPI to copy and create PM order - i decided to use
1) BAPI_ALM_ORDER_GET_DETAIL and
2) BAPI_ALM_ORDER_MAINTAIN
in sequence. That's where the issue is occuring. When used in sequence the Order no using in Step 1 - still is carried forward in internal table during calling of BAPI_ALM_ORDER_MAINTAIN and causing BAPI to fail.
Tried using BUFFER_REFRESH_ALL and roll back in between, but no change...still fails..
The failure is happening at FM CO_BT_CAUFV_READ_WITH_KEY where CAUFV_BT table contains the old order no and its details....
Can anybody comes across this situation and if so any resolution? Please update.
‎2015 Apr 27 4:09 AM
‎2015 Apr 27 5:05 AM
For creating a Process Order With Reference ,there is BAPI_PROCORD_CREATE_FROM_REF .
‎2015 Apr 27 5:45 AM
Thanks, but we are looking for Plant Maintenance order. This FM is for PP/CO.
‎2015 Apr 27 5:44 AM
Hi Arun,
The error message thrown by BAPI is "Error during processing of BAPI methods"
E - IWO_BAPI2 - 113 -
On debugging found its happening in FM IBAPI_ORDER_OPERATION_CREATE .
Exception:
order_header_not_found = 3
This is because it is still using the Old order no I used in Get_Detail and trying to use it and results in Header error....