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: 

How to check authorization for the batch-management tick in MM01

0 Kudos

I have a requirement, to check the authority for the batch-management tick field, in MM01, in the purchasing view. I have a created a custom authority object to check the user authority based on the plant. As soon as, the user going to change that batch-management tick, it will check his authority. It will allow to change the only if he has the authority for that particular authority object. But I haven't been able to find any suitable place to put my code. I have tried field exit, but it's not getting triggered, and later I have learned, from SCN that field-exit doesn't get triggered for checkboxes. I have tried to put code in the function module MARC_XCHPF, but it is not of any great help.

Kindly suggest me the possible solution to this problem.

Thanks in anticipation

5 REPLIES 5

Former Member
0 Kudos

Dear Rik,

   You may try enhancement "MGA00001" and check here before saving.

0 Kudos

Dear Prakash,

                     Thanks for suggestion. I have already tried this exit. But when a material is getting created based on a reference material, I am not getting that reference material in this exit. My requirement is if the batch-management is already ticked, user, who doesn't have the authorization, shouldn't able to change it. That is why I need a point either where the change in MARC-XCHPF is getting reflected, or I am getting the reference material.

Kindly suggest.

JL23
Active Contributor
0 Kudos

Is there no concept for the batch management flag?

something like: all finished goods shall be batch managed, no batch management for spare parts, a control per material type.

What I read from the requirement is:

if he creates a new material with reference to material that is not batch managed then he shall not be able to set the batch management flag

and if he creates a new material with reference to material that is batch managed then he shall not be able to remove the batch management flag.

But what is he allowed to do if he creates a material without reference?

How do you control if the user is selecting the right reference material?

0 Kudos

hi Jurgen,

Thanks for your reply.

               My requirement is as follows:-

1. It would in case of creation of the material and during the time of changes of the material (i.e. in tcode MM01 and MM02)

2. There would be a custom authority object based on which the user would able to change that tick.

    (i.e. only if the user has the change authority for that authority object).

3. If the user is creating a material in reference to a material, and if the material, he is referring is already ticked from beforehand, and if user wants to change that, his authority for the custom authority object will check, and only if he is authorized, he will be allowed to change.

4. The same kind of authority will be checked at the time of creation and changes of the material.

5. and there is no concept of batch managed flag based on the material type.

Kindly revert me in case of any discrepancy in understanding the requirement.

Thanks!!

JL23
Active Contributor
0 Kudos

I understood this already, but I do not see any sense in it. If the user wants to create a batch managed material then he only needs to select a reference material which is batch managed.

If the user wants to create a material without batch management then he only needs to select a reference material which is not batch managed.

So instead of changing the batch management indicator he only needs to be smart enough to choose the right reference material.

Because of this uncontrolled workaround I do not see any sense in restricting the change of BM indicator.

What is the logic behind this? What was explained to this user how he shall create materials. I mean he must have some guidance weather a material is to be created with or without batch management, isn't it?  If he shall not create BM materials, then you can just check if the indicator is active or not. In a real change via MM02 you can always compare the BM indicator from the structure to be saved with the BM indicator from table MARA (or MARC in case of plant specific batch management)