You login with the role ‘Purchaser’ in the SAP S/4HANA Cloud for your daily activities and access ‘Manage Purchase Requisitions’ app. You have a requirement to meet the following conditions when creating a new ‘Purchase Requisition’:
- The quantity of the items entered must be ten or fewer.
- The delivery date allowed is up to 180 days (about six months).
If the above two conditions are not met, then the application should throw an error message.
In the SAP Fiori app Manage Purchase Requisitions Professional, there is one released enhancement spot MM_PUR_S4_PR. At this spot, there are multiple enhancement definitions. We will identify the one relevant to our use case and implement it.
- Create a new ABAP package.
- Implement existing enhancement spot MM_PUR_S4_PR with an existing BAdI definition MM_PUR_PR_CHECK.
- Create an enhancement implementation.
- Create a BAdI implementation for the BAdI definition.
- Add the logic inside the implementation.
Log on to the development tenant of the SAP S/4HANA Cloud ABAP Environment.
Create a new ABAP Package using context menu.
Find out the enhancement spot for this requirement.
Implement the identified BAdI definition under the BADI Enhancement Spot ‘MM_PUR_S4_PR’. In this step you will now create a new enhancement implementation (also called container) within the enhancement spot ‘MM_PUR_S4_PR’.
Test the implemented code by creating a new purchase requisition via the Manage Purchase Requisitions app .