You may have read our blog post Custom fields are now available for "Manage Customer Line Items" and "Manage Supplier Line Items", in which we introduced custom fields for the Manage Customer Line Items app and the Manage Supplier Line Items app. In this blog post, we’d like to give you a more detailed example and use case for custom fields.
Please note that at time of writing, this feature is only available in SAP S/4HANA Cloud Public Edition.
Let’s assume you want to display profit center information in the Manage Customer Line Items app. As explained in our blog post on How to Display Profit Center Assignments for AR/AP Line Items, you may need this because the Manage Customer Line Items app usually shows exactly one line item per invoice, but revenue postings can be distributed over different profit centers. You would see this as separate line items in the Manage Journal Entries app.
In our example, you want to display the profit center with the highest amount in the Responsible Unit custom field in the Manage Customer Line Items app. To do so, you must simply follow this five-step procedure:
You open the Custom Fields app and create the Responsible Unit custom field in the Accounting: Journal Entry Item business context.
The following screenshot shows the dialog box in which you enter your details to create the custom field:
You then enable the field for the Manage Customer Line Items app and publish your custom field. For more information, see How to Enable Custom Fields.
The following screenshot shows the search result for Customer Line Item on the User Interface tab. The Enable Usage column is highlighted.
The following screenshot shows that the field usage has been enabled in the OData service and the related usage in the relevant CDS view:
The custom field has now been defined and is available in the Manage Customer Line Items app. The following screenshot shows the field in the Settings dialog box.
To set a value in the newly-created custom field, you can implement a custom logic that determines a value for the custom field.
To do so, you open the Custom Logic app to create your implementation of the Journal Entry Substitution (FIN_ACDOC_SUBSTITUTION) extension point. For more information, see Creating Implementations.
The following screenshot shows the extension point search result:
Once you’ve published the implementation, you can write your custom code.
The following code snippet gives you an idea of how you can define which data you want to display in your Responsible Unit custom field in the Manage Customer Line Items app. Note that this code snippet is for demonstration purposes only.
In our example, you want to display the profit center from the G/L line item that has the amount.
This new custom logic is applied to all new and changed items only. To test the custom logic, simply select an existing line item, use the Edit Line Item function, and change the item.
Thanks for reading this blog post. We hope that it gave you an idea of how you can use custom fields to enhance the Manage Customer Line Items app. The same is possible for the Manage Supplier Line Items app, too.
Feel free to leave any comments you may have below.
For more information about the apps, see:
Manage Customer Line Items
Manage Supplier Line Items
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 | |
1 |