Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
WesleyZhang
Product and Topic Expert
Product and Topic Expert
5,605

As we all know, pricing is really important when it comes to sales documents. In SAP S/4HANA Cloud, you can add custom fields to sales documents using key user extensibility. You can then use these custom fields like any other standard field in your pricing configuration. When you then change the value of these custom fields in a sales document, you can modify the price of a sales document. In this blog post, we show you how to create and use a custom field in pricing. Just follow the steps!

In our example, we create a new item field for a member status in sales orders. Depending on the member status (Gold, Silver, or Bronze), you can award your customers specific discounts.

1. Create a custom field in the Custom Fields app

First, create a custom field for sales documents (business context: Sales: Sales Document Item). In this example, we create the field ITEMMEMBERSTATUS.

WesleyZhang_0-1716867138159.png

Enable the usage of this field for Sales Document to Pricing Communication on Item Level on the Business Scenarios tab.

WesleyZhang_1-1716867160733.png

On the User Interfaces tab, enable the usage for the Manage Sales Orders – Version 2 app.

WesleyZhang_2-1716866226487.png

Publish your custom field. The custom field is created in two business contexts: Sales: Pricing Communication Item and Sales: Sales Document Item.

WesleyZhang_3-1716866247643.png

Open the custom field in the Sales: Pricing Communication Item business context. On the APIs tab, enable the usage of the field for Condition Record for Pricing in Sales.

WesleyZhang_4-1716866282263.png

On the User Interfaces tab, enable the usage of the field for Manage Prices – Sales and Manage Tax Rates – Sales. This allows you to maintain the prices in the Manage Prices – Sales app in step 8.

WesleyZhang_5-1716866296452.png

2. Add the custom field to the field catalog for pricing in sales

In your configuration environment, search for the Change Field Catalog for Pricing in Sales (ID: 103118) configuration activity. Use the value help to add the custom field to the field catalog.

WesleyZhang_6-1716866313779.png

3. Add the custom field to a condition table

Search for the Create Condition Tables for Pricing in Sales (ID: 103119) configuration activity. Create a condition table and add the custom field.

WesleyZhang_7-1716866335856.png

Note down the number of the generated condition table for the next steps. In this example, we create condition table 502.

4. Create an access sequence for the condition table

Search for the Set Access Sequences (ID: 103121) configuration activity. Create an access sequence for the condition table that you created in step 3. In this example, we create access sequence ZIMS.

WesleyZhang_8-1716866365990.png

WesleyZhang_0-1716866650712.png

 

WesleyZhang_1-1716866671604.png

 

WesleyZhang_2-1716866697837.png

5. Create a condition type for the access sequence

Search for the Set Condition Types for Pricing in Sales (ID: 101120) configuration activity. Create a condition type for the access sequence that you created in step 4. In this example, we create the condition type ZIMS.

WesleyZhang_3-1716866719984.png

6. Create a pricing procedure for the condition type

Search for the Set Pricing Procedures (ID: 101117) configuration activity. Create a pricing procedure for the condition type that you created in step 5.

WesleyZhang_4-1716866751717.png

 

WesleyZhang_5-1716866760544.png

 

WesleyZhang_6-1716866771597.png

7. Set the pricing procedure determination for the pricing procedure

Search for the Set Pricing Procedure Determination (ID: 101118) configuration activity. Set the pricing procedure determination for the pricing procedure that you created in step 6.

WesleyZhang_7-1716866808382.png

8. Create condition records for the condition type

Open the Manage Prices - Sales app. Create a condition record for condition type ZIMS.

WesleyZhang_8-1716866816861.png

9. Testing your configuration

Once you're done with your configuration, add the custom field to the UI the Manage Sales Orders – Version 2 app using UI Runtime adaptation. Then, select a value for this custom field on the UI and choose Update Prices

WesleyZhang_9-1716866838851.png

You have now added a custom field for pricing to a sales document!

If you want to automatically set the value of the custom field by reading from the customer master, for example, you can also use the BAdI Modification of Item Custom Fields in Sales Documents (SD_SLS_MODIFY_ITEM). You can find further information about how to use BAdIs in sales documents in this blog post.

Additional information:

Documentation for Custom Fields in Pricing
Key User Extensibility in SAP S/4HANA Cloud Sales

 

Was this blog post helpful for you? Please share your ideas and feedback, they are very much appreciated for future blog posts.

16 Comments