- No meu caso são 2 CDS, 1 com informações de cabeçalho e outra de itens.
Fica como se fossem 2 abas
- Criar as CDSs normalmente sem relação nenhum, criei uma projection view e metadata 1 para cada view.
- Ao criar o SERVICE DEFINITION, adicionar as 2 projections criada
- Criar o service binding e publicar
- Criar a aplicação no VS code. E agora a diversão começa
Utilizar a modificação da aplicação pelo Fiori Guide Development
Selecionar opção para múltipla seleção
==================================
MANIFEST.JSON
"sap.ui.generic.app": {
"_version": "1.3.0",
"settings": {
"forceGlobalRefresh": false,
"objectPageHeaderType": "Dynamic",
"considerAnalyticalParameters": true,
"showDraftToggle": false
},
"pages": {
"ListReport|ZSZK_TEST_VAL_C": {
"entitySet": "ZSZK_TEST_VAL_C",
"component": {
"name": "sap.suite.ui.generic.template.ListReport",
"list": true,
"settings": {
"condensedTableLayout": true,
"smartVariantManagement": true,
"enableTableFilterInPageVariant": true,
"filterSettings": {
"dateSettings": {
"useDateRange": true
}
},
"quickVariantSelectionX": {
"enableAutoBinding": false,
"variants": {
"Header": {
"key": "tab0",
"annotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#Header",
"entitySet": "ZSZK_TEST_VAL_C"
},
"Item": {
"key": "tab1",
"annotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#Item",
"entitySet": "ZSZK_TEST_VAL_IT_C"
}
},
"showCounts": false
}
}
},
"pages": {
"ObjectPage|ZSZK_TEST_VAL_C": {
"entitySet": "ZSZK_TEST_VAL_C",
"defaultLayoutTypeIfExternalNavigation": "MidColumnFullScreen",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPage"
}
}
}
}
}
},
ANNOTATION.XML
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
<edmx:Reference Uri="/sap/opu/odata/sap/ZSZK_TESTE_VAL/$metadata">
<edmx:Include Namespace="cds_zszk_teste_val"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
<Annotations Target="cds_zszk_teste_val.ZSZK_TEST_VAL_CType">
<Annotation Term="UI.SelectionPresentationVariant" Qualifier="Header">
<Record Type="UI.SelectionPresentationVariantType">
<PropertyValue Property="Text" String="Header de dados"/>
<PropertyValue Property="SelectionVariant">
<Record Type="UI.SelectionVariantType">
<PropertyValue Property="SelectOptions">
<Collection>
<Record Type="UI.SelectOptionType">
<PropertyValue Property="PropertyName" PropertyPath="Inbounddeliveryid"/>
<PropertyValue Property="Ranges">
<Collection>
<Record Type="UI.SelectionRangeType">
<PropertyValue Property="Sign" EnumMember="UI.SelectionRangeSignType/I"/>
<PropertyValue Property="Option" EnumMember="UI.SelectionRangeOptionType/NE"/>
<PropertyValue Property="Low" String="0"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="PresentationVariant">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.LineItem#Header</AnnotationPath>
</Collection>
</PropertyValue>
</Record>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
<Annotations Target="cds_zszk_teste_val.ZSZK_TEST_VAL_IT_CType">
<Annotation Term="UI.SelectionPresentationVariant" Qualifier="Item">
<Record Type="UI.SelectionPresentationVariantType">
<PropertyValue Property="Text" String="Item"/>
<PropertyValue Property="SelectionVariant">
<Record Type="UI.SelectionVariantType">
<PropertyValue Property="SelectOptions">
<Collection>
<Record Type="UI.SelectOptionType">
<PropertyValue Property="PropertyName" PropertyPath="Iddoc"/>
<PropertyValue Property="Ranges">
<Collection>
<Record Type="UI.SelectionRangeType">
<PropertyValue Property="Sign" EnumMember="UI.SelectionRangeSignType/I"/>
<PropertyValue Property="Option" EnumMember="UI.SelectionRangeOptionType/NE"/>
<PropertyValue Property="Low" String="0"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</PropertyValue>
<PropertyValue Property="PresentationVariant">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.LineItem#Item</AnnotationPath>
</Collection>
</PropertyValue>
</Record>
</PropertyValue>
</Record>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
Nenhum comentário:
Postar um comentário