S/4HANA Q2C Sales Flexibility – Determine Business Partner and Sales Area in B2B EDI Integration

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.

Account%20at%20Supplier

Account at Supplier

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.

SSCUI%3A%20Convernt%20External%20to%20Internal%20Partner%20Number

SSCUI: Convernt External to Internal Partner Number

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 (SAP help link)
  • S05: Flexible internal business partner determination (SAP help link)

This blogs shows how to utilize the CPF usages in sales B2B EDI integration process.

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”.

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.

Define%20CPF%20Formula

Define CPF Formula

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”.

Assign%20Formula%20Parameters

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. Please read SAP help document to find out all parameters SAP supports in CPF usage “S05”.

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.

Define%20Formula%20Task

Define Formula 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.

Assign%20Parameter%20Priority

Assign Parameter Priority

Define Decision Table

Click to sub-folder “Define Decision Table” to define business rules

Business%20Rules%20-%20Internal%20Business%20Partners

Business Rules – Internal Business Partners

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

Define%20Formulas

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

Assign%20Formula%20Parameters

Assign Formula Parameters

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.

Formula%20Taks

Formula Tasks

Assign Parameter Priority

Open the sub-folder “Assign Parameter Priority” to define the priority (sequence) of parameters.

Assign%20Parameter%20Priority

Assign Parameter Priority

Define Decision Table

Open the sub-folder “Define Decision Table” to define business rules.

Busienss%20Rules%20-%20Determine%20Sales%20Area%20and%20Document%20Types

Business Rules – Determine Sales Area and Document Types

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”.

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

Purchase%20Order%20with%20Purchasing%20Group%20001

Purchase Order with Purchasing Group 001

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.

Purchase%20Order%20is%20Saved

Purchase Order is Saved

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.

Message%20Dashboard

Message Dashboard

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.

AIF%20Message%20Log

AIF Message Log

Open the sales order, the partners maintained in the CPF business rules are determined.

Sales%20Order%20Overview

Sales Order Overview

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”.

Purchase%20Order%20with%20Purchasing%20Group%20002

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.

Message%20Dashboard

Message Dashboard

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

Sales%20Order%20Overview

Sales Order Overview

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.

CPF provides more flexibility to control sales EDI process. It can be used as extension of existing mapping SSCUIs for EDI process. Customer can switch between old mapping option (SSCUI 101300 and 101337) and new CPF approach.

However, there are still restrictions in CPF approach, e.g. the feature of multiple BP addresses is not yet considered in CPF formula. Customer can only specify the address number in SSCUI 101300.