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

Function module to update components of PM orders

Former Member
0 Likes
2,306

Hello!

I need a function module or bapi to update components of PM orders in 4.6C.

Thanks

Hello!

I need a function module or bapi to update components of PM orders in 4.6C.

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
1,348

Try BAPI_ALM_ORDER_MAINTAIN.

Read only

0 Likes
1,348

Hello, this bapi is from 4.7 version, i need to 4.6c version

thanks

Read only

0 Likes
1,348

Try this CO2H_PROD_ORDER_CHANGE.

Regards,

Ravi

Read only

0 Likes
1,348

Thanks, but this function module don't fix my problem, only can modify the fields BDMNG, VERID and LGORT

Read only

0 Likes
1,348

Finally this works with CO2M_COMPONENT_CHANGE_WITH_REF

Read only

0 Likes
1,348

Hi:

I am also trying to update components of PM. I used the function CO2M_COMPONENT_CHANGE_WITH_REF, but I am not sure if I am passing the correct parameters. If possible can you please send a sample code Or you can take a look at my code and tell me where I am doing wrong.. Thanks.

Here is what I am passing into the the function:

DATA: in_resbd_new LIKE resbd,

in_rsnum_source LIKE resb-rsnum,

in_rspos_source LIKE resb-rspos,

in_rsart_source LIKE resb-rsart,

out_INDEX_BT LIKE SY-TABIX.

      • When I created the component, Requirement quantity of the component

      • was set to initial. I am trying to change that to 1.

in_resbd_new-MANDT = '200'.

in_resbd_new-RSNUM = '0000000708'. " from RESB-RSNUM

in_resbd_new-RSPOS = '0001'. " from RESB-RSPOS

in_resbd_new-MATNR = '000000000000000072'. " RESB-MATNR

in_resbd_new-WERKS = '0010'. " from RESB-WERKS

in_resbd_new-LGORT = '0010'. "" from RESB-lgort

in_resbd_new-MENGE = '1'.

in_rsnum_source = '0000000708'.

in_rspos_source = '0001'.

CALL FUNCTION 'CO2M_COMPONENT_CHANGE_WITH_REF'

EXPORTING

i_resbd_new = in_resbd_new

i_rsnum_source = in_rsnum_source

i_rspos_source = in_rspos_source

i_rsart_source = in_rsart_source

IMPORTING

E_INDEX_BT = out_INDEX_BT

EXCEPTIONS

ERROR_OCCURED = 1

OTHERS = 2

.

The return value in out_index_bt is '1'.

Thanks for your help.

Read only

0 Likes
1,348

Hi,

this function module needs a FM to read a PM order before because it works with memory data, (PM_ORDER_DATA_READ) and other FM to save changes (CO_ZV_ORDER_POST) after the FM CO2M_COMPONENT_CHANGE_WITH_REF.

I hope that this help you.