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

Changing Process Order - COR2

Former Member
0 Likes
2,904

Hi All,

We have a requirement to change a PROCESS ORDER ( Transaction COR2).


We want to change the Requirement Quantity of the materials present in the Materials Section.

Our System is at ECC6.0.

Can we use the BAPI BAPI_ALM_ORDER_MAINTAIN.

With the Following code am not able to achieve the requirement.

Code is as follows:


CLEAR x_methods.
x_methods-refnumber   = '000001'.
x_methods-objecttype  = '' .
x_methods-method      = 'SAVE'.
x_methods-objectkey   = '008100000011'.
APPEND x_methods TO t_methods.

CLEAR x_methods.
x_methods-refnumber   = '000001'.
x_methods-objecttype  = 'COMPONENT'.
x_methods-method      = 'CHANGE'.
x_methods-objectkey   = '0081000000110020'. "Process Order Number concatenated with Activity(VORNR).
APPEND x_methods TO t_methods.

CLEAR x_header_up.
x_header_up-orderid  = '008100000011'.
x_header_up-material = 'X'.

CLEAR x_component.


x_component-reserv_no                 = '0000000199'.
x_component-res_item                  = '0001'.
x_component-item_number            = '0010'.
x_component-requirement_quantity = '500'.
x_component-activity                     = '0020'.
APPEND x_component TO t_component.

CLEAR x_component_up.
x_component_up-item_number = 'X'.
x_component_up-requirement_quantity = 'X'.
x_component_up-activity = 'X'.
APPEND x_component_up TO t_component_up.

And i have made a call to the above specified BAPI.

Return Table is giving the below errors.

Errors:E I0                505 Order type ZOP1 is not defined for maintenance orders
          E IWO_BAPI2 113 Error  during processing of BAPI methods

Any pointers will be highly helpful.

Thanks and Regards,
Vinay Mutt

4 REPLIES 4
Read only

former_member188827
Active Contributor
0 Likes
2,043

Check if BAPI"BAPI_PI_ORDER_CHANGE" helps.

Regards

Read only

0 Likes
2,043

Does such a BAPI exists

Read only

Former Member
0 Likes
2,043

Hi Vijay,

BAPI_ALM_ORDER_MAINTAIN wont work for process orders, its for maintanance/service orders.

you can try using BAPI_PROCORD_CHANGE..

Read only

0 Likes
2,043

Hi Sooraj,

The Function Module Documentation says " Its for changing Header Data". As i stated i want to change the quantities under Materials.