Skip to Content
Product Information
Author's profile photo Amudha R V

Business Logic Extensions (Cloud BAdIs) in Sourcing and Procurement – Self-Service Procurement

Business Logic Extensions (Cloud BAdIs) in Sourcing and Procurement – Self-Service Procurement

Purpose

This content explains the different business logic extensions that can done using cloud BAdIs, in Self-Service Procurement.

Overview

As part of In App Extensibility there are multiple extension points for Custom Logic (Cloud BADIs) in Self-Service Procurement. You, as a business expert or implementation consultant, can use the Custom Fields and Logic app to customize your applications using the following BAdIs:

BAdIs for handling Transactional Data

Name

Use

Trigger Condition

MM_PUR_S4_SSPPR_CHK_DRAFT_ITEM

Validates/Checks draft purchase requisition Item

Adding an item, updating any field of an item or deleting an item in the shopping cart

MM_PUR_S4_SSPPR_MOD_DRAFT_ITEM

Updates purchase requisition item attributes via custom logic of draft item

Creating an item (i.e. Adding an item to cart). Updating an item (Saving an item in cart after update)

MM_PUR_S4_PR_FLDCNTRL_SIMPLE

Manages the field control (Mandatory, Optional, Read Only, Disabled) of purchase requisition item attributes

Retrieving field control while creating an item (i.e. Adding an item to cart), updating an item (Saving an item in cart after update)

MM_PUR_S4_PR_CHECK

Checks the correctness of all the items just before placing an order

Choosing ‘Order’ in shopping cart.

MM_PUR_S4_PR_MODIFY_ITEM

Updates item attributes via custom logic just before placing an order

Choosing ‘Order’ in shopping cart.

MMPUR_OCI_TO_DRAFT_ITM_MAPPING

Modifies/enhances standard mapping between punchout item and its corresponding draft item

Checking out of item from the Punch-out website

BAdIs for handling Configurations

Name

Link to Details

MMPUR_WORKFLOW_AGENTS_V2(Workflow Agent determination)

https://launchpad.support.sap.com/#/notes/2646400

SWF_WORKFLOW_CONDITION_DEF (Providing additional conditions for scenarios) SWF_WORKFLOW_CONDITION_EVAL (Value evaluation of additional conditions for scenarios)

https://launchpad.support.sap.com/#/notes/2767845

MM_PUR_S4_PR_WFL_RESTART (Define Conditions to Restart Flexible Workflow)

https://launchpad.support.sap.com/#/notes/2846174

BAdIs for handling Master Data

Name

Details

MMPUR_CAT_TRANS_EXTRACT_DATA (Enrich data before persisting to the staging area)

This is used to enrich the data while extracting the catalog items from the catalog provider before persisting to the staging area

Details[SP1]

Check/Validate Draft Purchase Requisition Item

The cloud BADI MM_PUR_S4_SSPPR_CHK_DRAFT_ITEM is available for validating the consistency of the draft item in the shopping cart.

You can use this BAdI to implement your own custom logic for validating the shopping cart item. The implemented logic will be invoked for each of item in the cart while creating, updating and deleting an item.

CHECK_DRAFT_ITEM is the BADI interface method.

Following importing parameters are the input for the BADI interface:

1. PURCHASEREQUISITIONITEMCHECK [Structure]: Contains all the standard Item fields available for validation/checking

Import Fields for parameter PURCHASEREQUISITIONITEMCHECK

Field Description

REQUESTEDQUANTITY

Purchase Requisition Quantity

CURRENCY

Currency Key

ACCOUNTASSIGNMENTCATEGORY

Account Assignment Category

NETPRICEQUANTITY

Price Unit

BASEUNIT

Purchase Requisition Unit of Measure

DELIVERYDATE

Item delivery date

FIXEDSUPPLIER

Fixed Supplier

SUPPLIER

Desired Supplier

PURCHASINGINFORECORD

Number of Purchasing Info Record

PURCHASECONTRACT

Number of Principal Purchase Agreement

PURCHASECONTRACTITEM

Item Number of Principal Purchase Agreement

MANUALDELIVERYADDRESSID

Address

MATERIAL

Material Number

MATERIALGROUP

Material Group

PLANT

Plant

PURCHASEREQUISITIONITEMTEXT

Short Text

PURCHASEREQUISITIONPRICE

Price in Purchase Requisition

COMPANYCODE

Company Code

PURCHASINGORGANIZATION

Purchasing Organization

PURCHASINGGROUP

Purchasing Group

PURREQNSSPCATALOG

Technical Key of a Web Service (for Example – a Catalog)

PURREQNSSPCATALOGITEM

Catalog Item

PURREQNSSPCROSSCATALOGITEM

Catalog Item Key

EXTMATERIALFORPURG

Material of External System

EXTFIXEDSUPPLIERFORPURG

Fixed Supplier of External System

EXTDESIREDSUPPLIERFORPURG

Desired Supplier of External System

EXTCONTRACTFORPURG

Contract of External System

EXTCONTRACTITEMFORPURG

Contract Item of External System

EXTINFORECORDFORPURG

Info Record of External System

EXTPLANTFORPURG

Plant of External System

EXTCOMPANYCODEFORPURG

Company Code of External System

EXTPURGORGFORPURG

Purchasing Organization

EXTSOURCESYSTEM

Communication System ID

PROCUREMENTHUBSOURCESYSTEM

Connected System ID

SUPPLIERMATERIALNUMBER

Material Number Used by Supplier

OPNCTLGMAINIMAGEURL

Catalog Main Image URL

FULLNAME

Full name of a party (Bus. Partner, Org. Unit, Doc. address)

CAREOFNAME

c/o name

ADDRESSSTREETNAME

Street

ADDRESSHOUSENUMBER

House Number

ADDRESSPOSTALCODE

City Postal Code

ADDRESSCITYNAME

City

PHONENUMBER1

Telephone no.: dialling code+number

FAXNUMBER

First Fax No.: Area Code + Number

ADDRESSREGION

Region (State, Province, County)

ADDRESSCOUNTRY

Country Key

EMAILADDRESS

Email Address

FORMOFADDRESS

Form-of-Address Key

LANGUAGE

Language Key

MULTIPLEACCTASSGMTDISTRIBUTION

Distribution Indicator for Multiple Account Assignment

PRODUCTTYPE

Product Type Group

SERVICEPERFORMER

Service Performer

PERFORMANCEPERIODSTARTDATE

Start Date for Period of Performance

PERFORMANCEPERIODENDDATE

End Date for Period of Performance

PROCESSINGSTATUS

Processing status of purchase requisition

PURREQNITEMCURRENCY

Currency Key

PURREQNSSPREQUESTOR

Requestor

2. PURCHASEREQUISITIONITEMEXT [Structure] – Contains the custom fields created using in app extensibility

Following are the Export Parameters for the BADI

1. MESSAGES [Table]: List of validation/check message populated from the custom logic

Field in the exporting parameter
structure MESSAGES

Field Description

MESSAGETYPE

Message Type

MESSAGEID

Message Class

MESSAGENUMBER

Message Number

MESSAGEVARIABLE1

Message Variable

MESSAGEVARIABLE2

Message Variable

MESSAGEVARIABLE3

Message Variable

MESSAGEVARIABLE4

Message Variable

DOCUMENTNUMBER

Purchasing Document Number

DOCUMENTITEMNUMBER

Item Number of Purchasing Document

ACCOUNTASSIGNMENTNUMBER

Sequential Number of Account Assignment

SCHEDULELINE

Delivery Schedule Line Counter

Modify/Update a Draft Purchase Requisition Item

The cloud BADI MM_PUR_S4_SSPPR_MOD_DRAFT_ITEM is available for updating the draft item attributes in the shopping cart.

You can use this BAdI to implement your own custom logic for updating item attributes int the shopping cart item.

The implemented logic will be invoked for each of item in the cart while creating and updating an item.

MODIFY_DRAFT_ITEM is the BADI interface method.

Following are the Changing Parameters for the BADI

1. PURCHASEREQUISITIONITEMCHANGE [Structure]: Contains all the standard Item fields available for modification/updating

Import Fields for parameter
PURCHASEREQUISITIONITEMCHANGE

Field Description

REQUESTEDQUANTITY

Purchase Requisition Quantity

CURRENCY

Currency Key

ACCOUNTASSIGNMENTCATEGORY

Account Assignment Category

NETPRICEQUANTITY

Price Unit

BASEUNIT

Purchase Requisition Unit of Measure

DELIVERYDATE

Item delivery date

FIXEDSUPPLIER

Fixed Supplier

SUPPLIER

Desired Supplier

PURCHASINGINFORECORD

Number of Purchasing Info Record

PURCHASECONTRACT

Number of Principal Purchase Agreement

PURCHASECONTRACTITEM

Item Number of Principal Purchase Agreement

MANUALDELIVERYADDRESSID

Address

MATERIAL

Material Number

MATERIALGROUP

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sai Giridhar Kasturi
      Sai Giridhar Kasturi

      Thanks for sharing..

      Author's profile photo Anup Nair
      Anup Nair

      Thank you Amudha R V for this Information. In addition could you please add, if it is possible to create custom error messages with translations? (Specially for the Validation BAdI's)

      Author's profile photo Mithun Kumar
      Mithun Kumar

      Thanks Amudha R V
      Can you please also update the links to the individual BAdI's as they now point to a docx file which is not in any server... (file:///C:/S4H/1911_Backlogs/CallRateReduction/Blogs/SSP%20BADIs/Cloud%20BADIs%20in%20SSP%20V3_No%20Track%20Changes.docx#_Modify/Update_Purchase_Requisition)

      Author's profile photo Radovan Skalecky
      Radovan Skalecky

      Hello,
      thank you for this blog. I have a question concerning MM_PUR_S4_SSPPR_MOD_DRAFT_ITEM.
      I can see the field MANUALDELIVERYADDRESSID in structure PURCHASEREQUISITIONITEMCHANGE.
      Does it mean I can change the delivery adress based on custom logic to different adress beside "Plant" and manual "User Entry" ?

      My point is to determine delivery adress (different from Plant) withoiut having user entering adress manualy.
      What is the example of code to add to BAdI to change delivery adress ?
      Is this address ID the same as is used in field "Adress" in Purchase requisition Advanced ?

      thank you very much for your support.
      Radovan