Key User Extensibility: Create a Custom Code List with a Custom CDS View in SAP S/4HANA Cloud
In this blog, I will take you through the steps for creating a Code List with a Custom CDS View in SAP S/4HANA Cloud.
With this feature, you can create Custom fields which uses Custom CDS views as code lists. This means that you can create a custom CDS view that will fetch data from released data sources of your choice and then you can use that CDS view as a source for your custom field, thereby increasing the scope of Custom fields vastly.
Create a Custom Field
Create a custom field by selecting the tile Custom fields and Logic under the Group Extensibility
Create a new Field with type as ‘Code List with Custom CDS View’ and select the Custom CDS view from the drop-down list
I have already created a custom CDS view YY1_CUSTOM, which fetches all the purchase orders created in the system and I will use this CDS view to create the new Field. You can refer the blog for more information on how to Create a custom CDS view in SAP S/4HANA Cloud
Once I click on create and edit, I will maintain the necessary UI’s and reports which will use this field.
Save and Publish the custom field.
Now, since this is added to the Sales Order GUI, you will be able to see this custom field added under the tab Custom Fields in Sales Order Header.
When I click on the search help field, it will open up the Purchase Order list which is returned from my Custom CDS view
I can select a Purchase Order from the list as a Reference Purchase Order and save the Sales Order.
This shows how simple and powerful it is to add a new F4 help which fetches data directly from the released data sources, instead of fetching from code lists.