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:
https://help.sap.com/viewer/e0cd7c1ecf3d4f2f9feb46ec1c5b68fb/2111.500/en-US/93f6abd65d754b38b259ca6a...
Prerequisites
- 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.
Process Steps
- Create the custom business object that will be used for the value help (Fig.1).
Fig.1 Custom Business Object
- 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)
Fig. 2 Custom CDS View
Fig. 3 Join condition
- 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.
Fig. 3 Association to Business Object with custom value help
- 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)
Fig. 4 Value help from the Custom CDS view
Summary
To summarize:
- 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!
Thanks,
Rosaria (Rosie)