
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.
Enable the usage of this field for Sales Document to Pricing Communication on Item Level on the Business Scenarios tab.
On the User Interfaces tab, enable the usage for the Manage Sales Orders – Version 2 app.
Publish your custom field. The custom field is created in two business contexts: Sales: Pricing Communication Item and Sales: Sales Document Item.
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.
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.
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.
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.
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.
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.
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.
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.
8. Create condition records for the condition type
Open the Manage Prices - Sales app. Create a condition record for condition type ZIMS.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |