Hi,
Are you an SAP MM consultant assigned with the task of blocking specific purchasing groups for use in material master of SAP?
Are you an SAP MM consultant assigned with the task of blocking specific purchasing groups for use in material master of SAP?
Don't worry. I'll explain how to achieve this in this blog.
Business scenario: As you might be aware, the buyers in an organisation are assigned to a Purchasing Group in SAP. In due course,a buyer may get transferred to another department or may leave the organisation. In such a scenario, the purchasing group assigned to him should not be used anywhere in SAP. For example, the particular purchasing group should not be assigned to any new/existing material in the material master. How to achieve this?
Solution & Implementation:
The requirement can be achieved using setids and a BADI enhancement.
1. Create a new setid with a suitable name for eg. "BLOCK_PURCH_GRP" using transaction GS01
Specify table = MARC, field = EKGRP and "Basic set" radio option. In the details screen, give a suitable short text (description of the setid) and in the from-to fields, specify single values/ranges for purchasing groups to be blocked.
2. The next step is to write ABAP code to check the value of Purchasing Group in the Purchasing view of the material master. This validation can be performed at the time of saving the material master. The badi "BADI_MATERIAL_CHECK" can be used to perform to perform this validation. Create a new implementation with a suitable name for eg. "ZBADI_MATERIAL_CHECK" under this BADI. The necessary code to validate the purchasing group can be written in the method "CHECK_DATA". The code will basically check if the value of the purchasing group has been changed and whether the new value is in the blocked list. If it is in the blocked list, then program should throw an error message.
3. To unblock a purchasing group, go to transaction GS02 and call the setid "BLOCK_PURCH_GRP"and delete the entry for the purchasing group. Unblocking would be required if the blocked code is to be released and reassigned to another buyer.
In a similar manner, the MRP controller (planner) could also be blocked for use in material master. I will be explaining this in a separate blog.
2. The next step is to write ABAP code to check the value of Purchasing Group in the Purchasing view of the material master. This validation can be performed at the time of saving the material master. The badi "BADI_MATERIAL_CHECK" can be used to perform to perform this validation. Create a new implementation with a suitable name for eg. "ZBADI_MATERIAL_CHECK" under this BADI. The necessary code to validate the purchasing group can be written in the method "CHECK_DATA". The code will basically check if the value of the purchasing group has been changed and whether the new value is in the blocked list. If it is in the blocked list, then program should throw an error message.
3. To unblock a purchasing group, go to transaction GS02 and call the setid "BLOCK_PURCH_GRP"and delete the entry for the purchasing group. Unblocking would be required if the blocked code is to be released and reassigned to another buyer.
In a similar manner, the MRP controller (planner) could also be blocked for use in material master. I will be explaining this in a separate blog.
No comments:
Post a Comment