on 2021 Feb 09 1:52 AM
Hello,
I have a need to create a Master detail CRUD app with custom tables(header and line items).
We have suite on HANA system and i want to use FIORI elements, BOPF and List report.
I have followed a couple of blogs for this.
https://blogs.sap.com/2016/09/20/fioriui5-cds-bopf-for-beginners/
This blog meets my requirements but i could not get this working as the List report is not loading due to some error.
This blog helped to generate the app for display. Need to add the CRUD functionality for both Master and details but could not due to issue.
Created 2 views as below
Header view and item view.
Please help me how to meet my need or refer any blog / example?
Thanks,
Ram
Header view:
@OData.publish: true
@ObjectModel: {
compositionRoot: true,
transactionalProcessingEnabled: true,
writeActivePersistence: 'ZPROTO_SO_A',
semanticKey: 'SalesOrderID',
representativeKey: 'SalesOrderID',
createEnabled: true,
deleteEnabled: true,
updateEnabled: true
}
@UI.headerInfo: {
typeName: 'Sales Order',
typeNamePlural: 'sales orders'
}
define view ZXC_SO_84 as select from zproto_so_a as SalesOrder
association [1..*] to ZXC_SOITEMS_84 as _SOITEMS on $projection.SalesOrderID = _SOITEMS.SalesOrderID
{
@UI: {lineItem: [{position:10}, { qualifier: 'ValueList', position:10 }], selectionField.position: 10,
identification: [{position: 10, importance: #HIGH }], dataPoint:{title: 'Sales Doc' }}
key SalesOrder.salesorderid as SalesOrderID,
@UI.lineItem: [{position:20 }]
SalesOrder.businesspartnerid as BusinessPartnerID,
@UI: {lineItem: [{position:30 }], identification: [{position: 20, importance: #HIGH }],
dataPoint:{title: 'Created by' }}
SalesOrder.currencycode as CurrencyCode,
@UI: {lineItem: [{position:40}], selectionField.position: 20}
SalesOrder.grossamount as GrossAmount,
@UI.lineItem: [{position:50 }]
SalesOrder.netamount as NetAmount,
@UI: {lineItem: [{position:60 }], dataPoint:{title: 'Net Value' }}
SalesOrder.taxamount as TaxAmount,
@UI.lineItem: [{position:70 }]
SalesOrder.lifecyclestatus as LifecycleStatus,
_SOITEMS
}
Line items view
---------------
@ObjectModel: {
transactionalProcessingEnabled: true,
writeActivePersistence: 'ZPROTO_SOI_A',
semanticKey: ['SalesOrderID','SalesOrderItemID'],
representativeKey: 'SalesOrderItemID',
createEnabled: true,
deleteEnabled: true,
updateEnabled: true
}
define view ZXC_SOITEMS_84 as
select from zproto_soi_a as Item {
//vbap
@UI.lineItem: [{position: 10 }]
key Item.salesorderid as SalesOrderID,
@UI.lineItem: [{position: 20 }]
key Item.salesorderitemid as SalesOrderItemID,
@UI.lineItem: [{position: 30 }]
Item.productid as ProductID,
@UI.lineItem: [{position: 40 }]
Item.currencycode as CurrencyCode,
@UI.lineItem: [{position: 50 }]
Item.grossamount as GrossAmount,
Item.netamount as NetAmount,
Item.taxamount as TaxAmount
}
Have a look at my List Report/Object Page BOPF CRUD blog here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.