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: 

Authorisation restriction to change batch ( MSC2N ) by material type

Former Member
0 Kudos

Hi ,

We have a requirement wherein we want to restrict users from changing batch records ( MSC2N ) by material type. Viz. A user xyz should not have authorization to change batch for material type FERT.

We cannot use the authorization group ( BEGRU ) field of material master alongwith object M_MATE_CHG as this field is already being used for another purpose to restrict users by country for MM01,MM02 & MM03.

Please do let know if you know of any alternative method of doing so.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You could try creating a new authorization object eg. Z_MATE_CHG with the same set of authorization fields (ACTVT and BEGRU). (I suppose BEGRU refers to a field in the table MARA).

A check for this object could then be introduced in the program for MSC2N and hence be used for the desired purpose.

  • create new auth object via SU21.

Regards,

Sanju.

7 REPLIES 7

Former Member
0 Kudos

Hi,

You could try creating a new authorization object eg. Z_MATE_CHG with the same set of authorization fields (ACTVT and BEGRU). (I suppose BEGRU refers to a field in the table MARA).

A check for this object could then be introduced in the program for MSC2N and hence be used for the desired purpose.

  • create new auth object via SU21.

Regards,

Sanju.

0 Kudos

Hi,

Since the BEGRU field in MARA table will already be populated by a country specific authorization object to apply country specification restrictions. I cannot use this field.

Please advise if there could be yet another solution of usinf some other field , from some other table.

Regards,

Subramaniam Iyer

0 Kudos

Hi,

A workaround for this would be to create a new authorization field (via SU20). The data element for this could be the same as that for BEGRU. This can then be used in the new authorization object.

But since the data element is the same it does not matter if you use BEGRU itself in the new authorization object. (I gather that this field can refer to multiple tables T023, MARA, KNVV etc..). The only advantage in creating a new authorization field in this case will be to restrict its reference to a single table.

Regards,

Sanju

0 Kudos

Hi ,

The suggestion is still not working. I tried creating a Z_MATE_CHG object with field BEGRM, but the transaction keeps on referring to object M_MATE_CHG , field BEGRU.

Since, this field is populated from table MARA for this object.

But,the MARA table for this field is already being used for country specific authorisations. We are not able to use this field for material type specific restrictions.

I need more clarifications on developing the Z object and assigning it to the role , I am using SU20 & SU21 for the first time , Am I missing something ?

0 Kudos

Hi,

The new authorization object will work only if the corresponding changes are made in the related program.

Open the program code for the MSC2N transaction (via Se93), and search for the string "AUTHORITY-CHECK". You will find a piece of code that checks for the authorization object M_MATE_CHG and its related field values. This will need to be changed to Z_MATE_CHG and its corresponding values.

You will need an ABAP-er for this.

Only then will the authorization check work correctly. Once this is done add the object in the corresponding role (and also change SU24 entry for MSC2N accordingly if required).

Regards,

Sanju.

0 Kudos

Thank you Sanju.

I realized that this would need an alteration in the standard SAP program ( not recomended ). maybe we will have to create a Ztransaction and do the changes as required.

There does not seem to be any alternative solution.

0 Kudos

Hi,

I agree that changes to standard programs should be only done when absolutely necessary. But I guess you can do that here, but only if the ABAPers also agree with this.

All the best with whatever you decide.

Regards,

Sanju.