Application Development 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: 

Update Material ABC Ranking Field

christophe_hu2
Participant
0 Kudos

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

2 REPLIES 2

GauthamV
Active Contributor
0 Kudos

Try to update that field using the below function module.

MCB_MARC_UPDATE

Regards,

Gautham.

0 Kudos

Hi Gautham,

Tks for your answer.

I just forget to mention the division on the MM43 screen...