on 2023 Jun 14 9:57 AM
Hi,
I have a problem with displaying an UI Facet as I would like to.
I am using ABAP RAP as my backend technology. I created 3 related Entities:
First Entity Projection:
define root view entity test1 provider contract transactional_query as projection on t1
{
@UI.facet: [
{
position: 10,
label : 'Collection',
id : 'C1',
purpose: #STANDARD,
type: #COLLECTION,
targetElement: '_detail'
},
{
position: 10,
id: 'D1',
parentId: 'C1',
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
label: 'Detail1',
targetElement: '_detail'
},
{
position: 20,
id: 'D2',
parentId: 'C1',
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
label: 'Detail2',
targetElement: '_detail._detail'
}
]
@UI.lineItem: [ { position: 10, label: 'ID' } ]
key Id,
_detail : redirected to composition child test2
}
Second Entity Projection:
define view entity test2 as projection on t2
{
@UI.lineItem: [ { position: 10, label: 'ID' } ]
key Id,
@UI.lineItem: [ { position: 20, label: 'ParentID' } ]
ParentId,
_parent : redirected to parent test1,
_detail : redirected to composition child test3
}
Third Entity Projection:
define view entity test3 as projection on t3
{
@UI.lineItem: [ { position: 10, label: 'ID' } ]
key Id,
@UI.lineItem: [ { position: 20, label: 'ParentID' } ]
ParentId,
@UI.lineItem: [ { position: 30, label: 'RootID' } ]
ParentParentId,
_parent : redirected to parent test2,
_root
}
So the relationship Model looks as follows: test1 => test2 => test3 with 1..*, 1..*
Now i want to display both test2 and test3 in the UI Facet of test1. I want test3 to show only Nodes,
that redirect to the Node selected on test2. With the given Code i get the following result:
Unfortunately test3 does not get filled. This happens, because my Path for the 'targetElement' in the Facet looks like this:
_detail._detail
The resulting Path, that gets requested ist the following: test1(1)/_detail/_detail
But the Path needs a Key for the first _detail Association. For example: test1(1)/_detail(1)/_detail
Is there any way to solve this issue, or do I have to create own custom elements for the App to make this possible?
Thanks a lot for your help,
Marcel
Request clarification before answering.
Hi,
It seems I had a similar problem, however I got an explicit error message.
I had some extra context with RAP + draft around my issue however... I fixed it by defining the _detail (first one) association as a 'one to one'. Then the facet can render data.
I fear with a 'to many' relation it's not possible without custom ui elements...
An alternative may be to directly define a _detailDeep association on your root node that immediatley goes to the deepest child. However this won't then be a composition and I'm doubtful you'll be able to get CRUD buttons working in this case...
For reference, my question: https://answers.sap.com/questions/14021678/rap-draft-facet-two-children-deep.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
21 | |
9 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.