cancel
Showing results for 
Search instead for 
Did you mean: 

RAP - Managed Scenario - Create not working on Child node

0 Kudos

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;
}<br>
0 Kudos

Hi. Was this resolved?

Accepted Solutions (0)

Answers (3)

Answers (3)

faba002
Explorer
0 Kudos

Dear Community

Example Application Managed RAP
I am facing the same problem with a 1 level Parent - Child relation ( Example: Movies with Actors)

When I use the preview button from Eclipse the create button is missing for the child object and navigation doesn't work for the child table( from parent details to the child details).

After generating the Fiori elements application the button is visible and navigation works. I was wondering why the preview version is unable provide this basic functionality ? I saw on other blogs that the preview should work until the third level. I am running version 2022 Feature Pack 0.

If I could remember the create button for the child object worked with preview on system version
2021 Feature Pack 1.

Preview from eclipse (missing create button for child table)

Consumed as Fiori Elements Application (Visible create button and working navigation to child details)

Kind Regards

Fabian

0 Kudos

Hello Fabian,

Please proceed with your development and generate Fiori app. Preview offers limited features because of which create button is not enabled at child level.

Thanks,

Mohammad

mangesh1641
Member
0 Kudos

Hello Rizwan,

We are also facing the same issue, was your issue resolved.

0 Kudos

Yes, It was the issue during preview alone. When we generate Fiori elements application, everything was fine!

NaveenKumarC
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Mohammed,

Can you add "association Language { }" in the behavior definition for "define behavior for /HEC4/I_DD_VALUE alias Value" and in Projection Behavior definition, add "use association Language;" under "define behavior for /HEC4/C_DD_VALUE alias Value".

Regards,

Naveen Kumar Chikkanna.

0 Kudos

Hello Naveen,

I tried that but it didn't work. However, I am creating Language record as an association from Root and it's working.

{
  create;
  update;
  delete;
  association Language { create; }   <<<<<<< --- This creates a record in Language node from Root
}

Following code is not even enabling the Create button on child node, strange!

{
  update;
  delete;

  association Value { create; }
  association Root { }
}