cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Child Entity Creation without update in RAP

ankahit
Participant
0 Likes
1,295

Hi All,

In managed scenario, How can I ensure that a child entity is only creatable and not editable afterward in RESTful ABAP? When I remove the update capability from the behavior definition, the fields become non-editable even during the creation phase. What is the best approach to achieve this effectively? I also tried field (readonly : update) but it does not work. 

Accepted Solutions (0)

Answers (1)

Answers (1)

Sijin_Chandran
Active Contributor
0 Likes

Hello,

The answer should be with Behavior Definition only as you tried before.

Try with below Field Characteristics available in Behavior Definition of RAP:

field(readonly:update) Field1

Go through the below documentation:

https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenbdl_field_char.htm#!ABAP_VARIANT_6@6@

Sijin_Chandran_0-1720158054576.png

This should help!

Thanks,

Sijin

ankahit
Participant
0 Likes

Hi Sijin,

Yes, I tried. But it didn't work. FYI, I have enabled the draft functionality. 

ankahit_0-1720164438120.pngankahit_1-1720164461280.png

 

Sijin_Chandran
Active Contributor
0 Likes

What is the problem you are facing when you are using 'field(readonly:update)', Sorry am not able to make out the issue you are facing using the screenshots attached.

We have same Field Characteristics enable for couple of fields but in Root Entity and it works perfectly alright and we also have Draft functionality enabled, so wondering what problem you could be facing.

Thanks,

Sijin

ankahit
Participant
0 Likes
Hi Sijin, for Child entity it does not work. it makes field non editable in create. as well as in update.
Sijin_Chandran
Active Contributor
0 Likes
Ok, let's wait for some RAP experts comment on this. Ideally my assumption was 'field(readonly:update) Field1' should help in getting this done, irrespective of whether the Entity is Root or Dependent Entities.