Skip to Content
avatar image
Former Member

Material Master Data Integration (MM01, MM02, BAPI_MATERIAL_SAVEREPLICA)

Hello SDN Experts.


I have a business scenario that I am working on & would like to gather feedback from you if you have any insight on how to accomplish the following:


Background:  My company runs SAP-MDM Netweaver 7.1 (SP10) and interfaces item (aka material master) data into SAP-ECC using BAPI_MATERIAL_SAVEREPLICA.  We look at SAP-MDM as the point of entry for all MRO parts.  And users, under no circumstances, should update basic data or purchasing views directly in SAP-ECC (those views should only be maintained from SAP-MDM).


The question is... How can I lock the fields on the Basic Data & Purchasing views so that they are not maintainable by the online users via MM01 or MM02 but allow the BAPI to update these fields?


Solution:  Currently I don't have a solution.  I know that I can lock specific fields down using the field groups in config (trans code OMSR).  But, typically if a field is modified to be a display field, the rule is applied to the online transaction (MM01/MM02) and the BAPI (there is an exception if the field is required in that the BAPI can update it... but once updated on a create, the changes are not considered).


Do any of you know of a BADI / User Exit that would allow me to introduce logic that states-- if running the transaction online and the material type is ERSA (Spare Part) the Field Reference is X (and I have display only ability to my MDM managed fields based on X's configuration).  Meanwhile, when the BAPI is called, Field Reference Y is called.  Which is configured to have change rights to my MDM sensitive fields.


This is just one of may alternatives I've considered but it seems viable.  But I'm open to any & all considerations on the topic.


Notes:

The Field Reference associated to a material type is configured using OMS2.

The Field References & Field Selection Groups are configured via OMSR.


Any and all ideas are welcome.  Thanks for reading & considering this post.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 24, 2014 at 06:03 PM

    BAPI_MATERIAL_SAVEREPLICA uses the field selection groups for ALE scenario, e.g. MAL1 and MAL2

    while the online transaction uses the field selection groups MM01 and MM02

    Of course both interact with settings of other field selection groups like material type, industry, User and plant

    But it is in general possible to have the BAPI_MATERIAL_SAVEREPLICA act different from the online transaction and vica versa.

    See  Field Selection in ALE - Material Master (LO-MD-MM) - SAP Library

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Jürgen,

      Thanks for the response.

      Unfortunately, because my MRO materials are assigned to their own unique Field Reference in OMS2, I believe that logic is being used instead of the MAL1/MAL2 field references.

      It seems to me that the more precise logic is taking precedence (material type field reference over transaction field reference).

      That being the case, I believe I am heading down the path of customization-- specifically "BADI_MAT_F_SPEC_SEL" I am hoping will offer a solution.

      But, I will need to verify with our development team to see if I can have the BAPI call use one field reference while the online transaction uses another.

      Thanks again for the input.  I will post back once I have a direction forward.

      Regards.

  • Dec 24, 2014 at 10:38 AM

    Hello Richard,

    In 2 ways you can achieve this without changing the field selection group.

    - Using transaction variant [Transaction: SHD0], search SCN for more info

    - Using Authorization [check authorization object M_MATE_MAN (basic views), M_MATE_WRK (plant level data) ], check with your basis team for more info

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Richard,

      Even in that case, you can still go with authorizations. Take out “Create/Change” activity for MRO materials(object M_MATE_MAR) in the existing roles. Create a new role with these authorizations and assign it to the background user.

      If not, you can go ahead with the badi BADI_MAT_F_SPEC_SEL as mentioned in your post. Check the system field SY-BATCH = 'X' (for BAPI call), if yes then mark your field as display.