Skip to Content
0
Dec 25, 2021 at 07:19 PM

RAP - Managed Scenario - Create not working on Child node

346 Views

Hello Team,

I am exploring RAP development model and trying to build dependent BOPF /BOBF/TEXT_COLLECTION features using RAP. Create, Change and Delete functions are handled by framework but create is not working at child node and getting error message as shown in the screenshot. Help me find the mistake if I have done any!

error-screenshot.png

Here is the Behavior definition and it's projection:

managed; // implementation in class /hec4/bp_i_dd_root unique;

define behavior for /HEC4/I_DD_ROOT alias Root
persistent table /hec4/a_dd_root
lock master
//authorization master ( instance )
etag master LocalLastChangedAt
{
  create;
  update;
  delete;
  association Language { create; }

  field ( numbering : managed, readonly ) DDRootKey;
  field ( mandatory : create ) DdId, DdName;
  field ( readonly ) CreatedBy, CreatedAt, LastChangedBy, LastChangedAt;

  mapping for /HEC4/A_DD_ROOT
  {
    DdRootKey = dd_root_key;
    DdId = dd_id;
    DdName = dd_name;
    CreatedBy = created_by;
    CreatedAt = created_at;
    LastChangedBy = last_changed_by;
    LastChangedAt = last_changed_at;
    LocalLastChangedAt = local_last_changed_at;
  }
}

define behavior for /HEC4/I_DD_LANG alias Language
persistent table /hec4/a_dd_lang
lock dependent by Root
//authorization dependent by <association>
etag master LocalLastChangedAt
{
  update;
  delete;
  association Value { create; }
  association Root { }

  field ( numbering : managed, readonly ) DDLangKey;
  field ( readonly ) DDRootKey;
  field ( mandatory : create ) DdLang;
  field ( readonly ) CreatedBy, CreatedAt, LastChangedBy, LastChangedAt;

  mapping for /hec4/a_dd_lang
  {
    DdLangKey = dd_lang_key;
    DdRootKey = parent_key;
    DdLang = dd_lang;
    CreatedBy = created_by;
    CreatedAt = created_at;
    LastChangedBy = last_changed_by;
    LastChangedAt = last_changed_at;
    LocalLastChangedAt = local_last_changed_at;
  }
}

define behavior for /HEC4/I_DD_VALUE alias Value
persistent table /hec4/a_dd_value
lock dependent by Root
//authorization dependent by <association>
etag master LocalLastChangedAt
{
  update;
  delete;
  association Root { }

  field ( numbering : managed, readonly ) DDValueKey;
  field ( readonly ) DDLangKey, DDRootKey;
  field ( mandatory : create ) DdValue, DdDescr;
  field ( readonly ) CreatedBy, CreatedAt, LastChangedBy, LastChangedAt;

  mapping for /hec4/a_dd_value
  {
    DdValueKey = dd_value_key;
    DdLangKey = parent_key;
    DdRootKey = root_key;
    DdValue = dd_value;
    DdDescr = dd_descr;
    CreatedBy = created_by;
    CreatedAt = created_at;
    LastChangedBy = last_changed_by;
    LastChangedAt = last_changed_at;
    LocalLastChangedAt = local_last_changed_at;
  }
} 
projection;

define behavior for /HEC4/C_DD_ROOT alias Root
use etag
{
  use create;
  use update;
  use delete;

  use association Language { create; }

}

define behavior for /HEC4/C_DD_LANG alias Language
use etag
{
  use update;
  use delete;

  use association Value { create; }
  use association Root;
}

define behavior for /HEC4/C_DD_VALUE alias Value
use etag
{
  use update;
  use delete;

  use association Root;
}

Attachments