on 03-08-2019 1:25 PM
Hi experts,
I`m using a system with component SAP_BASIS 753 sp0, S4HANA on premise 1809 and I`m facing the following error when trying to navigate on a transactional Fiori App from Header to Item.
I`ve created 2 interface views and 2 consumption views, one for Header and one for item and used annotation: @ObjectModel.association.type: #TO_COMPOSITION_CHILD and @ObjectModel.association.type: [#TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT]. The header consumption view received the annotation @OData.publish: true and this OData was used in order to create via WebIDE a transactional App from List Report Template.
Handle Type Header - Interface View
@AbapCatalog.sqlViewName: 'YFIORI_FB_VI300'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Handle Type Header - Interface View'
@VDM.viewType: #TRANSACTIONAL
@ObjectModel: {
transactionalProcessingEnabled: true,
compositionRoot: true,
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
writeActivePersistence: 'YFIORI_FB_TC300',
semanticKey: [ 'handletype' ]
}
define view YFIORI_FB_I_300
as select from YFIORI_FB_B_300 as Header
association [0..*] to YFIORI_FB_I_310 as _Item on $projection.handletype = _Item.handletype
{
key Header.handletype,
Header.handlecutout,
@ObjectModel.readOnly: true
Header.changedat,
@ObjectModel.readOnly: true
Header.createdat,
@ObjectModel.readOnly: true
Header.changedby,
@ObjectModel.readOnly: true
Header.createdby,
@ObjectModel.association.type: #TO_COMPOSITION_CHILD
_Item
}
Handle Part Item - Interface View
@AbapCatalog.sqlViewName: 'YFIORI_FB_VI310'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Handle Part Item - Interface View'
@VDM.viewType: #TRANSACTIONAL
@ObjectModel:{
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
writeActivePersistence: 'YFIORI_FB_TC310',
semanticKey: ['handletype', 'hparttype']
}
define view YFIORI_FB_I_310
as select from YFIORI_FB_B_310 as Item
association [1..1] to YFIORI_FB_I_300 as _Header on $projection.handletype = _Header.handletype
{
key Item.handletype,
key Item.hparttype,
Item.custelement,
Item.handleinput,
Item.handlecutout,
@ObjectModel.association.type: [#TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT]
_Header
}
Handle Type Header - Consumption View
@AbapCatalog.sqlViewName: 'YFIORI_FB_VC300'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Handle Type Header - Consumption View'
@Metadata.allowExtensions: true
@VDM.viewType: #CONSUMPTION
@ObjectModel: {
transactionalProcessingDelegated: true,
compositionRoot: true,
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
semanticKey: 'handletype'
}
@OData.publish: true
define view YFIORI_FB_C_300
as select from YFIORI_FB_I_300 as Header
association [0..*] to YFIORI_FB_C_310 as _Item on $projection.handletype = _Item.handletype
{
key Header.handletype,
Header.handlecutout,
Header.createdat,
Header.createdby,
Header.changedat,
Header.changedby,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_Item
}
Handle Part Item - Consumption View
@AbapCatalog.sqlViewName: 'YFIORI_FB_VC310'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Handle Part Item - Consumption View'
@Metadata.allowExtensions: true
@VDM.viewType: #CONSUMPTION
@ObjectModel:{
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
semanticKey:['handletype', 'hparttype']
}
define view YFIORI_FB_C_310
as select from YFIORI_FB_I_310 as Item
association [1..1] to YFIORI_FB_C_300 as _Header on $projection.handletype = _Header.handletype
{
key Item.handletype,
key Item.hparttype,
Item.custelement,
Item.handleinput,
Item.handlecutout,
@ObjectModel.association.type: [#TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT]
_Header
}
Hi Alex,
Do you use MDE file ? attach it here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks igorcepoi! That works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Igor,
Here are my MDE files.
YFIORI_FB_MDE_300
@Metadata.layer: #PARTNER
@UI.headerInfo: { typeName: 'Handle Type - Header',
typeNamePlural: 'Handle Types - Header',
title: { type: #STANDARD, value: 'HandleType'}}
annotate view YFIORI_FB_C_300 with
{
@UI: { selectionField: [{ position: 10 }],
lineItem : [{position: 10}],
identification: [{position: 10, importance: #HIGH, label: 'Handle Type'}]}
handletype;
@UI: { lineItem : [{position: 20, importance: #HIGH, label: 'Handle Cutout' }],
identification: [{position: 20, importance: #HIGH, label: 'Handle Cutout' }] }
handlecutout;
}
YFIORI_FB_MDE_310
@Metadata.layer: #PARTNER
annotate view YFIORI_FB_C_310 with
{
@UI: { lineItem : [{position: 10}],
identification: [{position: 10, importance: #HIGH, label: 'Handle Type' }]} //{importance: #HIGH},
handletype;
@UI: { lineItem : [{position: 20, label: 'Handle Part Type' }],
identification: [{position: 20, importance: #HIGH, label: 'Handle Part Type' }]}
hparttype;
@UI: { lineItem : [{position: 30 }],
identification: [{position: 30, importance: #HIGH, label: 'Bag Part ID' }]}
custelement;
@UI: { lineItem : [{position: 40, label: 'Handle Input' }],
identification: [{position: 40}, {label: 'Handle Input' }]}
handleinput;
@UI: { lineItem : [{position: 50, label: 'Handle Cutout' }],
identification: [{position: 50}, {label: 'Handle Cutout'}]}
handlecutout;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at that line
[{position:50},{label:'Handle Cutout'}]}
just remove the bracets
[{position:50, label:'Handle Cutout'}]}
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.