cancel
Showing results for 
Search instead for 
Did you mean: 

Material Master Data Integration (MM01, MM02, BAPI_MATERIAL_SAVEREPLICA)

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

asik_shameem
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Asik,

Thank you for the insight.

Authorization checks & SHD0 both provide some good features.  But, unfortunately, they do not meet my specific use case.

The reason why is because not all materials originate from SAP-MDM.  Therefore...

If I create a screen variant for MM01/MM02 to suppress the MDM Managed fields, those fields would be suppressed for the MDM Managed Items (MRO materials) and Finished Goods for example.  But, because Finished Goods are not managed in MDM, users would need access to the suppressed fields when creating Finished Goods.

And, the same logic holds true for security.  If I suppress Basic Data & Purchasing Views via the M_MATE_STA objects (maintenance statuses) that authorization check will fail for the MRO items (good) but also fail on Finished Good items (bad).

So- essentially, what I am looking for is a more precise rule... One where I can state:

IF Material Type = MRO, you cannot maintain these fields.

  ELSE you can Maintain these fields.

Any other ideas out there?

Thank you.

asik_shameem
Active Contributor
0 Kudos

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.