cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Entity Hierarchy Value Help

Reserve
Explorer
0 Likes
362

Hello Experts,

We have a requirement to extend a Fiori application by adding a custom field with a hierarchical value help. However, the application is not released for cloud development, which means using CDS-based hierarchy value help is not supported.

As an alternative, we are considering creating the hierarchy value help using a custom entity and exposing it for consumption in the custom field as a code list based on a CDS view.

We are not sure if this approach is feasible in this scenario. Any guidance or recommendations would be greatly appreciated.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Chris1973
Active Contributor
0 Likes

Good day @Reserve 

Thank you for your question.

The answer to your proposed workaround, the answer is partly yes, but not as a true hierarchical value help.

A custom field of type Code List based on CDS View can use a value help view, and the defined value help is used in extended applications as the value help for the custom field.

3612451 - Custom Fields - Frequently Asked Questions - SAP S/4HANA Cloud Public Edition - SAP for Me

https://help.sap.com/docs/SAP_S4HANA_CLOUD/0f69f8fb28ac4bf48d2b57b9637e81fa/acb2907f362944a5a9e1b5eb...

However, this option gives you a flat value help list, not a real expandable hierarchy value help. So, if your business requirement is that the user must browse parent and child nodes in a tree structure inside the value help, then this is not the right supported workaround for an app that is not released for cloud development.

This basically means that:

  • You can create a custom field if the business context of the app supports key user extensibility.
  • You can expose allowed value help data through a Code List based on CDS View.
  • You can also consider a Custom Business Object as the source and create a custom CDS value help view on top of it.
  • Note that a Code List based on CDS View will behave like a normal value help list, not like a hierarchical tree.
  • If the CDS View or data definition comes from developer extensibility and is not supported for the Custom Fields app, it may not be available or may fail when you use it.
  • Do not use unreleased application artifacts only to force a hierarchy value help.

See KBA 3422413 for details on the supported interaction between CDS views in the ABAP Environment and Code List based on CDS View.

So, my recommended approach is:

  • Use a flat code list value help if the hierarchy is only needed for classification but the user can select from a flat list.  For example, maintain values such as:

Code Description               Parent Node

A100 Europe Sales             A000

A110 Germany Sales          A100

A120 Switzerland Sales     A100

The filed remains flat, but you can include the parent node or hierarchy path as an additional descriptive field.

  • If the values are customer owned, create a Custom Business Object for the value list. Then either use the custom field type Association to Business Object or you create a Custom CDS View with the Value Help scenario on top of the Custom Business Object and use it as Code List based on CDS View. This aligns with KBA 3422413
  • If you are working in a 3-system landscape and the object is properly released and supported, a custom entity can be used for ABAP implemented value help. But this does not remove the limitation of the target application. If the app or business context does not support the field or value behaviour, it will not become a supported extension just because a custom entity exists. KBA 3612451 provides more details.
  • If the business requires a true hierarchical value help with expandable nodes, then this is not a standard key user workaround for an application that is not released for cloud development.

There is no clean-core recommendation to bypass the unreleased app restriction. You may consider raising influence request or incident to request for support.

 

Let me know if you have further questions.

Best regards

Chris

Reserve
Explorer
0 Likes
Thank you Chris for your explaination, appreciate it,

Answers (1)

Answers (1)

sravan_aleshwaram
Participant
0 Likes

Hello 

True hierarchy value help is not possible because the app is not released for cloud development (no CDS hierarchy support).
Custom entity + CDS value help is feasible only as a flat code list , not hierarchical.

Build a custom CDS view / entity for value help
Use it as a code list for the custom field
Handle hierarchy logic (if needed) outside the Fiori value help (e.g., backend or UI logic)

Thanks,
Sravan