Exercise: Implementing an Extension Using Key User and Developer Extensibility ​

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Implement a Key-User and Developer Extensibility at the item level for a purchase requisition

Implement a Key-User and Developer Extensibility

Business Scenario

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 new requirement when managing/updating the previously created Purchase Requisitions:

  • A new standard field ‘Desired Supplier’ needs to be added to the standard Purchase Requisition at the item level under the General Information tab.
  • The following business conditions are to be added to the purchase requisition when updating:
    • The purchase requisition document type is ‘NB’.
    • The field Desired Supplier is to be validated against an existing supplier.
    • In case user picks any other supplier, a warning message needs to be displayed.
    • Users can use this as a desired supplier, or can continue to use another and save purchase requisition.

Solution Approach

  • Extend the existing Manage Purchase Requisitions app at item level via Key-User Extensibility with an existing standard field ‘Desired Supplier’ available from the backend source.
  • Implement existing enhancement spot MM_PUR_S4_PR with an existing BADI definition MM_PUR_S4_PR_MODIFY_ITEM.
  • Create a BAdI enhancement implementation.
  • Add the new BAdI implementation for the BAdI definition MM_PUR_S4_PR_MODIFY_ITEM.
  • Create a new implementing Class.
  • Add the logic inside the implementing class.

Steps

  1. Extend the standard Manage Purchase Requisitions app at the line-item level. Include a new standard field ‘Desired Supplier’.  Add this field in the ‘General Tab’ section at the line-item level. 

  2. The scenario we are working on is a change scenario; hence we need to find out a BAdI that can be used at the item level in a purchase requisition. 

  3. Create the BAdI Enhancement Implementation. 

  4. Test your implemented code by changing an existing purchase requisition via Manage Purchase Requisitions app. 

Result

Save progress to your learning plan by logging in or creating an account