Material master updation IDOC mapping

Hi  Experts,
I am getting IDOC MATMAS05 from an external system.I want to put a check on the field status(MARC-MMSTA) and update the MRP 1 data .For eg if status is 40 (inactive),I have to update MRP type to X0.How can I process further?
I am using the function module IDOC_INPUT_MATMAS01 .
Thanks,
Saumia

Hi,
Try the BADI "BADI_MATMAS_ALE_IN", method "CHANGE_UEB_TAB". 
The enhancements mentioned in my earlier post will be trigger based on the existance of certain Data segments in the idoc. Eg. E1MARAM (Master article general data (MARA)), E1MARA1 (Additional Fields for E1MARAM).  You can find the Segments for which the Enhancement is activated by going through the function module code.
Regards
Vinod

Similar Messages

  • Material Master Update from group routing.

    Dear All,
    When we make material routing. in CA02>scheduling>Results--->Update material master (marking). can be done for the lead time scheduling Purpose. and update in CA96.
    But when we use Group Routing, and assign multiple materials in routing header, and then go for
    CA02>scheduling>Results--->** (no Material Master Update tab Appeared)
    Do we have a solution for this?
    Thanks & regards
    Raghu

    Dear,
    Follow these steps,
    Scheduling in routing (CA02 ) as :
    Call up the operation overview for the routing.
    Choose Extras-- Scheduling -- Schedule.
    You reach the Scheduling dialog box.
    Maintain the data on the dialog box. The system proposes Backward scheduling for the scheduling type.
    Choose Continue.
    You reach the Enter overview variant dialog box  00000001.
    Enter the overview variant you want to use to display the scheduling results. Choose Continue.
    The routing is scheduled. You reach the Schedule Overview screen containing the scheduling data.
    After the scheduling run has been carried out, click on scheduling Result-- update material master
    You use this function to update material master. Go to the CA96 and update material master.
    Please try and come back.
    Regards,
    R.Brahmankar

  • Exit for Material Master UPdate

    Hi Friends,
    could anyone let me know any user exit for Material Master UPdate.
    Thanks in Advance
    Regards

    hi
    good
    MGA00001            Material Master (Industry): Checks and Enhancements
    MGA00002            Material Master (Industry): Number Assignment
    MGA00003            Material Master (Industry and Retail): Number Display
    thanks
    mrutyun^

  • Custom - Material Master Update using an IDOC (Message Type - MATMAS_BAPI)

    Hello everyone,
    I was writing a functional specs. Basically, I want to update the material master MM02 using an IDOC (MATMAS_BAPI01 - Basic Type & MATMAS_BAPI - Message Type). This is currently working.
    To my understanding, this currently uses function module - BAPI_IDOC_INPUT1 to update the material master after the IDOC is posted to SAP ECC from XI system.
    Now I want to add one small validation logic before it actually updates the material master (MM02).
    I looked around and found one exit - EXIT_SAPLMV02_002 in enhancement MGV00001. I was almost sure that this EXIT can be used to write the custom validation code before, actual MM02 updation.
    However while trying to establish a link between this EXIT and BAPI_IDOC_INPUT1, I found that EXIT_SAPLMV02_002 is actually a part of another function module - IDOC_INPUT_MATMAS01 and not BAPI_IDOC_INPUT1. I am stuck here if adding the custom logic in the exit really going to work.
    a bit of googling and I found from WE30 that the purpose of both these function modules are actually different. While BAPI_IDOC_INPUT1  actually create & updates the material master (also plant specific master data which is my need), IDOC_INPUT_MATMAS01 is just for maintenence of few fields in MM02 (may be custom fields).
    Can anyone point out if my thing is in right direction?
    Also please offer any solution where shall I put the Custom Logic in the EXIT or the some variants of
    BAPI_IDOC_INPUT1.
    A less technical explanation would be appreciated as I come from a functional background and invloved in this for writing the func specs. I want to make it sure that what I write is not useless and makes some sense.
    Thanks in advance,
    Arunesh

    Hi Lalit,
    Did some head breaking with the function module - BAPI_IDOC_INPUT1 to check whether it is calling the EXIT_SAPLMV02_002 internally. Couldn't get anywhere.
    On question of another EXIT in BAPI_IDOC_INPUT1, I don't see any. I am not very proficient in ABAP code, I must say though.
    I found the list of exits from google, almost same list everywhere.
    http://www.sapfans.com/forums/viewtopic.php?f=21&t=296637
    here I got the EXIT, I am talking about.
    Any other way to find either the EXIT or link the above?
    -- Arunesh

  • Issue in material master update from presentation server  using BAPI....

    Hi Guru's...
    i am trying to change the material master from presentation server (desktop flat file)
    using BAPI(BAPI_MATERIAL_SAVEDATA) ....
    while executing my program i am getting the message like material had changed...
    but while in mm02 i am un able to fine the updates...
    please find below program logic and correct me if any mistakes....
    thanks in advance...
    *& Report  ZAREPAS36
    REPORT  zarepas36.
    DATA : gs_bapimathead             TYPE  bapimathead,
           gs_clientdata              TYPE  bapi_mara,
           gs_clientdatax             TYPE  bapi_marax.
    TYPES : BEGIN OF gty_itab1,
            matnr(18),
            matkl(9),
            spart(2),
            ntgew(13),
            gewei(3),
            meins(3),
            END OF gty_itab1.
    DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
           gwa_itab1 TYPE gty_itab1.
    TYPES: BEGIN OF gty_itab2,
           abc(132),
           END OF gty_itab2.
    DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
          gwa_itab2 TYPE gty_itab2.
    flat file at selection screen
    PARAMETERS: p_files TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = p_files
        filetype = 'ASC'
      CHANGING
        data_tab = gt_itab2
      EXCEPTIONS
        OTHERS   = 8.
    LOOP AT gt_itab2 INTO gwa_itab2.
      IF gwa_itab2-abc(1) = 'S'.
        gwa_itab1 = gwa_itab2-abc(132).
        APPEND gwa_itab1 TO gt_itab1.
      ENDIF.
    ENDLOOP.
    loop at gt_itab1 into gwa_itab1.
    *Material
    gs_bapimathead-material    = gwa_itab1-matnr.
    *Material details at client data
    *material group.
    gs_clientdata-matl_group = gwa_itab1-matkl.
    gs_clientdatax-matl_group = 'X'.
    *Division
    gs_clientdata-division = gwa_itab1-spart.
    gs_clientdatax-division = 'X'.
    *Net Weight
    gs_clientdata-net_weight = gwa_itab1-ntgew.
    gs_clientdatax-net_weight = 'X'.
    *Unit of Weight
    gs_clientdata-unit_of_wt = gwa_itab1-gewei.
    gs_clientdatax-unit_of_wt = 'X'.
    *Base Unit of Measure
    gs_clientdata-base_uom = gwa_itab1-meins.
    gs_clientdatax-base_uom = 'X'.
    endloop.
    *calling BAPI for making changes in material and saving thru BAPI.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata    = gs_bapimathead
        clientdata  = gs_clientdata
        clientdatax = gs_clientdatax.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      WRITE: / 'Error occured while changing material'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      WRITE: / 'material',gs_bapimathead-material,'changed'.
    ENDIF.

    hi hello Guru's
    i resolved the issuee..
    pleaso go thru the below proram logic for your reference..........
    *& Report  ZAREPAS36
    REPORT  zarepas36.
    DATA : gs_bapimathead             TYPE  bapimathead,
           gs_clientdata              TYPE  bapi_mara,
           gs_clientdatax             TYPE  bapi_marax.
    TYPES : BEGIN OF gty_itab1,
            matnr(18),
            matkl(9),
            spart(2),
            ntgew(13),
            gewei(3),
            meins(3),
            END OF gty_itab1.
    DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
           gwa_itab1 TYPE gty_itab1.
    TYPES: BEGIN OF gty_itab2,
           abc(132),
           END OF gty_itab2.
    DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
          gwa_itab2 TYPE gty_itab2.
    DATA:ls_return         TYPE bapiret2,
         lt_bapiret2       TYPE standard table of bapiret2.
    flat file at selection screen
    PARAMETERS: p_files TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = p_files
        filetype = 'ASC'
      CHANGING
        data_tab = gt_itab2
      EXCEPTIONS
        OTHERS   = 8.
    LOOP AT gt_itab2 INTO gwa_itab2.
      IF gwa_itab2-abc(1) = 'S'.
        gwa_itab1 = gwa_itab2-abc(132).
        APPEND gwa_itab1 TO gt_itab1.
      ENDIF.
    ENDLOOP.
    LOOP AT gt_itab1 INTO gwa_itab1.
    *Material
      gs_bapimathead-material    = gwa_itab1-matnr.
    *Material details at client data
    *material group.
      gs_clientdata-matl_group = gwa_itab1-matkl.
      gs_clientdatax-matl_group = 'X'.
    *Division
      gs_clientdata-division = gwa_itab1-spart.
      gs_clientdatax-division = 'X'.
    *Net Weight
      gs_clientdata-net_weight = gwa_itab1-ntgew.
      gs_clientdatax-net_weight = 'X'.
    *Unit of Weight
      gs_clientdata-unit_of_wt = gwa_itab1-gewei.
      gs_clientdatax-unit_of_wt = 'X'.
    *Base Unit of Measure
      gs_clientdata-base_uom = gwa_itab1-meins.
      gs_clientdatax-base_uom = 'X'.
    ENDLOOP.
    *calling BAPI for making changes in material and saving thru BAPI.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata    = gs_bapimathead
        clientdata  = gs_clientdata
        clientdatax = gs_clientdatax
      IMPORTING
        return      = ls_return.
    LOOP AT lt_bapiret2 INTO ls_return.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      WRITE: / 'Error occured while changing material'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      WRITE: / 'material',gs_bapimathead-material,'changed'.
    ENDIF.

  • Material Master Update through BAPI - Follow up material not updated

    Hi Experts,
    I am updating the material master through a custom transaction using the BAPI  'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
    When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
    Please advice.
    Thanks & Regards,
    Ashu Arora

    Some more fields need to be updated along with the discont. indicator. Now working fine.

  • Weight change in material master, update all open PO's

    Hello
    IS there any standard way for mass update open purchase orders, when weights and volumen in material master change ?
    example:
    there is a change in neto weight for material AAAA, which is inserted into mm02, basic data for his material. This change doesn't effect already created  open orders with this material. Is there any standard way to update them in sap 4.7 ?

    Changes will get reflected for new docs only. This is standard.
    Now other question comes, why you want to change in PO. I am sure PO are already sent to vendor. Then ideally it is not advisable to change in those PO.
    If you haven't sent those PO to vendor, open those PO do some minor corrections SAP will populate the change information in PO documents.
    Also changed information will get effective later at GR stage also.
    So no question to worry.
    Check and revert

  • Material Master MATMAS IDOC and base unit of measurement

    Hi
    We are using SAP standard material master IDOC type MATMAS05 to trigger IDOC. Our material master is having base unit of measure as "G". We are not using ISO unit of measurement. But Material master IDOC, segment E1MARM is populating base unit of meaurement (MEINS) as "GRM".
    Any idea why IDOC is picking ISO unit of measurement instead of material master base unit of measurement.
    Any idea how to send base unit of measurememt as "G" instead of "GRM" in DOC segment.
    Thanks
    Nilesh

    There are ISO codes for country keys, currency keys, units of measure and shipping instructions. According to SAP design guidelines, you should use ISO codes for an IDoc if they are available. When you set up the IDoc, the SAP codes have to be replaced by ISO codes.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf

  • Material Master Update

    Hi Abap Experts,
    I am facing an issue with an update of material master data when using a Bapi BAPI_MATERIAL_SAVEREPLICA. I am trying to update the below fields
    Minlotsize,pl_ti_fince,plnd_delry.
    Below is the code which i have used
      LOOP AT it_zcostupdate INTO zcostupdate.
        READ TABLE it_cost_clr INTO wa_cost_clr                 "+JS01
                               WITH KEY lifnr = zcostupdate-lifnr"+JS01
                                        matnr = zcostupdate-matnr."+JS01
        IF sy-subrc EQ 0.                                       "+JS01
          CLEAR wa_headdata.
          wa_headdata-function  = c_upd.
          wa_headdata-material  = zcostupdate-matnr.   "Material
          wa_headdata-mrp_view  = c_x.
          APPEND wa_headdata TO it_headdata.
    Plant Data
          CLEAR wa_plantdata.
          wa_plantdata-function   = c_upd.
          wa_plantdata-material   = zcostupdate-matnr. "Material
          wa_plantdata-plant      = zcostupdate-dwerk. "Plant
          wa_plantdata-minlotsize = zcostupdate-bstmi. "Min Lot Size
          wa_plantdata-round_val  = zcostupdate-bstrf. "Rounding Value
          wa_plantdata-pl_ti_fnce = zcostupdate-plifz. "Plnd Delivery Time
          wa_plantdata-plnd_delry = zcostupdate-plifz. "Plnd Delivery Time
          APPEND    wa_plantdata TO it_plantdata.
    Plant Data
          CLEAR wa_plantdatax.
          wa_plantdatax-function   = c_upd.
          wa_plantdatax-material   = zcostupdate-matnr. "Material
          wa_plantdatax-plant      = zcostupdate-dwerk. "Plant
          wa_plantdatax-minlotsize = c_x.
          wa_plantdatax-round_val  = c_x.
          wa_plantdatax-pl_ti_fnce = c_x.
          wa_plantdatax-plnd_delry = c_x.
          APPEND    wa_plantdatax TO it_plantdatax.
        ENDIF.                                                  "+JS01
      ENDLOOP.
    When Plantdata internal table is not initial proceed with an update.
      IF NOT it_plantdata[] IS INITIAL.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEREPLICA'
          EXPORTING
            noappllog      = 'X'
            nochangedoc    = ' '
            testrun        = ' '
            inpfldcheck    = ' '
          IMPORTING
            return         = wa_return
          TABLES
            headdata       = it_headdata
            plantdata      = it_plantdata
            plantdatax     = it_plantdatax
            returnmessages = it_returnmsg.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    ENDIF.
    And later stage i am deleting the messages from the it_returnnmsg table other than error and then displaying the log.
    It worked perfectly fine when i have done testing in Development & Quality system with couple of test . But it has not done the same when it went into production and no log is displayed .
    And in production it has executed for 24k Materials at the same time. I am Just think that due to mass of material it has executed ,it may have cause a problem in update,But not sure whether this is the issue . I am planning to split into 100 materials update at one time.But if any one have any other solution ,i would be great ful to you.
    Thanks in advance.
    Cheers
    J.

    Hi
    Check this link
    BAPI_MATERIAL_SAVEDATA with custom z-fields

  • Material master update through BAPI

    Hello Experts,
    We are using BAPI_MATERIAL_SAVEREPLICA to update material master . It is required to update RefPlant:consumption (MARC-VRBWK) in forecast view . We could not find any field corresponding to MARC-VRBWK in table parameters PLANTDATA .
    Please help me if there is any way to update  RefPlant:consumption (MARC-VRBWK ) in forecast view by using  BAPI_MATERIAL_SAVEREPLICA  .
    If there is any other BAPI to update the field please let me know .
    Regards,
    Kiran.

    Hi Suhas,
    I tried EXTENSIONIN & EXTENSIONINX  approach but the MARC-VRBWK was not reflected. I did some research and came to know that these extensions can be used to update the custom fields . If there is any way to update the standard field like MARC-VRBWK  using extension please let me know . It would be great help .
    Thanks,
    Kiran.

  • Material Master: Update the Z fields using BAPI

    Hi to all,
    My requirement is simple. But I do not have much knowledge on BAPI. I have got some information that we can extend th BAPI and update the Z fields in material master. I have added the z fields in MARA. So when I call the bapi z fields has to get update.
    Which BAPI can i use? I have got one BAPI - BAPI_MATERIAL_SAVEDATA.   plz suggest me to do it.
    1. how do i enhance the BAPI or extend th BAPI.
    2. Is ther any approch to do it.
    thnks
    Yerukala Setty

    Hi,
    Append the z fields to BAPI_TE_MARA and BAPI_TE_MARAX structures using append structures.
    Populate two structures for the fields in BAPI_TE_MARA and BAPI_TE_MARAX.
    To BAPI_MATERIAL_SAVEDATA, under EXTENSIONIN parameters, pass structure name as BAPI_TE_MARA and Value Part1, 2, 3, 4 with the filled structure info.
    Similarly append X structure as well.
    Regards,
    Ganga

  • Availability Check Changed on the Material Master Update Existing Orders

    I need to know if there is a way to update existing orders once changes have been made to the material.  Currently the only way that I know of is to go into individual orders change the plant save then change it back to the original plant on the order then the changes take effect.  How can I achieve this without touching every order individually.  Is there something to mass update existing orders to take a new snapshot of the material master settings for a material.

    Try with t.code VA05 - Open sales order list.
    Execute this list. In the output, sort the data by plant. Then go to menu Edit -> mass change -> new plant. Change the plant for group of sales orders that have similar plants. Then again do the same thing to bring the previous plant in the sales orders.
    This can help reduce the time instead of going one by one.
    Regards,

  • Material Master Inbound iDOC

    Hi,
         I am trying to post the Data to the inbound iDOC for material master and i want to set the KZKUP(coproduct Flag) in MARA table but there is no field in the E1MARAM segment of the MATMAS03 iDOC to set this flag. There is one field in the E1MARCM segment but setting that is not reflecting in the MARA table it is setting in the MARC table only.
       So can anybody help me out in this.
    Thanks.

    Hi
    Try populating KZKUP in the following segmetns:
    E2MARCM001
    E2MARCM002
    E2MARCM003
    E2MARCM004
    THanks
    Vijay
    PLZ reward points  if helpful

  • Transfer Material Master (MATMAS) Idoc into Retail  Article Master (ARTMAS)

    I need to transfer data from an SAP 4.7 ERP system that is set up for material masters to a different SAP 6.0 system that is set up as Retail.
    The question is which system should be doing the conversion to the ARTMAS
    Option 1: The outbound IDOC would be a MATMAS05 and it would be recieved and converted on the Retail side to an ARTMAS doc to create the articles. 
    If this is the case do you know how this needs to be set up on the retail side, for this conversion to occur.
    Option 2: Translate the material master and send out an ARTMAS IDOC from the ERP system  In this case I think that we will need a lot of custom code, and the SAP sending box will need to perform conversions that are known only on the retail side.  
    I am not really asking for the exact configuration set up
    What I am looking for is how if other companies are doing this which option is considered the standard/best practice

    Question was never answered we will need to determine how best to do this.

  • Material Master Updation

    hi gurus.......
    What is he difference between using 'MATERIAL_BTCI_SELECTION_NEW'  function module and 'SELECTION_VIEWS_FIND'  in updating the material master (MM02)

    Hello Chakri,
    go through the below thread entierly
    Update of material master in SRM
    Arshad

Maybe you are looking for