cancel
Showing results for 
Search instead for 
Did you mean: 

List Report Object Page - Not able to Create or Edit

former_member207873
Participant
0 Kudos

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 ?

View Entire Topic
former_member14709
Contributor

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

former_member207873
Participant
0 Kudos

aman9garg

Thanks for your reply. Added the @UI.identification: [ { position: 50, importance: #HIGH } ] as such . Still not working . Do you have any other ideas ?

former_member14709
Contributor
0 Kudos

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

https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/65a196c45e23459bb7c5e801434...

Thanks,

Aman

kwst_jain
Explorer
0 Kudos

Hello ,

Were you able to solve this ?

Thanks,

Mehul Jain

abdullah_dogan
Explorer
0 Kudos

Thanks, that solved it. It should be added also a facet. Something like that;