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

SAP RAP Dynamic Feature Control Trigger after Determination - Managed Draft App

saurabh__khare38
Participant
0 Kudos
1,023

Hi,

I've a managed draft-enabled RAP app. I've setup a determination on modify that updates a few fields of the child entity when 1 field of the parent entity is updated. I've also setup side-effects through BAS annotations(since I'm on OP 2022) to have the changes reflected immediately in draft. I've setup dynamic feature control on these target fields of the child entity such that they should be displayed read-only when the source field of the parent entity has a value and unrestricted otherwise. The problem is that the feature control does not work as soon as I change the source field. I've to refresh the page/reload the instance for the feature control to take effect. How can I setup the app to have the fields of the child entity rendered read-only immediately after the determination updates these fields? In short, I want the feature control to trigger for the child entity immediately after the determination of the parent entity.

Regards,

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

saurabh__khare38
Participant
0 Kudos

Ok, so the solution was to setup the side-effects to affect the entire child entity instead of selected properties. This way the child entity/table refreshes each time the source property of the parent entity is updated and consequently the feature control of the child entity is triggered.

Side Effect Annotations: Examples 

<Annotations Target="STTA_SALES_ORDER_WD_20_SRV.C_STTA_SalesOrderItem_WD_20Type">
     <Annotation Term="com.sap.vocabularies.Common.v1.SideEffects" Qualifier="TaxAmountChanged">
          <Record>
               <PropertyValue Property="SourceProperties">
                    <Collection>
                         <PropertyPath>TaxAmount</PropertyPath>
                    </Collection>
               </PropertyValue>
               <PropertyValue Property="TargetEntities">
                    <Collection>
                         <NavigationPropertyPath>to_SalesOrder</NavigationPropertyPath>
                    </Collection>
               </PropertyValue>
          </Record>
     </Annotation>
</Annotations>

 

Answers (0)