SAP Knowledge Base Article - Public

3422413 - CDS view created in development tenant (ABAP Environment) is not supported in Custom Fields type "Code List based on CDS View" - SAP S/4HANA Cloud Public Edition

Symptom

[1] User has created a data definition in the context of developer extensibility (ABAP Environment) using ABAP Development Tools (ADT) but the view is not available in Custom Fields of type "Code List based on CDS View".

[2] User has created a C1-released data definition in the context of developer extensibility (ABAP Environment) using ABAP Development Tools (ADT), then a custom CDS view of type Value Help in the context of key user extensibility (using the Custom CDS Views application) is created with the C1-released data definition as main data source, but it is not supported for use in Custom Fields of type "Code List based on CDS View".

Getting error messages "Use of element XYZ in YY1_XYZVH is not allowed", "CDS View YY1_XYZVH has relations to developer extensibility artifacts", "Relations to developer extensibility are not allowed in custom fields", "CDS View YY1_XYZVH uses not allowed data source ZABC".

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

[1] In development tenant,

  1. Creating a data definition ZABC in ABAP Environment.
  2. Release it as C1 with Use in Key User Apps and Use in Cloud Development enabled.

In customizing tenant,

  1. Accessing the Custom Fields app.
  2. Create a new custom field.
  3. Choose "Code List based on CDS View" as type.
  4. Searching for the view ZABC.
  5. The view is not available.

   

[2] In development tenant,

  1. Creating a data definition ZABC in ABAP Environment.
  2. Release it as C1 with Use in Key User Apps and Use in Cloud Development enabled.

In customizing tenant,

  1. Accessing the Custom CDS views application.
  2. Creating a custom CDS view type Value Help (YY1_XYZVH) with main data source ZABC.
  3. Accessing the Custom Fields app.
  4. Create a new custom field.
  5. Choose "Code List based on CDS View" as type.
  6. Searching for the view YY1_XYZVH
  7. The following error messages are displayed:
    1. "Use of element XYZ in YY1_XYZVH is not allowed"
    2. "CDS View YY1_XYZVH has relations to developer extensibility artifacts"
    3. "Relations to developer extensibility are not allowed in custom fields"
    4. "CDS View YY1_XYZVH uses not allowed data source ZABC"

Cause

  • Only C1 released custom entities, key user custom CDS views (with no relation to developer extensibility C1-released data definitions) and SAP (C1 released) CDS views are supported.
  • Custom CDS views (data definitions) created with ABAP Environment are not supported.

Resolution

You can refer to the following documentation for alternatives:

  1. SAP Help - Creating a Field of the Type Code List Based on CDS View: Example
  2. SAP Help - Value Help

  

As alternative, it is possible to use a Custom Business Object instead.

In order to create a Custom field based on CBO data, you can follow two approaches:

  • "Association to Business Object" type: you can select the custom business object directly.
    You should be able to create a custom field (type "Association to Business Object") and choose the CBO directly.
  • "Code List based on CDS View" type: you can create a custom CDS view(value help scenario) on top of the CBO view. Please refer to Value Help.
    You could create a custom CDS view(value help scenario) and use the CBO data source. Then, you can create a custom field type "Code List based on CDS View" and use the created custom CDS view(value help).

      

Alternatively, you can create a custom entity as per Using a CDS Custom Entity for Data Modeling | SAP Help Portal.

For more information, please refer to 

See Also

Please refer to the documentations below:

Keywords

custom cds view, custom field, Code List based on CDS View, adt, 3sl, value help scenario, custom entity, abap environment, s/4hana cloud, developer extensibility, data source, allowed, abap development tools, eclipse, Use of element XYZ in YY1_XYZVH is not allowed, CDS View YY1_XYZVH has relations to developer extensibility artifacts, Relations to developer extensibility are not allowed in custom fields, CDS View YY1_XYZVH uses not allowed data source ZABC, c1-released, c1, value help , KBA , BC-SRV-APS-EXT-FLD , Custom Fields , Problem

Product

SAP S/4HANA Cloud Public Edition all versions