There are a lot nice to have validations on purchasing documents that can be implemented based on business requirements. These changes can be implemented using BADIs or via configuration. SAP has few useful checks that inbuilt while creating or saving the purchasing documents. Here is one of functionality that achieved using the configuration that when Material code entered in PO item data then disable change on materials description
- Readers have experience in material management and configuration
How to implement the functionality
Requirement- Materials description changes should not be allowed when the material code (EKPO-MATNR) already has a value. This can be achieved
- Create a document type that can only purchase with material codes and creating the screen variant. Steps are
- Copy standard document NB and create a new document type-SPRO–>Materials Management–>Purchasing–>Purchase Order–>Define Document Type–e.g Material PO (ZMPO-document type)
- Copy standard screen variant NB and create a new document type-SPRO–>Materials Management–>Purchasing–>Purchase Order–>Define Screen Layout at Document Level – SAP standard Variant type NBF copied and created ZMPO- Save your entries.
- Click on your new variant ZMPO-then click on details button –>Basic Data, item–>Short Text — uncheck the radio button from the optional and check the radio button display
5. Assign the newly created field selection key to the purchase order document type
Configuration using field selection keys per document type one can achieve subject requirement and can influence other fields as well for given document type.
It is a consultant choice to choose the method that makes more sense for the system and meets the business requirement.
if you do not want to use field selection key assignment and still want to implement this functionality. You can also implement the standard BADI to achieve this requirement with the help of our favorite team members known as ABAPers
- BADI Name-ME_PROCESS_PO_CUST and method PROCESS_ITEM
- Logic -Error message if the purchase order item level material text (EKPO-TXZ01) does not match with the Material description in MAKT table for MAKTX
Note- The reason to chose different the document type is to achieve different release strategy, number range, and field selection key to few more field mandatory.