We have been given a requirement where we must add a set of custom fields that would be calculated only to BP – Manage Credit Account (App ID F4596) – Credit Management.
Challenge: The current system is an S4 HANA system version 2021, where CFL (Custom Fields and Logic) has been introduced but is not available for the required App, but for higher versions, CFL can be directly used.
Solution: This app is a RAP OData Service-based application, so enhancing the consumption view will directly enable the view of the fields, that are not required to be stored in a database i.e., Virtual fields.
In this blog post, we will cover the
Extending the consumption view C_CreditMgmtAccountTP
Implementation of Virtual Element calculation class with interface IF_SADL_EXIT_CALC_ELEMENT_READ
to handle the requirement.
From the Fiori Application, Fetch the service name with Network properties (F12)
2. Fetch the required consumption details as from Service Binding and Definition.
3. Now, extend the view with respective template.
Here, add the required set of custom fields. Declaring them as VIRTUAL fields and handling the calculated with annotation