cancel
Showing results for 
Search instead for 
Did you mean: 

RAP : To Show Child or not to Show Child, depending on value of field of ROOT

HelgaRaemaekers
Participant
0 Kudos
153

Hello,

depending on the value of a field in my Root table, I have to show another table as a child of my Root.

Can I put some if - then - else or a case structure in metadata extensions??
Or general: " how can you manipulate whether you show a child or not"  in Restful application Programming?

 

thanks a lot!

Helga

View Entire Topic
junwu
Active Contributor

you can bind the visibility of a section(which contains your table) to a attribute, which can be manipulated/determined dynamically.

 

 

junwu_0-1734016021097.png

 

 

 

HelgaRaemaekers
Participant
0 Kudos
Hi Junwu,
HelgaRaemaekers
Participant
0 Kudos
how can I get the value true/false into the field TravelMileageIsFacetVisible? Depending on the value of the field I would write a 'CASE' on the field, but I don't know how I can get a Boolean in it ...
HelgaRaemaekers
Participant
0 Kudos
okay, I made a virtual element and in the method IF_SADL_EXIT_CALC_ELEMENT_READ~CALCULATE I determined the value of the boolean field 'hiddenpgm'. The virtual element I declared as follows: @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZR_CL_MPDF_PROGRAMMA' virtual hiddenpgm: abap_boolean,
junwu
Active Contributor
0 Kudos
if that boolean value can be calculate easily based on cds data, you can avoid the abap class, just cast( your case statement as abap_boolean) as is***sectionhidden, something like that.))