Skip to Content

Adding URL and Icon for field of an Extended CDS view

Hi All, I have a requirement where I need to have a new colmn in Standard FIORI application which is based on SADL. For this column I need to display PDF ICON if Document exist for the material and on click of it I need to call another Odata service to open a document.

To achieve this -

I have extended standard CDS view C_Manageoperations with ZPTM_MfgOrder_ext.

Here I added new field using Virtual element. This is returning me the Document Number if it exist for the material.

@EndUserText.label: 'Packaging Instructions' 
@Semantics.text: true   <br>@ObjectModel.readOnly: true  <br>@ObjectModel.virtualElement: true  <br>@ObjectModel.virtualElementCalculatedBy: 'ABAP:ZPTMCL_HASPKGINSTR_DOC'  <br>cast( '' as abap.char( 25 ) ) as ZZPkgngInstrForMat

But I am not able to add Icon and URL(to call OData Service ) for this field. Since this field is added using Virtual element I get

ZZPkgngInstrForMat field is unknown error. Please suggest how can achieve this.

Thanks in advance


Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.