cancel
Showing results for 
Search instead for 
Did you mean: 

Restful ABAP - RAP Abstract Entity with readonly Parameters

sakthi90
Explorer
1,105

Dear experts,

I have built a custom action associated to an abstract entity in RAP(odata v4). On a click of the action in object page, my abstract entity is rendered properly as Pop up with fields. Requirement is one of the fields has to be rendered as a read only/text with a default value. I can default the value using function. But unable to make that as a readonly field.

 

I tried using

1. @objectmodel.readonly: true in abstract entity cds.

2. UI common annotation Fieldcontrol.readonly and annotation core.computed in annotation.xml in BAS

https://sapui5.hana.ondemand.com/sdk/#/topic/f49a0f7eaafe444daf4cd62d48120ad0

3. Checked for UI pop up extension.

but none of these worked

Can you please help here?

View Entire Topic
DiegoValdivia
Active Participant

Hi,

The only way in which I was able to accomplish the same requirement was by using local annotation:

<Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/ReadOnly"/>

See next screenshot for a better reference

DiegoValdivia_0-1722356739354.png

I hope this helps

 

rameshputta
Participant
0 Kudos
Hi, Can make the fields on the abstract entity read only dynamically ( based on a condition )?