cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

We have developed an ABAP application programming model fiori app (cds, bopf, fiori elements list report) on premise S4H 1809 FPS 0.

An action on the root node creates an entity of the subnode 1:n and change the status of the root node.

The action is visible in the fiori app object page and can be used but after the call to the action the field status of the root node is refreshed but the table on the object page binded to subnode is not refreshed.

We tried to solve using side effects with following annotation but the subnode list is refreshed only when ENTER is pressed.

<Annotation Term="Common.SideEffects" Qualifier="changeStatus">
    <Record>
        <PropertyValue Property="TargetEntities">
            <Collection>
                <NavigationPropertyPath>to_Voti</NavigationPropertyPath>
            </Collection>
        </PropertyValue>
        <PropertyValue Property="SourceProperties">
            <Collection>
                <PropertyPath>Status</PropertyPath>
            </Collection>
        </PropertyValue>
    </Record>
</Annotation>
<Annotation Term="Common.SideEffects">
    <Record Type="Common.SideEffectsType">
        <PropertyValue Property="TriggerAction" Path="Vota_ac"/>
        <PropertyValue Property="TargetEntities">
            <Collection>
                <NavigationPropertyPath>to_Voti</NavigationPropertyPath>
            </Collection>
        </PropertyValue>
    </Record>
</Annotation>

TriggerAction property is deprecated and not documented.

Thank you for help

Sam

View Entire Topic
Sschlegel
SAP Champion
SAP Champion

Hi all,

at first you need to take a look into Metadata.xml and look into the area "EntityContainer" - there you find the Name of the "Entity" for your action (I know - it sounds strange).

<EntityContainer Name="cds_zsd_operation_Entities" m:IsDefaultEntityContainer="true" sap:message-scope-supported="true" sap:supported-formats="atom json xlsx">
   <EntitySet Name="ConfirmOperation" EntityType="cds_zsd_operation.ConfirmOperation" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:content-version="1"/>
   ....				
</EntityContainer>

You need the name of the EntitySet and the Name of the EntityContainer and also the "Namespace" that will be used under "annotations/annotation.xml" - you can also define an alias in this file.

<edmx:Reference Uri="/sap/opu/odata/sap/ZMY_OperationService/$metadata">
	<edmx:Include Namespace="cds_zsd_operation" Alias="operation" />
</edmx:Reference>

And finally the annotation itself (also in annotation.xml) - important is the "_it" at the beginning, if you want to reload via an association.

<Annotations Target="operation.cds_zsd_operation_Entities/ConfirmOperation">
	<Annotation Term="Common.SideEffects" Qualifier="ReloadOnConfirmation">
		<Record Type="Common.SideEffectsType">
			<PropertyValue Property="TargetEntities">
				<Collection>
					<NavigationPropertyPath>_it/to_TempConfirmation</NavigationPropertyPath>
					<NavigationPropertyPath>_it/to_OrderConfirmation</NavigationPropertyPath>
				</Collection>
			</PropertyValue>
		</Record>
	</Annotation>
</Annotations>

Works as expected on 1909 FP2.

Regards

Sören

Florian_Kube
Participant
0 Likes

Thank you! It works 🙂

gregorw
SAP Mentor
SAP Mentor
0 Likes

Hi Sören,

what changes Do I need to apply if my Action is executed when the header entity is selected in the table of the list page and changes an attribute of the header entity? I have defined two SelectionVariants based on the changed attribute. What I want to achieve is that after executing the action the list should be refreshed so that the changed entry is not shown anymore.

CU
Gregor