SAP Knowledge Base Article - Public

3463309 - Ext. Material Group (EXTWG) is not getting fetched in Sales Order for Pricing - S/4HANA Cloud

Symptom

The field 'External Material Groups' (EXTWG) is added to a condition table to determine condition record in sales order.
But while creating the sales order 'External Material Group' is not getting fetched in sales order.

Environment

SAP S/4HANA Cloud 2402

Reproducing the Issue

  1. Create a Sales Order
  2. Enter Sold-to Party and Material
  3. Check Pricing Analysis to check why the condition type is not determined
  4. In the analysis log, it clearly shows the External Material Groups (EXTWG) is null

Cause

The field MARA-EXTWG is not mapped to pricing communication structure in Sales Order.

Resolution

As a workaround, try a custom field to fulfill the requirement. Check below documentation for how to use a sales order item custom field in Pricing:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/a376cd9ea00d476b96f18dea1247e6a5/c4e2ff09c1b948c081d674c225f6c513.html?locale=en-US

For example, 

1. The Custom Field should be created via Custom Fields app with the following Settings:

  • Business Context: Sales: Sales Document Item
  • Label: for example "ExternalProductGroup" => Identifier "YY1_ExternalProductGroup"
  • Type: Character
  • Length: 18
  • Business Scenario "Sales Document to Pricing Communication on item level" needs to be enabled

2. To populate the custom field with the right value from MARA, you can use the following Cloud BAdI: "Modification of Item Custom Fields in Sales Documents" (SD_SLS_MODIFY_ITEM). The BAdI can be implemented in "Custom Logic" app and the implementation could look like follows: 

* First of all assign existing extension field values to output parameter:
salesdocumentitem_extension_o = salesdocumentitem_extension_i. 
Select SINGLE ExternalProductGroup from I_Product with privileged access where product = @salesdocumentitem-material into @salesdocumentitem_extension_o-YY1_ExternalProductGroup_SDI.

Keywords

KBA , SD-SLS-EXT-2CL , Extensibility (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition 2402