Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Extending ABAP CDS Views

durgaprasanth_vemula
Participant
0 Kudos

i have a requirement where i need to disable the field in the standard CDS View 'C_PurchaseReqnItem' and as per the below it is displaying the Field PurReqCreationDate in the "Manage Purchase Requisition Professional" Fiori App.

@UI: { fieldGroup: { qualifier: 'QuantityDate02', position: 20, importance: #HIGH } }

Document.PurReqCreationDate,

Now My Requirement i need to disable the field as i had to use annotation

@ObjectModel.readOnly: true

i had done the below code

@AbapCatalog.sqlViewAppendName: 'ZCPURREQNITM'

@EndUserText.label: '${ddl_source_description}'

extend view C_PurchaseReqnItem with zC_PurchaseReqnItem {

@ObjectModel.readOnly: true

Document.PurReqCreationDate }

But I am getting error "View field PURREQCREATIONDATE-C_PURCHASEREQNITEM already exists in parent object (DDL source )" could you please help how to handle this situation.

3 REPLIES 3

maheshpalavalli
Active Contributor
0 Kudos

I am not sure how to hide it based on the extension of CDS view., I hope someone will be able to answer your question, I checked and couldnt find any solution.

If there is no solution, you can try to check using the below way.

1. Create a SEGW project of type vocabulary based for an existing odata service.

2. In this project you can add you annotation manually in SEGW for your required CDS view entity.

3. Generate the service, which will generate an annotation service ideally and which will be consumed by the smart controls.

I am not sure if this works or not. You can give it a try .

durgaprasanth_vemula
Participant
0 Kudos

Hi All,

Could any one help me how to change the Standard CDS Views by disable the field of the standard CDS View by using Extension

0 Kudos

Hi,

It can be possible from UI by extending the view with the smart table property - "ignoreFields".

eg.,

Ref. https://blogs.sap.com/2017/09/21/remove-unwanted-columns-from-personalizationp13n-dialog-popup./

BR,

Muthu.