Skip to Content
0
Former Member
Mar 21, 2014 at 03:55 AM

Problem in changing Production order components.

1218 Views

The problem is happening while changing components in Production order.

Take a look at the source code.

data : IS_ORDER_KEY TYPE COXT_ORD_KEY,

IS_ORDER_COMPONENT_KEY TYPE COXT_S_ORD_COMP_KEY,

IS_REQUIREMENT_QUANTITY TYPE COXT_S_QUANTITY,

IS_REQUIREMENT_QUANTITYX TYPE COXT_S_QUANTITYX,

IS_CONFIRMED_QUANTITY TYPE COXT_S_QUANTITY,

IS_CONFIRMED_QUANTITYX TYPE COXT_S_QUANTITYX,

I_MATERIAL TYPE COXT_MATERIAL,

I_MATERIALX TYPE COXT_MATERIALX,

IS_ORDER_OPERATION_KEY TYPE COXT_S_ORD_OPR_KEY,

IS_ORDER_OPERATION_KEYX TYPE COXT_S_ORD_OPR_KEYX,

IS_REQUIREMENT_DATE TYPE COXT_S_DATE,

IS_REQUIREMENT_DATEX TYPE COXT_S_DATEX,

IS_STORAGE_LOCATION TYPE COXT_S_STORAGE_LOCATION,

IS_STORAGE_LOCATIONX TYPE COXT_S_STORAGE_LOCATIONX,

I_BATCH TYPE COXT_BATCH,

I_BATCHX TYPE COXT_BATCHX,

I_MI_CONFIGURATION_OBJECT TYPE COXT_CONFIG_OBJECT,

I_MI_CONFIGURATION_OBJECTX TYPE COXT_CONFIG_OBJECTX.

DATA :wa_resb type resb,

ES_BAPIRETURN TYPE COXT_BAPIRETURN,

E_ERROR_OCCURRED TYPE C.

.

IS_ORDER_KEY = '000002098003'.

select single * from resb into wa_resb where aufnr eq IS_ORDER_KEY

and bwart eq '531'.

move-corresponding wa_resb to IS_ORDER_COMPONENT_KEY.

IS_REQUIREMENT_QUANTITY-quantity = '10.23'.

IS_REQUIREMENT_QUANTITY-uom = 'KG'.

IS_REQUIREMENT_QUANTITYX-quantity = 'X'.

IS_REQUIREMENT_QUANTITYx-uom = 'X'.

*IS_STORAGE_LOCATION-lgort = '1060'.

*IS_STORAGE_LOCATIONX-lgort = 'X'.

I_MATERIAL = wa_resb-matnr.

IS_STORAGE_LOCATION-werks = wa_resb-werks.

IS_STORAGE_LOCATIONx-werks = 'X'.

IS_STORAGE_LOCATION-lgort = '1060'.

IS_STORAGE_LOCATIONX-lgort = 'X'.

CALL FUNCTION 'CO_XT_COMPONENT_CHANGE'

EXPORTING

IS_ORDER_KEY = IS_ORDER_KEY

IS_ORDER_COMPONENT_KEY = IS_ORDER_COMPONENT_KEY

IS_REQUIREMENT_QUANTITY = IS_REQUIREMENT_QUANTITY

IS_REQUIREMENT_QUANTITYX = IS_REQUIREMENT_QUANTITYX

IS_CONFIRMED_QUANTITY = IS_CONFIRMED_QUANTITY

IS_CONFIRMED_QUANTITYX = IS_CONFIRMED_QUANTITYX

I_MATERIAL = I_MATERIAL

I_MATERIALX = I_MATERIALX

* IS_ORDER_OPERATION_KEY = IS_ORDER_OPERATION_KEY

* IS_ORDER_OPERATION_KEYX = IS_ORDER_OPERATION_KEYX

* IS_REQUIREMENT_DATE = IS_REQUIREMENT_DATE

* IS_REQUIREMENT_DATEX = IS_REQUIREMENT_DATEX

IS_STORAGE_LOCATION = IS_STORAGE_LOCATION

IS_STORAGE_LOCATIONX = IS_STORAGE_LOCATIONX

I_BATCH = I_BATCH

I_BATCHX = I_BATCHX

I_MI_CONFIGURATION_OBJECT = I_MI_CONFIGURATION_OBJECT

I_MI_CONFIGURATION_OBJECTX = I_MI_CONFIGURATION_OBJECTX

* I_BATCH_SEL_CUOBJ = I_BATCH_SEL_CUOBJ

* I_BATCH_SEL_CUOBJX = I_BATCH_SEL_CUOBJX

* I_XFEHL = I_XFEHL

* I_XFEHLX = I_XFEHLX

* I_SOBKZ = I_SOBKZ

* I_SOBKZX = I_SOBKZX

* I_KDAUF = I_KDAUF

* I_KDAUFX = I_KDAUFX

* I_KDPOS = I_KDPOS

* I_KDPOSX = I_KDPOSX

* I_PSPEL = I_PSPEL

* I_PSPELX = I_PSPELX

* I_KZAUS = I_KZAUS

* I_KZAUSX = I_KZAUSX

* I_NAFKZ = I_NAFKZ

* I_NAFKZX = I_NAFKZX

* I_NOMAT = I_NOMAT

* I_NOMATX = I_NOMATX

* I_NFUML = I_NFUML

* I_NFUMLX = I_NFUMLX

* I_NFPKZ = I_NFPKZ

* I_NFPKZX = I_NFPKZX

* I_NOMNG = I_NOMNG

* I_NOMNGX = I_NOMNGX

IMPORTING

ES_BAPIRETURN = ES_BAPIRETURN "initial

E_ERROR_OCCURRED = E_ERROR_OCCURRED"blank not showing 'X'.

.

CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'

IMPORTING

E_ORDER_KEY = IS_ORDER_KEY

ES_BAPIRETURN = ES_BAPIRETURN

E_ERROR_OCCURRED = E_ERROR_OCCURRED

* TABLES

* ET_ORD_KEY_MAP = ET_ORD_KEY_MAP

* ET_BAPIRETURN = ET_BAPIRETURN

.

write : 'dfdfdf'

Notable point is that after executing CO_XT_COMPONENT_CHANGE' parameters ES_BAPIRETURN and E_ERROR_OCCURRED are initial.


This explains that the FM has been executed successfully.

But still the changes are not done in production order.

Please let me know where i am mistaken.