Skip to Content
0
Apr 17, 2020 at 11:09 AM

ABAP Cloud: Field-Names in CDS and Behavior Definition

272 Views

Hello,

I have created an (Interface) CDS-View on a simple table.

@AbapCatalog.sqlViewName: 'ZFCONF'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: 'Configuration'
define root view ZFlatConfig
  as select from z_fconfig
{
  key config_key as ConfigKey,
  config_value as ConfigValue
}

I want to have a managed service for the cud-Operations. But When I create the Behavior-Definition, it says that the names of the properties in the CDS-View must be the same as in the persistent table.

managed;

define behavior for ZFConfig
persistent table z_fconfig
lock master
//authorization master ( instance )
//etag master <field_name>
{
    field (mandatory) ConfigKey, ConfigValue;

  create;
  update;
  delete;
}

Error-Messages (Only one, but the same for all other columns):

Field 'CONFIGKEY' of CDS view 'ZFCONFIG' must be named 'CONFIG_KEY' as in the persistent table

Is it possible to (maybe) define aliases in the behavior-definition? Or is the maybe an other solution?

By the way, I dont find any limitations like that in the official documentation.