06-25-2015 8:46 AM
Hello Gurus,
I am working on Retail Module.
I am trying to update the field Material ABC Ranking Field ( Field MARC-MAABC) on the Store and Distribution Center views trough a Z report.
For this purpose I am using the Bapi BAPI_MATERIAL_MAINTAINDATA_RT, here is th part of code where I am calling this FM with the inputs :
***********************************************************************************************
CLEAR : wa_bapireturn,
wa_bapie1mathead,
it_bapie1marcrt,
it_bapie1marcrtx.
MOVE wa_tab_mrp-matnr TO wa_bapie1mathead-material.
IF wa_tab_mrp-vlfkz = 'B'.
MOVE 'X' TO wa_bapie1mathead-logdc_view.
ELSEIF wa_tab_mrp-vlfkz = 'A'.
MOVE 'X' TO wa_bapie1mathead-logst_view.
ENDIF.
MOVE 'X' TO wa_bapie1mathead-no_appl_log.
MOVE wa_tab_mrp-matnr TO wa_bapie1marcrt-material.
MOVE wa_tab_mrp-werks TO wa_bapie1marcrt-plant.
MOVE wa_tab_mrp-maabc TO wa_bapie1marcrt-abc_id.
MOVE wa_tab_mrp-matnr TO wa_bapie1marcrtx-material.
MOVE wa_tab_mrp-werks TO wa_bapie1marcrtx-plant.
MOVE wa_tab_mrp-maabc TO wa_bapie1marcrtx-abc_id.
CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
EXPORTING
headdata = wa_bapie1mathead
IMPORTING
return = wa_bapireturn
TABLES
plantdata = it_bapie1marcrt
plantdatax = it_bapie1marcrtx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
***********************************************************************************************
The structure wa_bapireturn is mentioning that the material has been changed.
Here is my concern, the table MARC is modified with the new value of ABC ranking BUT when I go to Tcode MM43 on the material with the view Store and Distribution Center, the field ABC ranking is not updated.
Here are my questions :
1. How can I update the field ABC Ranking field on the view store and distribution center?
2. What is the link between the ABC ranking fieldon the table MARC and what we are seeing on the Tcode MM43?
If anyone already have this kind of issue or can give me some help it would be nice.
Tks for your help.
Have a nice day,
BR
Christophe
06-25-2015 10:19 AM
Try to update that field using the below function module.
MCB_MARC_UPDATE
Regards,
Gautham.
06-25-2015 4:25 PM
Hi Gautham,
Tks for your answer.
I just forget to mention the division on the MM43 screen...