on 02-18-2022 9:48 AM
Hello Experts,
I am using the List Report Object page template from the Fiori Elements and I am not able to create or edit the objects. I am using two views, one consumption view(List Page) and one Interface view. (Object Page)
But what suprises me is that , the same consumption view is both shown as List Page and as Object Page. My expectation is the interface view should come as the Object page.
My views are as follows,
Consumption View
@AbapCatalog.sqlViewName: 'ZCSALESORDER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@OData.publish:true
//-------------------------------------------------------------------
define root view ZC_SALES_ORDER as select from I_SalesDocumentItem as SalesDocumentItem
association [1..1] to I_Customer as Customer on SalesDocumentItem.SoldToParty = Customer.Customer
association [0..*] to ZI_ETN_SALES_ORDERS as EtnPerSales on
SalesDocumentItem.SalesDocument = EtnPerSales.SalesDocument
and SalesDocumentItem.SalesDocumentItem = EtnPerSales.SalesDocumentItem
//Selection Fields
{
@UI.facet: [
{
id: 'EnteredTimes',
purpose: #STANDARD,
label: 'Erfasste Tätigkeiten' ,
position: 10,
type: #LINEITEM_REFERENCE,
targetElement: 'EtnPerSales'
}]
@UI.hidden: true
key EtnPerSales.Counter as Counter,
@UI.selectionField: [{ position: 10 }]
@UI.lineItem: [{ position: 10 }]
//@UI.identification: [ { position: 10 } ]
key SalesDocumentItem.SalesDocument as SalesDocument,
//@UI.hidden: true
@UI.lineItem: [{ position: 20 }]
key SalesDocumentItem.SalesDocumentItem as SalesDocumentItem,
@UI.lineItem: [{ position: 30 }]
SalesDocumentItem.SoldToParty as SoldToParty,
@UI.lineItem: [{ position: 40 }]
Customer.CustomerName as CustomerName,
// _CustomerNames.name1 as KundenName,
@UI.selectionField: [{ position: 20 }]
@UI.lineItem: [{ position: 50 }]
SalesDocumentItem.ProfitCenter as ProfitCenter ,
@UI.hidden: true
EtnPerSales.Ticket,
//@UI.lineItem: [{ position: 60 }]
//@UI.identification: [ { position: 60 } ]
// EtnPerSales.WorkDate ,
//Publizised Associations
// @ObjectModel.association.type: #TO_COMPOSITION_CHILD
EtnPerSales // ETN Per Sales Orders
}
Interface View
@AbapCatalog.sqlViewName: 'ZIETNSALESORDER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AbapCatalog.dataMaintenance: #RESTRICTED
@AccessControl.authorizationCheck: #CHECK
//--------------------------------------------------------------
define view ZI_ETN_SALES_ORDERS as select from ztsdb as EtnSalesDocument
association [1..*] to ZC_SALES_ORDER as EtnSalesDocumentCompInfo on EtnSalesDocument.vbeln = EtnSalesDocumentCompInfo.SalesDocument
and EtnSalesDocument.posnr = EtnSalesDocumentCompInfo.SalesDocumentItem
{
//@UI.lineItem: [{ position: 10 }]
@UI.hidden: true
key EtnSalesDocument.counter as Counter,
@UI.lineItem: [{ position: 10 }]
//@UI.identification: [ { position: 10 } ]
key EtnSalesDocument.vbeln as SalesDocument,
@UI.lineItem: [{ position: 20 }]
key EtnSalesDocument.posnr as SalesDocumentItem,
@UI.lineItem: [{ position: 30 }]
EtnSalesDocument.workdate as WorkDate ,
@UI.lineItem: [{ position: 40 }]
EtnSalesDocument.worklogid as WorkLogId,
@UI.lineItem: [{ position: 50 }]
EtnSalesDocument.project as ProjectJira,
@UI.lineItem: [{ position: 60 }]
EtnSalesDocument.ticket as Ticket,
@UI.lineItem: [{ position: 70 }]
EtnSalesDocument.ticketname as TicketName
// @ObjectModel.association.type: [#TO_COMPOSITION_ROOT, #TO_COMPOSITION_PARENT]
// EtnSalesDocumentCompInfo // Make association public
} where EtnSalesDocument.counter is not initial
When I click on create button, no screen is coming where I can enter data. Or do I have to anything extra in the JSON file to make it create and edit enabled ?
Hello,
On click of create, object page form screen is loaded. To have attributes on your create screen, you need to use @ui.identification annotation, which I see you are not using in your views. This could be the problem. Could you add this annotation for the fields which you want to have on your create screen and see if issue still persists?
Thanks,
Aman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Identification specifies position of attrbibute in Object Page. Along with attributes, an object page is expected to have a title, some facets etc. Please refer below link and try to add other UI annotations as well to complete the creation screen
Thanks,
Aman
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
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.