on 12-25-2021 7:19 PM
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!
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>
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rizwan,
We are also facing the same issue, was your issue resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 { }
}
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.