Adding a Value Help for Custom Business Object fields
The Custom CDS View app can be used to create customized value helps for custom business object fields of type Association to Business Object.
The value help view needs to have the associated custom business object as primary data source.
Please refer to the following SAP Help portal link for more details:
- You have checkmarked Can Be Associated in the custom business object you want to associate.
- You have used the associated custom business object view as Primary Data Source in the Custom CDS Views app.
- Create the custom business object that will be used for the value help (Fig.1).
- Create a custom standard CDS view with the custom business object as Primary Data Source and define the join condition with the associated data source (Fig.2 and Fig.3)
- Navigate to the custom business object in which you want to use the value help view and click on the Fields tab.
- Create a new field or select an already existing field.
- Select the type Association to Business Object and enter the following information:
- Business Object: Enter the technical name of the custom business object you want to associate.
- Value Help View: The automatically created value help view is selected automatically. If you want to use a customized value help, enter the technical name of the custom CDS view you have created in the Custom CDS Views app or use the value help to see all custom CDS views which use the business object as primary data source. The value help view is pre filled automatically for standard business objects.
- Publish your custom business object, maintain the business catalogs, go to the generated UI to create a new entry in the custom business object.
- Use the search help to select the desired value (Fig. 4)
- We created a custom business object to be used as value help;
- We used the Custom CDS view app to create a custom CDS view with the associated custom business object as primary source;
- We created a custom business object with a field in which we want to use the value help view, we selected type “Association to Business Object” , selected the technical name of the custom business object we want to associate (Business Objects) and entered the technical name of the custom CDS view we created in the Custom CDS Views app (value help view).
If you’d like to ask questions, share feedback and thoughts, please use the comment section and/or post questions in the SAP S/4HANA Cloud Extensibility community.
That’s all for now and I hope you found this blog helpful!
Great Blog Rosaria. Gives us good insight into the Workings of CDS.
Followed your bog and creating below custom value help.
we are not able to see any data in CDS preview . could you please help.
Related Question & Answers: https://answers.sap.com/questions/13610667/adding-standard-cds-view-as-value-help-for-custom.html
Thanks for this great guide, Rosaria!
In the meantime (since 2202), there is also a dedicated Custom CDS Views "Value Help" scenario available, that has some additional advantages over using a standard Custom CDS View.
Some more details can be found here:
SAP Help: Adding a Value Help with the Custom CDS Views App
SAP Help: Value Help Scenario
Hi Rosaria Dipaola,
Thank you for your post!
I've tried the same but the table/view that i wanted doesn't exist in the associated source for mapping.
The database table on On-premise is T856 (Transaction Types), value help of field is TRTYP (Transaction type).
Do you know how we can incorporate this in custom CBO as a value help/search help?
Thanks in advance.