Background
In the B2B integration process (scope item 2EL, 4A1) between S/4 supplier and external buyers, buyers normally need to provide information required from supplier side, for example, customer ID which is defined in the supplier system to represent buyer. If buyer uses S/4HAHA Procurement, the customer ID is maintained as “Account at Supplier” in supplier master data.
The “Account at Supplier” is sent from buyer as “Sold-to Party” and it is used to determine other business partners in supplier system according to the party mapping maintained in SSCUI 101300 “Convert External to Internal Partner Numbers”. See SSCUI example below, the “Customer ID” is required to maintain business partner mapping entry.
However, in S/4HANA B2B integration, we cannot guarantee buyers transfer “Customer ID” to supplier system via EDI message, but having “Customer ID” is critical to create sales order in supplier side. Therefore, it is imperative to provide a mechanism to determine business partner and other required information within supplier side based on what buyers can provide.
Configurable Parameters & Formulas (CPF) provides a good opportunity to allow customer define business rules to determine EDI required information based on data what is provided by buyer. There are two CPF usages provided by S/4HANA Q2C:
- S04: Flexible sales area and order type determination
- S05: Flexible internal business partner determination
This blogs shows how to utilize the CPF usages in sales B2B EDI integration process.
Business Example
Buyer creates purchase orders in S/4HANA Procurement and sends outbound EDI message to the supplier system. Supplier is using S/4HANA Public Cloud to receive EDI message and process sales order.
Because buyer is not able to pass supplier side information (like customer ID) via EDI message, supplier needs to define business rules to determine business partners based on what buyer can provide, such as buyer’s company code, purchase org, purchase group, etc.
Not only business partners are determined by business rules via CPF, sales area and sales document type are also determined by CPF business rules.
In this example, I’d like to show an example that different business partners are determined based on different purchasing group from buyer’s EDI message. For same buyer (buyer’s company code is 1010), the customer “10100002” and sales area “1010/10/00” shall be determined when purchasing group is “001′; the customer “10100004” sales area “CFP1/10/00” shall be determined when purchasing group is “002”.
Configuration Details
Before we introduce new CPF option for B2B integration process, following SSCUI apps are used for sales order inbound EDI process:
- Convert External to Internal Partner Numbers (101300)
- Assign Customer/Supplier to Sales Organization Data (101337)
These SSCUIs are used to map business partners in supplier side and determine sales area/document type. Similarly, new CPF usages are introduced to determine business partner and sales area/document type, with much more flexibility to build up business rules.
Following configurations need to be defined to enable EDI CPF features. Generic user “BPC_EXPERT” is used to define required configurations via SSCUI.
Define Formulas for Internal Partner Number
Open the SSCUI 104805 “Define Formulas for Internal Partner Number” to define CPF formula to determine internal business partner numbers.
Define Formulas
Click folder “Define Formulas” to define a formula ID and description. Once formula is defined, it is possible to activate it by clicking the active checkbox.
If no formula is active, system uses SSCUI 101300 “Convert External to Internal Partner Numbers” to determine internal partner number. It is possible to switch between old approach and new CPF approach for EDI inbound process, but customer can only set at most one CPF formula to active.
Assign Formula Parameters
Select the CPF formula and double click the sub-folder “Assign Formula Parameters”.
In this step, it is possible to select parameter catalogs which are used to build up CPF decision table. SAP has pre-delivered some standard parameter catalogs can customer can select them from search help.
In our example, following fields are selected to build up business rules:
- Buyer’s company code
- Buyer’s purchasing organization
- Buyer’s purchasing group
- Buyer party ID
- Partner function (sold-to party, ship-to party, bill-to party)
The result parameter “INTERNAL_PARTNER” is defined as result of business rule.
Define Formula Tasks
Click sub-folder “Formula Tasks” to select routine to CPF usage task.
There is only one usage task in usage “S05” to determine internal partner number. Routine “1” represents the CPF decision table is used.
Assign Parameter Priority
Select the usage task and click into sub-folder “Assign Parameter Priority” to define the parameter priority for building up column sequence of decision table.
Define Decision Table
Click to sub-folder “Define Decision Table” to define business rules
In the decision table, customer “10100002” is defined when purchase group is “001”, and customer “10100004” is defined for purchase group “002”.
Define Formulas for Sales Area and Document Types
Open SSCUI 105802 “Define Formulas for Sales Area and Sales Document Types” to define business rules for sales area and document type determination.
Select the same parameter catalogs which are used in previous formula to define decision table. Ensure the purchasing group is defined because my purpose is to use different purchasing groups to control EDI process.
Define Formulas
Assign Formula Parameters
Select the formula name and go to sub-folder “Assign Formula Parameters” to define formula parameters which are used to build up decision table
Define Formula Tasks
Click the sub-folder “Formula Tasks” to define usage task “SET_SALES_AREA” which is used to determine sales area and document type.
Assign Parameter Priority
Open the sub-folder “Assign Parameter Priority” to define the priority (sequence) of parameters.
Define Decision Table
Open the sub-folder “Define Decision Table” to define business rules.
In this business rule, the sales area “1010/10/00” is determined when purchasing group is “001”; and the sales area “CFP1/10/00” is determined when purchasing group is “002”.
E2E Testing
I have set up the communication arrangement between two S/4HANA Cloud systems to represent buyer and supplier. Here I will only focus on how CPF is used in EDI process.
Different Business Partners per Purchasing Group
Activities in Buyer
Log onto the buyer S/4HANA Cloud system with generic user “Purchaser” and open the app “Manage Purchase Orders” to create a purchase order
In the purchase order, provide the required information like supplier, purchase org, purchase group and item details. Save the purchase order and system shows message is sent.
Activities in Supplier
Log onto the supplier system and open the app “Message Dashboard”. The prerequisite of this step is to make sure you have assigned AIF namespace “/SDEDI” into your user to monitor the AIF messages.
Click into the message to check the log messages. The sales order 35203 is created by purchase order 4500000714 which was created in previous step.
Open the sales order, the partners maintained in the CPF business rules are determined.
Because the purchasing group 001 is sent from buyer, business partner “10100002” is determined in the sales order based on business rules defined in CPF decision table.
Activities in Buyer
Log onto the buyer system to create another purchase order with purchasing group “002”.
Status shows the output messages of purchase order are sent.
Activities in Supplier
Open the message dashboard to check the inbound EDI message.
With the EDI message of purchase order 4500000715, sales order 35204 is created.
Open the sales order to check the business partner and sales area
Because the purchasing group “002” is passed from buyer system, the business partner “10100004” and sales area “CFP1/10/00” are determined based on business rules defined in CPF.