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

PM order create with Reference (GET_DETAIL & Maintain sequence error)

Former Member
0 Likes
1,601

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.

4 REPLIES 4
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,095

Hello.

What's the exact error message from BAPI?

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,095

For creating a Process Order With Reference ,there is BAPI_PROCORD_CREATE_FROM_REF .

Read only

0 Likes
1,095

Thanks, but we are looking for Plant Maintenance order. This FM is for PP/CO.

Read only

Former Member
0 Likes
1,095

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....