**TITLE**: Rebind an Object Page Table on Every Instance Change (OData V2)

**INTRODUCTION**: Rebind a table on an SAP Fiori elements object page each time the page instance changes (for example switching between records or switching modes). Applicable only for SAP Fiori elements with OData V2. The solution uses the object page section loadingBehavior settings in the manifest and the extension API events (attachPageDataLoaded, rebind, onBeforeRebindTableExtension) to trigger a rebind for a specific table ID.

**TAGS**: fiori-elements-framework, sapui5, odata-v2, object-page, table, manifest, extension-api, rebind

STEP: 1 — Confirm applicability and behavior

DESCRIPTION: This approach applies only to SAP Fiori elements for OData V2. Note: by default a table in an object page binds only the first time; switching instances triggers refresh but not rebind. To force rebinding on each instance change, configure the manifest and use the extension API to call rebind when page data is loaded.

LANGUAGE: Text

CODE:
```text
Applicable only to SAP Fiori elements for OData V2.
```

STEP: 2 — Edit the object page manifest: set loadingBehavior for the subsection containing the table

DESCRIPTION: In the manifest file, identify the subsection ID that contains the table (for example subsection1). Under the object page section settings for that subsection add the loadingBehavior properties. It is mandatory to set "waitForHeaderData" to true (prevents duplicate batch calls). Optionally set "waitForViewportEnter" true/false based on preference. These settings ensure the header data is loaded before the subsection is initialized and allow controlled rebinds.

LANGUAGE: JSON

CODE:
```json
{
  "sap.ui.generic.app": {
    "pages": {
      "ObjectPage|<EntitySet>": {
        "component": {
          "settings": {
            "sections": {
              "subsection1": {
                "loadingBehavior": {
                  "waitForHeaderData": true,
                  "waitForViewportEnter": true
                }
              }
            }
          }
        }
      }
    }
  }
}
```

STEP: 3 — Attach pageDataLoaded and call rebind in your extension controller (onInit + handler)

DESCRIPTION: In your controller extension, attach the pageDataLoaded event in onInit so your handler runs whenever page data loads (including instance changes). In the handler use the extensionAPI.rebind(tableId) to rebind the specific table. Keep the table ID exact (use the full control ID). The sample controller below demonstrates attaching attachPageDataLoaded, the rebind call, and an onBeforeRebindTableExtension hook to add filters or sorts only for the specific table.

LANGUAGE: JavaScript

CODE:
```javascript
/* Controller Implementation (CI) for the Sales Order object page */
sap.ui.define(["sap/ui/base/Object", "sap/m/MessageBox", "sap/ui/model/Filter", "sap/ui/model/FilterOperator"
], function(BaseObject, MessageBox, Filter, FilterOperator) {
    "use strict";

    var salesOrderItemTableId = "STTASOWD20::sap.suite.ui.generic.template.ObjectPage.view.Details::C_STTA_SalesOrder_WD_20--SalesOrderItemsID::Table";

    return BaseObject.extend("STTASOWD20.ext.controller.CISalesOrder", {

        onInit: function(oController){
            this.oController = oController;
            // Example to show attachpageDataLoaded event consumption.
             this.oController.extensionAPI.attachPageDataLoaded(this.rebindSalesorderItemTable.bind(this));

        },
        rebindSalesorderItemTable: function() {
            // Example to show how to rebind a particular table, each time when binding context changes. For example switching from
            // display to edit or edit to display mode or whenever changing the object page instance.
            // To achieve this efficiently first of all go to the manifest and do following setting under "sections" of your object page
            // "loadingBehavior":{
            //  "waitForHeaderData":true,
            //  "waitForViewportEnter":true
            // }
            // then attach a page data loaded event as we have registered above in on init
            // oApi.attachPageDataLoaded(this.rebindSalesorderItemTable.bind(this));
            // Now below lines will do the rest of the job
            // rebind the table having specific id.
            this.oController.extensionAPI.rebind(salesOrderItemTableId);
        },
        onBeforeRebindTableExtension: function (oEvent) {
            // Filter a specific table based on table id, because this method is called before
            // rebinding of every table.
            if(oEvent.getSource().getId()=== salesOrderItemTableId) {
                // You can add additional filters, remove some, add sort order etc here in the following way

                // var filter = new Filter("so_item_pos", FilterOperator.GE, "1");
                // oEvent.mParameters.bindingParams.filters.push(filter);
            }

        },

    });
});
```

STEP: 4 — Verify behavior and optional filtering/adaptation before rebind

DESCRIPTION: With the manifest loadingBehavior set and attachPageDataLoaded registered, the table will rebind every time the object page instance changes. Use onBeforeRebindTableExtension to programmatically add/remove filters, sorts, or other parameters for the specific table before the rebind occurs.

LANGUAGE: JavaScript

CODE:
```javascript
// Example rebind invocation (already in handler above)
this.oController.extensionAPI.rebind(salesOrderItemTableId);

// Example pre-rebind modification inside onBeforeRebindTableExtension (already shown in sample):
// var filter = new Filter("so_item_pos", FilterOperator.GE, "1");
// oEvent.mParameters.bindingParams.filters.push(filter);
```

STEP: 5 — Reference for loading behavior settings

DESCRIPTION: For more details about the manifest loadingBehavior settings for object page subsections, consult the related documentation.

LANGUAGE: Text

CODE:
```text
See: Defining the Loading Behavior of Object Page Subsections (defining-the-loading-behavior-of-object-page-subsections-6b84249.md)
```

fiori-elements-framework sapui5 odata-v2 object-page table manifest extension-api rebind


**TITLE**: Reducing Entity Sets in Metadata Using a Feature Toggle

**INTRODUCTION**: Use a backend feature toggle to exclude individual CDS entity sets from the OData V2 service metadata so that Fiori elements apps (list report tabs, object page sections) automatically hide corresponding UI parts when the toggle is deactivated.

**TAGS**: fiori-elements-framework, sap, odata-v2, cds, feature-toggle, metadata, entity-sets

**STEP**: 1 — Create the feature toggle in the backend

**DESCRIPTION**: Create a backend feature toggle (feature flag) that can be set to Activated or Deactivated. Choose a concise, unique name (example: Toggle_Name). The toggle state controls whether an annotated CDS entity is included in the generated application metadata. Ensure the toggle is available to the system where the CDS view is defined.

**LANGUAGE**: N/A

**CODE**:
```text
# Example toggle name (create in backend tooling):
Toggle_Name
```

**STEP**: 2 — Annotate the CDS view with the feature toggle

**DESCRIPTION**: In the CDS view that defines the entity set you want to hide/show, add the feature annotation. Keep the exact annotation token intact. When the feature toggle is set to Deactivated, the annotated entity will be removed from the generated application metadata; when Activated, the entity will be present.

Place the annotation at the CDS view level (above the view definition) so the service generator excludes the entire entity set when the feature is deactivated.

**LANGUAGE**: CDS

**CODE**:
```cds
@feature:'Toggle_Name'
```

**STEP**: 3 — Example CDS view with the annotation (contextual sample)

**DESCRIPTION**: Example showing where to place the feature annotation within a typical CDS view definition. Keep the @feature annotation exact (as shown in STEP 2). Replace view names and fields with your actual model.

**LANGUAGE**: CDS

**CODE**:
```cds
@AbapCatalog.sqlViewName: 'ZMYVIEW'
@EndUserText.label: 'My Entity View'
@feature:'Toggle_Name'
define view Z_I_MyEntity
  as select from ztable_my_entity
{
  key id           as ID,
      name         as Name,
      created_at   as CreatedAt
}
```

**STEP**: 4 — Expected effect on application metadata and UI

**DESCRIPTION**: After the feature toggle state is evaluated during service generation:
- If the toggle is Activated: the entity set remains in the OData V2 service metadata; list report will show tabs for related entity sets; object page will show corresponding sections.
- If the toggle is Deactivated: the annotated entity set is removed from the OData V2 service metadata; list report tabs for that entity are removed; object page sections for that entity are removed.

Applicable only to SAP Fiori elements for OData V2. If you use multiple related entities, deactivating their toggles removes the corresponding tabs/sections from the UI.

**LANGUAGE**: N/A

**CODE**:
```text
# Behavior summary:
Toggle Activated   -> Entity present in metadata -> UI shows tabs/sections
Toggle Deactivated -> Entity removed from metadata -> UI hides tabs/sections
```

**STEP**: 5 — Visual references (image file paths)

**DESCRIPTION**: Use these image assets as visual verification of behavior in example applications.

**LANGUAGE**: N/A

**CODE**:
```text
# Images demonstrating behavior
images/OP_with_all_tabs_when_feature_toggle_is_active_0ff5d08.png
images/OP_with_only_one_tab_when_other_related_entities_are_reduced_by_deactivating_the_toggle_42737b9.png
```

fiori-elements-framework sap odata-v2 cds feature-toggle metadata entity-sets


**TITLE**: Refresh API — Use refreshBinding in Component.js for Analytical List Page (ALP)

**INTRODUCTION**: Use the Component.js API function refreshBinding to reload header, filter, and content areas of an Analytical List Page (ALP) without a browser refresh. Call refreshBinding from controller extensions or any place with access to the component instance to re-read OData V2 data while retaining user filter and personalization state.

**TAGS**: fiori-elements-framework, ALP, OData V2, refreshBinding, Component.js, controller-extension, refresh

**STEP**: 1 — When to use refreshBinding

**DESCRIPTION**: Use refreshBinding when you need to reload ALP data (header, filter, content) without a full browser refresh. Applicable only for SAP Fiori elements using OData V2. Filter selections (compact or visual filters) and personalization settings (sorting, grouping, etc.) are retained after the refresh.

**LANGUAGE**: Text

**CODE**:
```Text
- Applicable only to SAP Fiori elements for OData V2.
- Reloads data for header, filter, and content area components configured in ALP.
- Retains filter selections and personalization settings (sorting, grouping).
```

**STEP**: 2 — How to call refreshBinding from a controller extension

**DESCRIPTION**: From any controller extension method (for example, a button press handler), obtain the component instance via this.getOwnerComponent() and call refreshBinding(). The snippet below shows the exact call pattern to invoke the API.

**LANGUAGE**: JavaScript

**CODE**:
```javascript
//By calling refreshBinding function directly .

       var component = this.getOwnerComponent();

       component.refreshBinding();
```

**STEP**: 3 — Important behavior and caveats

**DESCRIPTION**: Understand user-visible effects and limitations when using refreshBinding:
- Main chart selection is lost during the refresh.
- If the ALP uses AutoHide for filter mode, losing the main chart selection can change the table data after refresh.
- Selections in the filter bar (compact or visual filter) and personalization settings (sorting, grouping, etc.) are preserved.

**LANGUAGE**: Text

**CODE**:
```Text
- Main chart selection is lost during refresh.
- This loss may change table data when AutoHide is enabled for filter mode.
- Filter selections and personalization settings are retained.
```

**STEP**: 4 — Related documentation

**DESCRIPTION**: Link to advanced ALP extension examples and configuration guidance.

**LANGUAGE**: Text

**CODE**:
```Text
Related Information:
- Configuring Analytical List Page App Extensions:
  config/configuring-analytical-list-page-app-extensions-9504fb4.md
  (This section provides advanced configurations and extensions for your application.)
```

fiori-elements-framework
ALP
OData V2
refreshBinding
Component.js
controller-extension
refresh


**TITLE**: Refresh Dataset for Back Navigation When sap-keep-alive Is True

**INTRODUCTION**: When sap-keep-alive=true, an app suspended by navigating away does not automatically refresh when the user returns. Implement lifecycle extension hooks to run custom refresh logic when the app is suspended and when it is restored (back navigation).

**TAGS**: fiori-elements, sap-keep-alive, onLeaveAppExtension, onSuspend, onRestore, OData V2, OData V4, UI5, ControllerExtension

**STEP**: OData V2 — Use onLeaveAppExtension

**DESCRIPTION**: Implement onLeaveAppExtension in your controller extension to provide a reactivation function that runs when the app is restored. Place this method in the controller extension (for example, the Object Page controller extension that exposes controllerFrameworkExtensions). Use the returned function to perform any dataset refresh or UI re-initialization. See the API reference for sap.suite.ui.generic.template.ObjectPage.controllerFrameworkExtensions for details: https://ui5.sap.com/#/api/sap.suite.ui.generic.template.ObjectPage.controllerFrameworkExtensions

**LANGUAGE**: JavaScript

**CODE**:
```javascript
onLeaveAppExtension: function (bIsDestroyed) {
	Log.info("onLeaveAppExtension called!");
	var fnReactivate = function () {
		sap.m.MessageToast("onLeaveAppExtension is called here").show();
	};
	return fnReactivate;
}
```

**STEP**: OData V4 — Use onSuspend and onRestore

**DESCRIPTION**: For Fiori elements OData V4 apps running in sap-keep-alive mode, implement onSuspend and onRestore in the viewState override of a ControllerExtension. onSuspend runs when the app is suspended (external navigation); onRestore runs when the app is restored (e.g., back navigation). Add refresh logic in onRestore (or store/restore state between suspend/restore) to update specific datasets or UI state.

**LANGUAGE**: JavaScript

**CODE**:
```javascript
return ControllerExtension.extend("SalesOrder.ext.LRExtend", {
    // this section allows to extend lifecycle hooks or override public methods of the base controller
    override: {
        viewState: {
            onSuspend: function() {
                // Applications can add their custom code here
            },
            onRestore: function() {
                // Applications can add their custom code here
            }
        }
    }
}
```

fiori-elements
sap-keep-alive
onLeaveAppExtension
onSuspend
onRestore
OData V2
OData V4
UI5
ControllerExtension


**TITLE**: Refresh Entity Sets in sap-keep-alive Mode (Fiori Elements)

**INTRODUCTION**: Configure which OData entity sets are refreshed when a SAP Fiori Elements app running with sap-keep-alive is reactivated (for example, after navigating back from an external application). Use manifest.json settings or extension APIs to override defaults, include/exclude dependents, and control behavior per outbound intent.

**TAGS**: fiori-elements-framework, sap-keep-alive, manifest.json, OData V2, OData V4, refresh, entitySets, crossNavigation, externalNavigationSettings, extensionAPI

STEP: Entity set refresh modes

DESCRIPTION: Use these tokens to specify how an entity set is refreshed when the app is restored. Use in manifest configuration blocks shown later.

LANGUAGE: JSON

CODE:
```json
{
  "EntitySet1": "self",
  "EntitySet2": "includingDependents"
}
```

- "self": refresh only the specified entity set.
- "includingDependents": refresh the specified entity set and any UI-bound dependent navigation properties (child entity sets that have UI controls bound to them). Note: dependents are refreshed only if a UI control is bound to them.

STEP: Source application behavior summary

DESCRIPTION: Action-oriented summary of default refresh behavior and where to override it.

LANGUAGE: Text

CODE:
```
- External Create Navigation:
  * Default: the entity set of the table that triggered navigation is refreshed on return.
  * Cannot be overridden in Fiori Elements OData V2.

- External Chevron Navigation:
  * Default: the entity set of the table that triggered navigation is refreshed on return.
  * Can be switched off or overridden in manifest.json.

- Other External Navigation (including navigation via extension APIs):
  * Default: no refresh.
  * Override: configure refreshStrategyOnAppRestore in manifest.json for specific outbound targets or defaultOutboundSettings.

- Navigation Using Extensions (navigateExternal):
  * The outbound target passed to navigateExternal determines which entitySets configured under refreshStrategyOnAppRestore are considered when the app is restored.
```

STEP: OData V2 — Override chevron/default refresh in manifest.json (per outbound target)

DESCRIPTION: Example manifest.json snippet that overrides refresh behavior for a specific outbound target on page-level navigation configuration. Place this under sap.ui.generic.app.pages for the relevant ListReport/ObjectPage page definition.

LANGUAGE: JSON

CODE:
```json
"sap.app": {
	...
	"crossNavigation": {
		"outbounds": {
			"<OutboundTarget>": {
				"semanticObject": "<SemanticObject>",
				"action": "<Action>"
			}
		}
	}
}

....
....

"sap.ui.generic.app": {
	...
	"pages": {
			"ListReport|<ListReportEntitySet>": {
				...
				"pages": {
					"ObjectPage|<ObjectPageEntitySet>": {
						...
						"navigation": {
							"display": {
								"path": "sap.apps.crossNavigation.outbounds",
								"target": "<OutboundTarget>",
								"refreshStrategyOnAppRestore": {
									"entitySets": {
										"<EntitySetToRefresh>": "<self/includingDependents>",
										"<AnotherEntitySetToRefresh>": "<self/includingDependents>"
									}
								}
							}
						}
					}
				}
			}
		}
}
```

STEP: OData V2 — Default and per-outbound externalNavigationSettings

DESCRIPTION: Configure default outbound refresh strategies and per-outbound overrides under sap.ui.generic.app.settings.externalNavigationSettings. Use defaultOutboundSettings for fallback and outbounds for specific outbound targets.

LANGUAGE: JSON

CODE:
```json
"sap.app": {
   ...
   "crossNavigation": {
      "outbounds": {
         "<OutboundTarget1>": {
            "semanticObject": "<SemanticObject1>",
            "action": "<Action1>"
         },
         "<OutboundTarget2>": {
            "semanticObject": "<SemanticObject2>",
            "action": "<Action2>"
         }
      }
   }
}

....
....

"sap.ui.generic.app": {
      "_version": "1.3.0",
      "settings": {
         "externalNavigationSettings": {
            "defaultOutboundSettings": {
               "refreshStrategyOnAppRestore": {
                  "entitySets": {
                     "<EntitySetToRefresh>": "<self/includingDependents>",
                     "<AnotherEntitySetToRefresh>": "<self/includingDependents>"
                  }
               }
            },
            "outbounds": {
               "<OutboundTarget1>": {
                  "refreshStrategyOnAppRestore": {
                     "entitySets": {
                        "<EntitySetToRefresh>": "<self/includingDependents>",
                        "<AnotherEntitySetToRefresh>": "<self/includingDependents>"
                     }
                  }
               },
               "<OutboundTarget2>": {
                  "refreshStrategyOnAppRestore": {
                     "entitySets": {
                        "<EntitySetToRefresh>": "<self/includingDependents>",
                        "<AnotherEntitySetToRefresh>": "<self/includingDependents>"
                     }
                  }
               }
            }
         }
      }
      ...
      ...
   }
```

STEP: OData V2 — Navigate using extension API (controller extension)

DESCRIPTION: To trigger navigation and apply outbound refresh strategy, call navigationController.navigateExternal with the outbound target from an extension. The manifest must include the matching outbound entry under sap.app.crossNavigation.outbounds and/or sap.ui.generic.app.settings.externalNavigationSettings.outbounds.

LANGUAGE: JavaScript

CODE:
```javascript
onListNavigationExtension: function (oEvent) {
	var oNavigationController = this.extensionAPI.getNavigationController();
	oNavigationController.navigateExternal("<OutboundTarget>");
	return true;
}
```

STEP: OData V2 — Manifest sample for extension-driven outbound (manifest.json)

DESCRIPTION: Example manifest portion for an outbound target used by navigateExternal (must align with externalNavigationSettings if refresh strategies are required).

LANGUAGE: JSON

CODE:
```json
"sap.app": {
   ...
   "crossNavigation": {
      "outbounds": {
         "<OutboundTarget>": {
            "semanticObject": "<SemanticObject>",
            "action": "<Action>"
         }
      }
   }
}

....
....

"sap.ui.generic.app": {
      "settings": {
         "externalNavigationSettings": {
            "outbounds": {
               "<OutboundTarget>": {
                  "refreshStrategyOnAppRestore": {
                     "entitySets": {
                        "<EntitySetToRefresh>": "<self/includingDependents>",
                        "<AnotherEntitySetToRefresh>": "<self/includingDependents>"
                     }
                  }
               }
            }
         }
    }
      ...
      ...
   }
```

STEP: OData V2 — Reuse component: setRefreshBehaviour usage (stStart example)

DESCRIPTION: In a reuse component stStart function, set a before-navigation callback to the navigation controller’s setRefreshBehaviour so that returning from the external target refreshes the specified entity set ("EPMSalesOrder" in the example).

LANGUAGE: JavaScript

CODE:
```javascript
stStart: function(oModel, oBindingContext, oExtensionAPI) {
            var oComponentModel = this.getComponentModel();
            var oBinding = oComponentModel.bindProperty("/state");
            oBinding.attachChange(function(){
                oExtensionAPI.onCustomStateChange();
                this.setMessage();
            }.bind(this));
            this.adaptToBindingContext(oBindingContext);
            var oNavPopOverLink = this.getRootControl().getContent()[0].getContent()[7];
            var oNavigationController = oExtensionAPI.getNavigationController();
            oNavPopOverLink.setBeforeNavigationCallback(oNavigationController.setRefreshBehaviour.bind(null,"EPMSalesOrder"));
        },
```

STEP: OData V4 — Page-level refreshStrategyOnAppRestore manifest example

DESCRIPTION: V4 supports per-page defaultBehavior and per-intent overrides. The most specific match is used (semanticObject-action, then semanticObject-only, then page default). Place these under routing.targets.[Target].options.settings.refreshStrategyOnAppRestore.

LANGUAGE: JSON

CODE:
```json
{
    "sap.ui5": {
        "routing": {
            "targets": {
                "SalesOrderManageList": {
                    "type": "Component",
                    "id": "SalesOrderManageList",
                    "name": "sap.fe.templates.ListReport",
                    "options": {
                        "settings": {
                            ...
                            "refreshStrategyOnAppRestore": {
                                "defaultBehavior": {
                                    "SalesOrderManage": "self"
                                }
                            }
                        }
                    }
                },
                "SalesOrderManageObjectPage": {
                    "options": {
                        "settings": {
                            ...
                            "refreshStrategyOnAppRestore": {
                                "intents": {
                                    "v4Freestyle": { // This block is considered if the block above is NOT matched but the external navigation before we landed on this page only matches the Semantic Object specified here and NOT the action part
                                        "SalesOrderItem": "includingDependents"
                                    },
                                    "v4Freestyle-Inbound": { // This block is considered if the external navigation before we landed on this page matches exactly the Semantic Object-Action specified here
                                        "SalesOrderItem": "includingDependents"
                                    }
                                },
                                "defaultBehavior": { // This block is used if the external navigation before we landed on this page does NOT match the above blocks. This can happen for navigations where the Semantic Object is different from what is specified above.
                                    "SalesOrderManage/_Item": "includingDependents"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```

STEP: OData V4 — Switch off default chevron refresh for specific intents

DESCRIPTION: Use an empty object for an intent to prevent any refresh for that semantic-object (or semantic-object-action) when returned to via chevron/internal navigation for that intent. Note: this does not affect CREATE cases (create always triggers refresh for the table entity set).

LANGUAGE: JSON

CODE:
```json
"refreshStrategyOnAppRestore": {
    "intents": {
        "v4Freestyle-Inbound": {
            "SalesOrderItem": "includingDependents" // Due to this override, only SalesOrderItem and dependents are refreshed for V4FreeStyle-Inbound So-Action external navigation
        },
        "v4Freestyle": {} // Due to this override, for all other intents from V4FreeStyle SO other than Inbound, no refresh is done (including when going to such a target through chevron navigation which normally triggers a default refresh of the table)
    }
}
```

STEP: Important implementation notes and gotchas

DESCRIPTION: Keep these actionable considerations when configuring refresh strategies.

LANGUAGE: Text

CODE:
```
- The refreshStrategyOnAppRestore only affects data refresh when returning from an external target while sap-keep-alive is active. Internal forward navigation (e.g., from a list to a detail page) always triggers a data request to the backend.

- Back navigation within the app uses the refresh strategy configured for the page that initiated the external navigation.

- For containment/parameterized entities, specify the full path starting with a forward slash ("/Customer/Set") when you need the full contextPath style, consistent with "contextPath" manifest usage.

- For regular non-containment entity sets do NOT start with a slash (e.g., "SalesOrderItem").

- If the backend service is NOT ETag-enabled and the List Report table is configured to be refreshed in Flexible Column Layout mode, the refresh may trigger for all of the table's dependent entity sets. To avoid unwanted refreshes, enable ETag on the backend service.

- "includingDependents" only refreshes a child navigation entity if a UI control is bound to that child entity.
```

STEP: Related reference

DESCRIPTION: Use this link for a custom refresh implementation when sap-keep-alive is true and automatic refresh is not sufficient.

LANGUAGE: Markdown/URL

CODE:
```
Refresh Dataset for Back Navigation when sap-keep-alive is Set to True:
refresh-dataset-for-back-navigation-when-sap-keep-alive-is-set-to-true-f1c2704.md
```

fiori-elements-framework
sap-keep-alive
manifest.json
OData V2
OData V4
refresh
entitySets
crossNavigation
externalNavigationSettings
extensionAPI


**TITLE**: Configure Entity Set Refresh on App Restore (sap-keep-alive) for Overview Pages

**INTRODUCTION**: Use this configuration to refresh specific OData entity sets in Overview Pages (sap.ovp) when a view is restored from the SAP Fiori launchpad view cache (sap-keep-alive). This preserves view state for performance but ensures selected entity sets are refreshed when the user returns to the source application.

**TAGS**: fiori-elements-framework, sap-keep-alive, sap.ovp, manifest.json, overview-pages, refresh, entity-sets

**STEP**: 1 — Understand behavior and purpose

**DESCRIPTION**: When SAP Fiori launchpad uses sap-keep-alive, views are cached and not destroyed on navigation. To ensure data reflects changes made in other apps while the view was cached, configure which entity sets should be refreshed when the view is restored. This is done in the application's manifest.json under the sap.ovp section using refreshStrategyOnAppRestore.

**LANGUAGE**: text

**CODE**:
```text
Behavior:
- sap-keep-alive preserves the view and its state in the launchpad view cache.
- On returning to the cached (restored) view, the framework can refresh configured entity sets so cards and lists show updated data.
- Configure the entity sets to refresh in manifest.json under sap.ovp.refreshStrategyOnAppRestore.entitySets.
```

**STEP**: 2 — Add refresh configuration to manifest.json

**DESCRIPTION**: Edit the application's manifest.json. Under the "sap.ovp" section, add a "refreshStrategyOnAppRestore" object with an "entitySets" map. Specify the entity set name as the key and the value "self" to indicate that this entity set should be refreshed automatically when the view is restored.

- File path: manifest.json
- Place the property in the root sap.ovp configuration for the Overview Pages application.

**LANGUAGE**: JSON

**CODE**:
```json
"sap.ovp": {
        "globalFilterModel": "salesOrder",
        "globalFilterEntityType": "GlobalFilters",//Represents the entity used as a global filter in the smart filter bar control. Deprecated since SAPUI5 1.54.
        "globalFilterEntitySet": "ZFilterEntitySet", //Represents the entity set used as a global filter in the smart filter bar control. Available from SAPUI5 1.54 onwards.
        "smartVariantRequired": true,
        "enableLiveFilter": true,
        "containerLayout": "resizable",
        ...
        "refreshStrategyOnAppRestore": {
            "entitySets": {
                "<entitySetToRefresh>": "self"
            }
        },
        ...
        "cards": {
            ...
        }
}
```

**STEP**: 3 — Implementation notes and validation

**DESCRIPTION**:
- Replace "<entitySetToRefresh>" with the exact name of the OData entity set you want refreshed (e.g., "SalesOrders").
- Use "self" as the value to indicate automatic refresh of that entity set on app restore.
- Keep other sap.ovp settings intact (cards, containerLayout, etc.).
- Validate the manifest.json (comments in the example are illustrative; remove or convert to proper JSON format if your tooling enforces strict JSON).
- Test by: navigating from the source app to a target app that modifies data, then return to the source app. Confirm the configured entity set's card data updates on restore.

**LANGUAGE**: text

**CODE**:
```text
Validation checklist:
- manifest.json contains sap.ovp.refreshStrategyOnAppRestore.entitySets with correct entity set names.
- Values use "self" to enable refresh on app restore.
- Remove or adapt inline comments if your build requires strict JSON compliance.
- Test in Fiori launchpad with sap-keep-alive enabled: modify data in another app, return to verify refresh.
```

fiori-elements-framework sap-keep-alive sap.ovp manifest.json overview-pages refresh entity-sets


**TITLE**: Replace Standard Save in Mass Edit Dialog (Fiori Elements — OData V2 & V4)

**INTRODUCTION**: Enable and implement custom save logic for the mass edit dialog. Implement the provided extension functions in the list report or controller extension to replace or augment the framework’s default mass-edit save. The framework will perform cleanup (e.g., close the dialog) after the extension logic completes. For OData V4, returning true from the custom handler prevents the framework default save.

**TAGS**: fiori-elements, mass-edit, odata-v2, odata-v4, controller-extension, list-report, extensionAPI, custom-save

**STEP**: 1 — Behavior and placement
**DESCRIPTION**: Implement the custom save function in the list report or controller extension. If no extension is defined, the framework executes its default save. For OData V4, returning true from the extension prevents default save execution. The framework still performs cleanup after extension logic completes.
**LANGUAGE**: Text
**CODE**:
```text
Placement: Implement in the list report extension or controller extension.

Behavior summary:
- OData V2: Implement beforeMultiEditSaveExtension(aContextsToBeUpdated). Framework executes default behavior if not implemented.
- OData V4: Implement customMassEditSave(aParameters). If this returns true, framework default save is not executed.
- Cleanup (e.g., closing the dialog) is performed by the framework after extension logic finishes.
```

**STEP**: 2 — Implementation for OData V2
**DESCRIPTION**: Add beforeMultiEditSaveExtension to the list report or controller extension. The handler receives aContextsToBeUpdated: an array of { sContextPath, oUpdateData }. Use this.extensionAPI.invokeActions (or other APIs) to perform the save (for example, call a function import). Return a Promise so the framework waits for completion.
**LANGUAGE**: JavaScript
**CODE**:
```javascript
beforeMultiEditSaveExtension: function (aContextsToBeUpdated) {
            //aContextsToBeUpdated - The array of objects containing the contexts to be updated and the updated value.
            //aContextsToBeUpdated[].sContextPath - The context path for the child to be updated.
            //aContextsToBeUpdated[].oUpdateData - The Object with the updated values for the selected properties in the multi edit dialog.
            var oApi = this.extensionAPI;
              return new Promise(function(fnResolve,fnReject){
                var oPromise = oApi.invokeActions("STTA_SALES_ORDER_ND_SRV_01/STTA_C_SO_SalesOrder_NDSetopportunityid", [], aContextsToBeUpdated);//Your function import for save here
                oPromise.then(fnResolve,fnReject);
        });
```

**STEP**: 3 — Implementation for OData V4
**DESCRIPTION**: Define customMassEditSave in the list report or object page controller extension (inside an override of editFlow). The function receives aParameters with aContexts (array of selected contexts) and oUpdateData (dictionary of propertyPath->value). Execute your custom save (for example, invokeAction). Return true to prevent the framework default mass-edit save.
**LANGUAGE**: JavaScript
**CODE**:
```javascript
sap.ui.define(
    [
        "sap/ui/core/mvc/ControllerExtension",
        "sap/m/MessageToast"
    ],
    function (ControllerExtension, Filter, FilterOperator, IllustratedMessage, IllustratedMessageType, MessageToast) {
        "use strict";

        return ControllerExtension.extend("sap.fe.core.fpmExplorer.OPExtend", {
            override: {
                editFlow: {
                    customMassEditSave: async function (aParameters) {
                        // aParameters.aContexts: array containing the selected contexts for the mass edit
                        // aParameters.oUpdateData: a dictionary containing the propertyPath and its updated value

                        //Execute the custom save action
                        await this.base.editFlow
                        .invokeAction("Service.customUpdateAction", {
                            contexts: aParameters.aContexts,
                            parameterValues: aParameters.oUpdateData
                        })
                        .catch(function (e){
                            MessageToast.show(e.toString());
                        });

                        //Do not execute the default mass-edit
                        return true;
                    }
                }
            }

        });
    }
);
```

**STEP**: 4 — Reference
**DESCRIPTION**: Additional documentation and examples for mass edit dialog behavior and enabling editing.
**LANGUAGE**: Text
**CODE**:
```text
Related documentation:
- Enabling Editing Using a Dialog (Mass Edit): enabling-editing-using-a-dialog-mass-edit-965ef5b.md
```

fiori-elements mass-edit odata-v2 odata-v4 controller-extension list-report extensionAPI custom-save


**TITLE**: Responsiveness Options: Importance-Based Rendering (Fiori elements)

**INTRODUCTION**: Brief, code-focused guidance for making fields responsive in SAP Fiori elements pages (list report tables, object page tables, smart chart toolbars) by setting the com.sap.vocabularies.UI.v1.Importance annotation. The platform evaluates this annotation to decide whether a field is shown on phone, tablet, or desktop.

**TAGS**: fiori-elements-framework, annotations, responsiveness, importance, UI.v1, OData, XML

STEP: Behavior summary
DESCRIPTION: Explain how Fiori elements uses the Importance annotation to determine visibility per device type in pages that include toolbars (list report tables, object page tables, smart chart toolbars).
LANGUAGE: Text
CODE:
```text
- Fields with Importance = High -> rendered on mobile phone.
- Fields with Importance = High or Medium -> shown on tablet.
- Fields with Importance = High, Medium, or Low -> shown on desktop.
```

STEP: OData annotation example (Annotations file / XML)
DESCRIPTION: Add a UI Importance annotation to a property in an OData annotations XML file. Use the Annotations Target attribute to point to the entity type property, and set the EnumMember to the desired ImportanceType (High | Medium | Low). This is the canonical way to control visibility for Fiori elements consumers of your OData service.
LANGUAGE: XML
CODE:
```xml
<!-- Example: annotate the SalesOrderID property as High importance -->
<Annotations Target="MyService.SalesOrderType/SalesOrderID" xmlns="http://docs.oasis-open.org/odata/ns/edm">
  <Annotation Term="com.sap.vocabularies.UI.v1.Importance"
              EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/High" />
</Annotations>

<!-- Example: annotate multiple properties -->
<Annotations Target="MyService.SalesOrderType" xmlns="http://docs.oasis-open.org/odata/ns/edm">
  <Annotation Term="com.sap.vocabularies.UI.v1.Importance"
              Qualifier="OrderIDImportance"
              EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/High" />
  <!-- Alternatively annotate the properties individually -->
</Annotations>
```

STEP: Alternate XML snippet (Property-level annotation inside an EDMX/Annotations grouping)
DESCRIPTION: If annotating within an EDMX or grouped annotations file, use the Property/Annotation pattern or the per-Property Target pattern. The Annotation Term and EnumMember are identical.
LANGUAGE: XML
CODE:
```xml
<!-- Property-targeted annotation (grouped annotations file) -->
<Annotations Target="MyService.SalesOrderType/SalesOrderID">
  <Annotation Term="com.sap.vocabularies.UI.v1.Importance"
              EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/Medium" />
</Annotations>

<!-- Or in a property block (EDMX style) -->
<Property Name="SalesOrderID" Type="Edm.String">
  <Annotation Term="com.sap.vocabularies.UI.v1.Importance"
              EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/Low" />
</Property>
```

STEP: Implementation notes for code generation
DESCRIPTION: Actionable rules for code generators or template writers:
- Ensure the annotation target references the correct namespace + entity type + property path.
- Use EnumMember values: com.sap.vocabularies.UI.v1.ImportanceType/High | /Medium | /Low.
- Place these annotations in the service metadata annotations file consumed by Fiori elements (Annotations.xml) or generated metadata extension files.
- Verify that the Fiori elements page type includes a toolbar (list report table, object page table, or smart chart toolbar) because Importance is evaluated for toolbar fields.
LANGUAGE: Text
CODE:
```text
- Target format: <Annotations Target="Namespace.EntityType/Property"> ... </Annotations>
- Enum values: ImportanceType/High, ImportanceType/Medium, ImportanceType/Low
- Placement: Annotations.xml or service metadata extension consumed by the Fiori elements app
- Outcome: Controls visibility by device (phone/tablet/desktop) as described above
```

fiori-elements-framework annotations responsiveness importance UI.v1 OData XML


**TITLE**: SAP Fiori Elements — Feature Map (Developer Reference)

**INTRODUCTION**: Concise developer reference that maps SAP Fiori Elements UI controls, features, building blocks and extension points to the exact documentation files and design guideline links. Use this reference to quickly find the manifest/annotation/extension documentation required when generating, extending, or customizing Fiori Elements apps (List Report, Object Page, Analytical List Page, Overview Page). Action-oriented: follow the linked docs to implement each feature; use the code blocks for automation (search, CLI, templates).

**TAGS**: fiori-elements-framework, features, controls, building-blocks, extension-points, OData-V2, OData-V4, manifest, annotations

STEP: 1 — Filter usage: searching supported floorplans
DESCRIPTION: Use the floorplan filter logic when searching the feature map. Examples:
- Features available for both OData versions: use the plain name (e.g., List report page, Object page).
- Features available only for OData V2: append "(OData V2)".
- Features available only for OData V4: append "(OData V4)".

LANGUAGE: PlainText
CODE:
```text
Examples:
- "List report page"                -> supported in both OData V2 and V4
- "List report page (OData V2)"     -> supported only in OData V2
- "List report page (OData V4)"     -> supported only in OData V4
```

STEP: 2 — Extending SAP Fiori Elements-based apps (extension point quick links)
DESCRIPTION: Use these extension docs to extend generated apps during creation or runtime. Follow each linked doc to implement extension points and adaptation extensions.

LANGUAGE: Markdown
CODE:
```markdown
Extending generated apps:
- Extending Generated Apps Using App Extensions
  -> extending-generated-apps-using-app-extensions-340cdb2.md

- Extending List Reports and Object Pages Using App Extensions
  -> extending-list-reports-and-object-pages-using-app-extensions-a892eb8.md

- Configuring Analytical List Page App Extensions
  -> configuring-analytical-list-page-app-extensions-9504fb4.md

- Configuring Overview Page App Extensions
  -> configuring-overview-page-app-extensions-b240f61.md
```

STEP: 3 — Building blocks (OData V4 / Flexible Programming Model)
DESCRIPTION: The Flexible Programming Model exposes building blocks for OData V4 apps. Use these docs to implement and combine building blocks in manifest or macro configurations. The code block maps each building block identifier (preserve exact names) to its documentation file.

LANGUAGE: JSON
CODE:
```json
{
  "buildingBlocks": [
    { "id": "Chart", "doc": "the-chart-building-block-52d065a.md" },
    { "id": "ConditionalSwitch", "doc": "the-conditionalswitch-building-block-ba06542.md" },
    { "id": "Field", "doc": "the-field-building-block-5260b9c.md" },
    { "id": "FilterBar", "doc": "the-filterbar-building-block-7838611.md" },
    { "id": "MicroChart", "doc": "the-microchart-building-block-74554b4.md" },
    { "id": "Paginator", "doc": "the-paginator-building-block-997292b.md" },
    { "id": "Table", "doc": "the-table-building-block-3801656.md" },
    { "id": "TreeTable", "doc": "the-treetable-building-block-667851f.md" },
    { "id": "Page", "doc": "the-page-building-block-0258650.md" },
    { "id": "MessageButton", "doc": "the-messagebutton-building-block-b365f2a.md" },
    { "id": "RichTextEditor", "doc": "the-richtexteditor-building-block-7bd2767.md" },
    { "id": "Status", "doc": "the-status-building-block-8d8d810.md" },
    { "id": "Share", "doc": "the-share-building-block-41b02df.md" },
    { "id": "VariantManagement", "doc": "the-variantmanagement-building-block-33640ff.md" },
    { "id": "FlexibleColumnLayoutActions", "doc": "the-flexiblecolumnlayoutactions-building-block-1ba680b.md" }
  ],
  "notes": "Combine building block docs for macro and manifest usage; follow Flexible Programming Model guide: flexible-programming-model-549749b.md"
}
```

STEP: 4 — Core extension and adaptation docs (quick reference)
DESCRIPTION: Central docs you will call when implementing UI adaptation, extension points, or customization hooks. Use them in sequence: (1) read capability doc, (2) open corresponding extension point doc, (3) implement extension code or manifest changes.

LANGUAGE: Markdown
CODE:
```markdown
Core extension docs:
- UI Adaptation: adapting-the-ui-list-report-and-object-page-0d2f1a9.md
- Extension Points for Tables: extension-points-for-tables-d525522.md
- Extension Point for List Report Header: extension-point-for-list-report-header-1ab83e6.md
- Extension Points for Object Page Header Facets: extension-points-for-object-page-header-facets-61cf0ee.md
- Extension Points for Sections on the Object Page: extension-points-for-sections-on-the-object-page-92ad996.md
- Extension Points for Subsections on the Object Page: extension-points-for-subsections-on-the-object-page-ce8d468.md
- Extension Points for Forms on the Object Page: extension-points-for-forms-on-the-object-page-4e49753.md
- Extension Points for Pages: extension-points-for-pages-ecdf1d6.md
- Adaptation extensions guide: extending-delivered-apps-using-adaptation-extensions-52fc48b.md
```

STEP: 5 — Table and table-related features (configuration pointers)
DESCRIPTION: Use these docs to configure table type, columns, personalization, export, inline creation, and behaviors (freeze column, row count). Each entry links to the exact doc to implement the feature.

LANGUAGE: JSON
CODE:
```json
{
  "tables": [
    { "feature": "Setting the Table Type", "doc": "setting-the-table-type-7f844f1.md" },
    { "feature": "Defining Line Items (Add column to a table)", "doc": "defining-line-items-f0e1e17.md" },
    { "feature": "Configuring Tables", "doc": "configuring-tables-f4eb70f.md" },
    { "feature": "Adding Multiple Fields to One Column", "doc": "adding-multiple-fields-to-one-column-in-responsive-tables-d318e42.md" },
    { "feature": "Enabling Table Personalization", "doc": "enabling-table-personalization-3e2b4d2.md" },
    { "feature": "Export to spreadsheet (enableExport)", "doc": "using-the-export-button-4bab6f2.md" },
    { "feature": "Empty Row Mode / Inline Creation", "doc": "enabling-inline-creation-mode-or-empty-row-mode-for-table-entries-cfb04f0.md" },
    { "feature": "Freeze the first column", "doc": "tables-c0f6592.md" },
    { "feature": "Retrieve row count (getCount)", "doc": "influencing-the-request-dynamically-2cc6c03.md" },
    { "feature": "Copy/Paste from external (Excel)", "doc": "copying-and-pasting-from-external-applications-to-tables-f6a8fd2.md" }
  ],
  "note": "For table toolbars, actions and segmented buttons see: adding-segmented-buttons-to-a-table-toolbar-5532c89.md"
}
```

STEP: 6 — Filters, FilterBar, and Visual Filters
DESCRIPTION: Configure filter bar behavior, semantic date ranges, default values, selection variants, and visual filters. Use these docs to define filter facets and value list enhancements.

LANGUAGE: JSON
CODE:
```json
{
  "filters": [
    { "feature": "Smart Filter Bar", "doc": "smart-filter-bar-7bcdffc.md" },
    { "feature": "Filter Bar configuration", "doc": "configuring-filter-bars-4bd7590.md" },
    { "feature": "Configuring the Global Filter", "doc": "configuring-the-global-filter-73d9693.md" },
    { "feature": "Enabling Semantic Operators (semantic date range)", "doc": "enabling-semantic-operators-in-the-filter-bar-fef65d0.md" },
    { "feature": "Configuring Default Filter Values", "doc": "configuring-default-filter-values-f27ad7b.md" },
    { "feature": "Enhancing ValueList Annotations for Visual Filters", "doc": "enhancing-valuelist-annotations-for-visual-filters-16d43eb.md" },
    { "feature": "Configuring the Visual Filter Bar", "doc": "configuring-the-visual-filter-bar-33f3d80.md" },
    { "feature": "History of recently entered values", "doc": "enabling-the-history-of-recently-entered-values-37dbf1f.md" },
    { "feature": "Value Help as Dropdown List / Popover", "doc": "value-help-as-a-dropdown-list-2a0a630.md" }
  ]
}
```

STEP: 7 — Charts, micro charts, and visualizations
DESCRIPTION: Use these docs to add charts (Chart, Smart Chart), configure chart-only views, add micro charts to tables/cards, and configure analytical cards.

LANGUAGE: JSON
CODE:
```json
{
  "charts": [
    { "feature": "Configuring Charts", "doc": "configuring-charts-653ed0f.md" },
    { "feature": "Configuring the Chart-Only View", "doc": "configuring-the-chart-only-view-as-the-default-option-8e6e885.md" },
    { "feature": "Analytical Cards", "doc": "analytical-cards-d7b0b42.md" },
    { "feature": "Adding a Micro Chart to a Table", "doc": "adding-a-micro-chart-to-a-table-b8312a4.md" },
    { "feature": "Micro Chart Facet", "doc": "micro-chart-facet-e219fd0.md" },
    { "feature": "Area Micro Chart", "doc": "area-micro-chart-1467f2b.md" },
    { "feature": "Bullet Micro Chart", "doc": "bullet-micro-chart-b915166.md" },
    { "feature": "Line Micro Chart", "doc": "line-micro-chart-e5cb2af.md" },
    { "feature": "Radial Micro Chart", "doc": "radial-micro-chart-51eb569.md" },
    { "feature": "Stacked Bar Micro Chart", "doc": "stacked-bar-micro-chart-9c93837.md" }
  ]
}
```

STEP: 8 — Cards and Overview Page features
DESCRIPTION: Overview Page (cards) capabilities: create card types, filters on cards, manage cards, runtime capabilities, custom cards, and card resizing.

LANGUAGE: JSON
CODE:
```json
{
  "cards": [
    { "feature": "List Cards", "doc": "list-cards-56f39e0.md" },
    { "feature": "Table Cards", "doc": "table-cards-167bf7c.md" },
    { "feature": "Chart Cards (Overview)", "doc": "chart-cards-used-in-overview-pages-68e62ad.md" },
    { "feature": "Quick View Cards", "doc": "quick-view-cards-c4bd35e.md" },
    { "feature": "Stack Cards", "doc": "stack-cards-756c49c.md" },
    { "feature": "Creating Custom Cards", "doc": "creating-custom-cards-6d260f7.md" },
    { "feature": "Configuring Overview Pages Using Runtime Capabilities", "doc": "configuring-overview-pages-using-runtime-capabilities-5b1dd11.md" },
    { "feature": "Card Filters (Card filter)", "doc": "configuring-card-filters-ecde99f.md" }
  ]
}
```

STEP: 9 — Actions, action parameter dialogs, and AI features
DESCRIPTION: Configure action placement, default values for action parameter dialogs, menus, and add AI icon/action support. Use the provided docs to create parameter dialogs, prefill values, and adapt/delete dialog texts.

LANGUAGE: JSON
CODE:
```json
{
  "actions": [
    { "feature": "Actions (annotation & manifest-based)", "doc": "actions-cbf16c5.md" },
    { "feature": "Adding Custom Actions Using Extension Points", "doc": "adding-custom-actions-using-extension-points-7619517.md" },
    { "feature": "Default Values for Action Parameters", "doc": "actions-cbf16c5.md#loiocbf16c599f2d4b8796e3702f7d4aae6c__DefaultValuesActionParameters" },
    { "feature": "Prefilling Fields Using DefaultValuesFunction", "doc": "prefilling-fields-using-the-defaultvaluesfunction-5ada91c.md" },
    { "feature": "Adding the AI Icon to Action Buttons", "doc": "adding-the-ai-icon-to-action-buttons-3ad0452.md" },
    { "feature": "Generative AI Features", "doc": "generative-ai-features-0ec03d4.md" }
  ]
}
```

STEP: 10 — Navigation, deep links, keep-alive and sap-keep-alive behaviors
DESCRIPTION: Configure internal/external navigation, preferredMode, deep linking, and view caching (sap-keep-alive). Use these docs for manifest routing and navigation modifications.

LANGUAGE: Markdown
CODE:
```markdown
Navigation & keep-alive:
- Configuring Navigation -> configuring-navigation-a424275.md
- Example: Enable Internal Navigation to Different Detail Page -> example-enable-internal-navigation-to-different-detail-page-75002b3.md
- Handling of the preferredMode Parameter (launch object page in edit mode) -> handling-of-the-preferredmode-parameter-bfaf3cc.md
- Keep alive / sap-keep-alive -> refresh-dataset-for-back-navigation-when-sap-keep-alive-is-set-to-true-f1c2704.md
- Refresh entity sets in sap-keep-alive mode -> refresh-entity-sets-in-sap-keep-alive-mode-3c65f2c.md
```

STEP: 11 — Messages, toasts, popovers and confirmations
DESCRIPTION: Use these docs for message handling and UI confirmations; relevant for error handling, server messages (412), and message popovers.

LANGUAGE: JSON
CODE:
```json
{
  "messaging": [
    { "feature": "Using Messages", "doc": "using-messages-239b192.md" },
    { "feature": "Confirmation Popups", "doc": "confirmation-popups-9a53662.md" },
    { "feature": "Adding Confirmation Popovers for Actions", "doc": "adding-confirmation-popovers-for-actions-87130de.md" },
    { "feature": "Adapting Texts in Delete Dialog (List Report)", "doc": "adapting-texts-in-the-delete-dialog-using-extensions-list-report-25885b6.md" },
    { "feature": "Adapting Texts in the Delete Dialog (Object Page Header)", "doc": "adapting-texts-in-the-delete-dialog-object-page-header-1fd8e52.md" }
  ],
  "notes": "Refer to docs for 412 handling and strict handling options (Prefer:handling=strict)"
}
```

STEP: 12 — Miscellaneous frequently-used feature docs (quick access)
DESCRIPTION: Shortlist of other important docs used in common development tasks (draft handling, save hooks, default settings, side effects, input assistance).

LANGUAGE: Markdown
CODE:
```markdown
Misc docs:
- Draft Handling -> draft-handling-ed9aa41.md
- Adapting Logic Before Save Operation -> adapting-logic-before-save-operation-6a0a050.md
- Default Settings (Visualizations, Sort Order, Filter Values) -> configuring-default-settings-visualizations-sort-order-filter-values-49a6ba5.md
- Side Effects -> side-effects-18b17bd.md
- Input Assistance -> input-assistance-1a6324d.md
- Using Custom Code Before Standard Operations -> using-custom-code-before-standard-operations-877e5ff.md
```

STEP: 13 — Search strategy for specific features
DESCRIPTION: To programmatically find the exact document for a feature:
1. Search the feature name (exact string) in the feature map.
2. If present as a building block, use the building-block doc in STEP 3.
3. For UI control specifics, open the corresponding control doc file referenced in the Developer Documentation column (manifest/annotation implementation guidance is in the linked md files).

LANGUAGE: PlainText
CODE:
```text
Search steps:
1) Exact match feature name -> read Developer Documentation link (md filename).
2) If feature has a building block identifier (e.g., "Table", "Chart"), open the corresponding 'the-*-building-block-*.md'.
3) For OData-specific behavior append "(OData V2)" or "(OData V4)" to the search term.
4) For extension implementation search "extension" + feature name (e.g., "extension points for tables").
```

Step: 14 — Quick manifest/annotation entry points (start here)
DESCRIPTION: When implementing a feature in code, open the referenced md file (see previous steps), then:
- For manifest changes: follow examples in the md for "manifest.json" entries.
- For annotations: open the md and copy required annotation snippet to your CDS/annotation file.
- For extension points: implement controller/js fragments as shown in extension docs.

LANGUAGE: PlainText
CODE:
```text
Common starting docs:
- manifest examples -> see each feature's md (search for "manifest" in the doc)
- annotation examples -> search the feature md for "annotations" or "annotation snippet"
- extension implementation -> open the "extension-points-*" docs referenced above
```

Note: Use the exact md filenames above to load the SAP Fiori Elements developer docs. Each doc contains code snippets, manifest/annotation examples and step-by-step implementation guidance.

fiori-elements-framework features controls building-blocks extension-points OData-V2 OData-V4 manifest annotations


**TITLE**: SAP Fiori Elements Tutorials, Courses, and Blogs (Resource Index for Code Generation Agents)

**INTRODUCTION**:
A concise, actionable index of official SAP Fiori Elements learning resources. Use these links as authoritative sources when scaffolding, learning, or generating code for Fiori Elements apps (OData V4, RAP, CAP, mockserver, OPA tests, adaptation projects). Each step provides the resource link(s) and a short, task-oriented description an agent can follow.

**TAGS**: fiori-elements-framework, sap, tutorials, learning, odata-v4, cap, rap, mockserver, opa, sapui5

STEP: Tutorials (Primary hands-on tutorials)
DESCRIPTION: Follow these step-by-step tutorials to scaffold and implement sample Fiori Elements applications. Use each resource to obtain sample projects, commands, prerequisites, and walkthroughs for OData V4 (CAP and RAP), List Report Object Page apps, mockserver+OPA testing, and adaptation projects for SAP S/4HANA Cloud.
LANGUAGE: text
CODE:
```text
Create a Travel App with SAP Fiori Elements Based on OData V4 RAP Service
https://developers.sap.com/group.fiori-tools-odata-v4-travel.html

Create an Incident Management App with SAP Fiori Elements for OData V4
https://developers.sap.com/group.fiori-tools-odata-v4-incident.html

Create a List Report Object Page App with SAP Fiori Tools
https://developers.sap.com/group.fiori-tools-lrop.html

Use the Mockserver and OPA Test Library with SAP Fiori Elements for OData V4 Applications
https://developers.sap.com/group.fiori-elements-mockserver-opa.html

Work with SAPUI5 Adaptation Projects to Make Changes and Extend the Source Code of an Application Variant of an SAP Fiori Application in SAP S/4HANA Cloud Public Edition
https://developers.sap.com/group.sapui5-adaptation-projects.html
```

STEP: Courses and Learning Journeys (Structured curriculum)
DESCRIPTION: Enroll or reference these structured courses/learning journeys to gain broader curriculum-level knowledge about developing and extending Fiori Elements apps. Use for planning learning paths, determining required competencies, and locating official course materials.
LANGUAGE: text
CODE:
```text
Developing and Extending SAP Fiori Elements Apps
https://learning.sap.com/courses/developing-and-extending-sap-fiori-elements-apps

Developing an SAP Fiori Elements App Based on a CAP OData V4 Service
https://learning.sap.com/learning-journeys/developing-an-sap-fiori-elements-app-based-on-a-cap-odata-v4-service

Getting Started with Creating an SAP Fiori Elements App Based on an OData V4 RAP Service
https://learning.sap.com/learning-journeys/getting-started-with-creating-an-sap-fiori-elements-app-based-on-an-odata-v4-rap-service
```

STEP: Blogs (Frequently updated articles and feature showcases)
DESCRIPTION: Use blog posts for up-to-date examples, deep dives, and community-contributed patterns. If a link is stale, start from the SAP Community or search by topic/keyword. The links below include tag indexes and example feature showcase posts for CAP CDS and RAP/ABAP CDS.
LANGUAGE: text
CODE:
```text
Blog Posts Tagged with SAP Fiori Elements
https://blogs.sap.com/tags/ed5c1ef6-932f-4c19-b2ba-1be375109ff5/

The SAP Fiori elements feature showcase with CAP CDS annotations
https://blogs.sap.com/2021/12/07/the-sap-fiori-elements-feature-showcase-with-cap-cds-annotations/

The SAP Fiori Elements feature showcase with RAP and ABAP CDS annotations
https://blogs.sap.com/2022/12/19/the-sap-fiori-elements-feature-showcase-with-rap-and-abap-cds-annotations/

SAP Community main page (use to search if a blog link is stale)
https://community.sap.com/
```

STEP: Usage Guidance for Code Generation Agents
DESCRIPTION: Actionable checklist an agent should use when leveraging the above resources:
- Open the relevant tutorial or course URL to extract sample project structure, prerequisites, and CLI commands.
- Locate downloadable sample code repositories or step-by-step commands in the tutorial pages (often under “Try it” or “Download” sections).
- For tests and local simulation, follow the mockserver + OPA tutorial to configure a mock OData V4 server and run UI assertions.
- For extending standard SAP apps in S/4HANA Cloud, follow the adaptation projects tutorial for required project setup and extension points.
- Use blog posts for configuration examples, CDS annotation patterns, and migration/feature notes.
LANGUAGE: text
CODE:
```text
Checklist:
1) Open chosen tutorial/course link and extract:
   - CLI commands to scaffold app
   - Sample project Git URL (if provided)
   - Build & run instructions
2) If testing locally, follow mockserver + OPA steps to run mock OData server and tests
3) For CAP/RAP specifics, extract CDS annotation examples and expected service metadata
4) For S/4HANA Cloud variants, extract adaptation project steps and extension points
5) Cross-check blog posts for edge cases, annotation snippets, and community tips
```

fiori-elements-framework sap tutorials learning odata-v4 cap rap mockserver opa sapui5


**TITLE**: Save and Close Navigation (navToListOnSave) for Object Page

**INTRODUCTION**: Enable the Object Page to automatically navigate back to the List Report after saving a draft or non-draft record. Applicable only to SAP Fiori elements for OData V2. Configure this in the app manifest (manifest.json) under the pages configuration for the Object Page.

**TAGS**: fiori-elements-framework, OData V2, ObjectPage, manifest.json, navToListOnSave, save, navigation, draft

**STEP**: 1 — Enable Save and Close (navToListOnSave)

**DESCRIPTION**: Edit the application manifest (typically webapp/manifest.json). Under "pages" locate the Object Page entry for the entity (pattern: "ObjectPage|<EntitySetName>"). Add or set the "navToListOnSave" property to true in the ObjectPage settings to make the Save button navigate back to the List Report after the draft is saved.

**LANGUAGE**: JSON

**CODE**:
```json
"pages": {
                                  "ObjectPage|STTA_C_MP_Product": {
                                         "entitySet": "STTA_C_MP_Product",
                                         "component": {
                                                "name": "sap.suite.ui.generic.template.ObjectPage",
                                                "settings": {
                                                       "navToListOnSave": true,
                                                       "showRelatedApps": true,
                                                       "tableType": "ResponsiveTable",
                                                       "editableHeaderContent": true,

                                                       "sections": {
                                                              "to_ProductText::com.sap.vocabularies.UI.v1.LineItem": {
                                                                     "navigationProperty": "to_ProductText",
                                                                     "entitySet": "STTA_C_MP_ProductText",
                                                                     "multiSelect": true,
                                                                     "createMode": "inline",
                                                                     "tableType": "ResponsiveTable"
                                                              }
                                                       }
                                                }
                                         },
```

**STEP**: 2 — Behavior when disabled or omitted

**DESCRIPTION**: If "navToListOnSave" is set to false or omitted, the default behavior applies: the user remains on the Object Page after saving the draft or record. To explicitly disable the automatic navigation, set the flag to false.

**LANGUAGE**: JSON

**CODE**:
```json
"settings": {
    "navToListOnSave": false
}
```

fiori-elements-framework
OData V2
ObjectPage
manifest.json
navToListOnSave
save
navigation
draft


**TITLE**: Scatter Chart Card

**INTRODUCTION**: Use a Scatter Chart Card to visualize data point distributions across two measures (x and y axes). This guide explains required annotations, role-to-axis mapping, dimension/series/category rules, and provides XML, ABAP CDS, and CAP CDS examples ready for use in Fiori Elements / UI5 cards.

**TAGS**: fiori-elements-framework, scatter-chart, UI.Chart, ChartDefinitionType, CDS, XML, ABAP, CAP

**STEP**: 1 — Key rules and behavior

**DESCRIPTION**:
- ChartType: use UI.ChartType/Scatter (XML) or #SCATTER / #Scatter (CDS).
- Measures: a scatter chart supports exactly two measures. Assign measure roles to map them to axes:
  - Use Role = Axis1 for the first measure → mapped to the valueAxis feed UID → x-axis.
  - Use Role = Axis2 for the second measure → mapped to the valueAxis feed UID → y-axis.
  - If Axis1 is missing, Axis2 maps to axis1; if Axis2 is missing, Axis3 can be used — the role resolution order is `axis1`, `axis2` (if no `axis1`), or `axis3` (if no `axis2`).
  - XML enum names: UI.ChartMeasureRoleType/Axis1, .../Axis2, .../Axis3.
- Dimensions:
  - Maximum of two dimensions supported.
  - If a dimension has no role assigned, its members are plotted as equal-sized bubbles of the same color.
  - Assign at most one dimension to the Series role — each member receives a distinct color.
  - Assign at most one dimension to the Category role — each member receives a distinct shape.
- Visual: example image path (preserve for documentation): ../01_Whats-New/images/Whats_New_140_OVP_Scatter_Chart_f264ec1.png

**LANGUAGE**: XML

**CODE**:
```xml
<Annotation Term="UI.Chart" Qualifier="Eval_by_Currency_Scatter">
    <Record Type="UI.ChartDefinitionType">
        <PropertyValue Property="Title" String="Scatter Chart no role" />
        <PropertyValue Property="ChartType" EnumMember="UI.ChartType/Scatter" />
        <PropertyValue Property="MeasureAttributes">
            <Collection>
                <Record Type="UI.ChartMeasureAttributeType">
                    <PropertyValue Property="Measure" PropertyPath="salesshare" />
                    <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1" />
                </Record>
                <Record Type="UI.ChartMeasureAttributeType">
                    <PropertyValue Property="Measure" PropertyPath="totalsales" />
                    <PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis2" />
                </Record>
            </Collection>
        </PropertyValue>
        <PropertyValue Property="DimensionAttributes">
            <Collection>
                <Record Type="UI.ChartDimensionAttributeType">
                    <PropertyValue Property="Dimension" PropertyPath="suppliercompany" />
                </Record>
            </Collection>
        </PropertyValue>
    </Record>
</Annotation>
```

**STEP**: 2 — ABAP CDS annotation example

**DESCRIPTION**: Paste this block into your ABAP CDS view annotation section. It demonstrates setting title, scatter chart type, two measures with roles, one dimension, and a qualifier.

**LANGUAGE**: ABAP CDS

**CODE**:
```

@UI.Chart: [
  {
    title: 'Scatter Chart no role',
    chartType: #SCATTER,
    measureAttributes: [
      {
        measure: 'salesshare',
        role: #AXIS_1
      },
      {
        measure: 'totalsales',
        role: #AXIS_2
      }
    ],
    dimensionAttributes: [
      {
        dimension: 'suppliercompany'
      }
    ],
    qualifier: 'Eval_by_Currency_Scatter'
  }
]
annotate view VIEWNAME with { }

```

**STEP**: 3 — CAP CDS annotation example

**DESCRIPTION**: Use this CAP CDS snippet to define a UI.Chart artifact with qualifier #Eval_by_Currency_Scatter, setting measure and dimension attributes for a scatter chart.

**LANGUAGE**: CDS

**CODE**:
```

UI.Chart #Eval_by_Currency_Scatter : {
    $Type : 'UI.ChartDefinitionType',
    Title : 'Scatter Chart no role',
    ChartType : #Scatter,
    MeasureAttributes : [
        {
            $Type : 'UI.ChartMeasureAttributeType',
            Measure : salesshare,
            Role : #Axis1
        },
        {
            $Type : 'UI.ChartMeasureAttributeType',
            Measure : totalsales,
            Role : #Axis2
        }
    ],
    DimensionAttributes : [
        {
            $Type : 'UI.ChartDimensionAttributeType',
            Dimension : suppliercompany
        }
    ]
},

```

Scatter Chart Card

fiori-elements-framework scatter-chart UI.Chart ChartDefinitionType CDS XML ABAP CAP


**TITLE**: Security Configuration for SAP Fiori elements (OData V4)

**INTRODUCTION**: Practical, code-focused guidance for implementing security-related annotations and extension points in SAP Fiori elements apps (OData V4). Use these steps to mark sensitive data, enable secure upload handling, redact data from outbound navigation, and align CAP/ABAP backend settings with UI behavior.

**TAGS**: fiori-elements, security, ODataV4, CAP, ABAP, annotations, PersonalData, AcceptableMediaTypes, Common.Masked, upload, navigation, extensionAPI

**STEP**: 1 — Verify back-end compatibility (CAP / ABAP)

**DESCRIPTION**: Ensure back-end security and runtime settings match your UI design choices. When using CAP:

- Verify OData batch/config limits if you use grouped invocations (InvocationGrouping: Changeset) so the back end accepts the number of batched requests.
- Ensure CAP security aspects (authentication, authorization, request limits, virus scanning for uploads) are configured.

When using ABAP:

- Follow ABAP/RAP security guidance for search and filtering in unmanaged queries.

Reference links:
- CAP Security Aspects: https://cap.cloud.sap/docs/guides/security/aspects
- Invocation grouping/security in Actions: actions-cbf16c5.md#loiocbf16c599f2d4b8796e3702f7d4aae6c__handlingWithinButtons
- ABAP guidance: https://help.sap.com/docs/abap-cloud/abap-rap/implementing-search-in-unmanaged-query and https://help.sap.com/docs/abap-cloud/abap-rap/implementing-filtering-in-unmanaged-query

**LANGUAGE**: None

**CODE**:
```none
# No code — verify runtime config/settings in your CAP/ABAP environment and adjust batch/request limits accordingly.
```

---

**STEP**: 2 — Enable upload and restrict accepted media types

**DESCRIPTION**: To securely support upload fields, annotate stream properties with Core.AcceptableMediaTypes so the UI accepts only allowed MIME types. The back end must also enforce virus scanning, maximum file size, and MIME-type checks.

Examples: CDS and OData XML annotation forms.

**LANGUAGE**: CDS

**CODE**:
```cds
entity Document {
  key ID : UUID;
  @Core.AcceptableMediaTypes : ['application/pdf', 'image/png']
  Attachment : LargeBinary; // stream property used for uploads
}
```

**LANGUAGE**: XML (Annotations metadata)

**CODE**:
```xml
<Annotations Target="my.namespace.Document/Attachment">
  <Annotation Term="Core.AcceptableMediaTypes">
    <Collection>
      <String>application/pdf</String>
      <String>image/png</String>
    </Collection>
  </Annotation>
</Annotations>
```

Reference links:
- Enabling Stream Support: enabling-stream-support-b236d32.md
- Enabling the Upload Functionality: enabling-the-upload-functionality-d59dbec.md

---

**STEP**: 3 — Mark potentially sensitive data (PersonalData vocabulary)

**DESCRIPTION**: Annotate properties that may contain sensitive personal data with PersonalData.IsPotentiallySensitive. This triggers built-in UI protections (disable history, prevent caching of last executed request with filters on these properties, avoid storing/restoring these fields in app state, etc.).

Examples: CDS and OData XML annotation forms.

**LANGUAGE**: CDS

**CODE**:
```cds
entity SalesOrder {
  key ID : UUID;
  CustomerName : String;
  @PersonalData.IsPotentiallySensitive : true
  CustomerEmail : String;
}
```

**LANGUAGE**: XML (Annotations metadata)

**CODE**:
```xml
<Annotations Target="my.namespace.SalesOrder/CustomerEmail">
  <Annotation Term="PersonalData.IsPotentiallySensitive" Bool="true"/>
</Annotations>
```

Behavior notes (from UI):
- History of recently entered values is disabled on such fields.
- Caching the last executed request is disabled if the request contains a filter on properties annotated with PersonalData.IsPotentiallySensitive.
- Store/restore of application state does not persist changes to such fields (except when used in filter context).

Reference: PersonalData Vocabulary: https://sap.github.io/odata-vocabularies/vocabularies/PersonalData.html

---

**STEP**: 4 — Mask input fields (Common.Masked)

**DESCRIPTION**: Use Common.Masked to hide values on the UI (visual masking). This only affects UI representation — the raw value is still sent to the back end unless you implement additional encryption/redaction server-side.

Examples: CDS and OData XML annotation forms.

**LANGUAGE**: CDS

**CODE**:
```cds
entity Payment {
  key ID : UUID;
  @Common.Masked : true
  CardNumber : String;
}
```

**LANGUAGE**: XML (Annotations metadata)

**CODE**:
```xml
<Annotations Target="my.namespace.Payment/CardNumber">
  <Annotation Term="Common.Masked" Bool="true"/>
</Annotations>
```

Reference: Different representations of a field: different-representations-of-a-field-c18ada4.md

---

**STEP**: 5 — Redact sensitive properties during outbound navigation (adaptNavigationContext extension)

**DESCRIPTION**: Use the SAP Fiori elements extension API to remove or redact sensitive fields from navigation context sent to external apps. Implement adaptNavigationContext in your app extension and return a pruned navigation context.

**LANGUAGE**: JavaScript

**CODE**:
```javascript
// Example extension implementing adaptNavigationContext
// Place in your Fiori elements extension file (e.g., extensionController.js or relevant extension entrypoint)
sap.ui.define([], function () {
  "use strict";
  return {
    // Called before outbound navigation; remove/modify sensitive properties here
    adaptNavigationContext: function (oNavigationContext) {
      if (!oNavigationContext) {
        return oNavigationContext;
      }
      // Example: remove sensitive fields from the first-level navigation entity
      if (oNavigationContext.SalesOrder) {
        delete oNavigationContext.SalesOrder.CustomerEmail;
        delete oNavigationContext.SalesOrder.CardNumber;
      }
      return oNavigationContext;
    }
  };
});
```

Guidance:
- Use app extensions only if you cannot produce the required behavior via annotations or manifest settings.
- Use exclusively the extensionAPI of SAP Fiori elements to ensure compatibility.

Reference: Creating an extension to modify properties in the navigation context: creating-an-extension-to-modify-properties-in-the-navigation-context-199a496.md

---

**STEP**: 6 — Disable or limit export / copy-to-clipboard for sensitive data

**DESCRIPTION**: Prevent exposing sensitive fields via export or clipboard:

- Disable the export button at the table level or exclude specific columns containing sensitive data from export (use appropriate annotations or table/view configuration).
- Disable copy-to-clipboard for columns that contain sensitive data.

Action items:
- Inspect your ListReport/ObjectPage table annotations and manifest settings for export configuration.
- For column-level control, apply an export-exclusion annotation or table column metadata that your table implementation recognizes (refer to "Using the Export Button").

Reference:
- Using the Export Button: using-the-export-button-4bab6f2.md
- Tables & copy-to-clipboard: tables-c0f6592.md

**LANGUAGE**: None

**CODE**:
```none
# Implementation detail depends on the table/control used in your app.
# Use the guidance in "Using the Export Button" and table documentation to apply per-column export/exclude settings.
```

---

**STEP**: 7 — Consider Share (Microsoft Teams) and outbound transfer of data

**DESCRIPTION**: Enabling "Share: Microsoft Teams › As Card" may transfer sensitive or personal data outside the SAP system. If your app contains sensitive information, exclude those properties via annotations (e.g., PersonalData.IsPotentiallySensitive) or remove them from navigation/share payloads.

Reference: The Share: Microsoft Teams Functionality: the-share-microsoft-teams-functionality-ff89e4b.md

**LANGUAGE**: None

**CODE**:
```none
# Evaluate share configuration and annotate/remove fields to avoid leaking sensitive data.
```

---

**STEP**: 8 — Summary of UI effects for properties annotated as potentially sensitive

**DESCRIPTION**: When you apply PersonalData.IsPotentiallySensitive the UI behavior is as follows (ensure your implementation tests and documents these behaviors):

- Export: Sensitive columns can be excluded from export.
- Copy-to-clipboard: Copy actions can be disabled for sensitive columns.
- History: Recently entered values are not stored for sensitive fields.
- Caching: Last executed request is not cached if filters include sensitive fields.
- Store/Restore: App state does not persist changes to sensitive fields (except fields used in filter context).
- Outbound navigation: Sensitive data removed from navigation context (first level); deeper levels may not be removed automatically — adapt navigation context via extension if needed.

**LANGUAGE**: None

**CODE**:
```none
# No code — confirm behaviors by annotating properties and testing in UI.
```

References (full list):
- CAP security: https://cap.cloud.sap/docs/guides/security/aspects
- PersonalData Vocabulary: https://sap.github.io/odata-vocabularies/vocabularies/PersonalData.html
- Enabling Stream Support: enabling-stream-support-b236d32.md
- Enabling the Upload Functionality: enabling-the-upload-functionality-d59dbec.md
- Using the Export Button: using-the-export-button-4bab6f2.md
- Tables documentation: tables-c0f6592.md
- Enabling history: enabling-the-history-of-recently-entered-values-37dbf1f.md
- Caching the last executed request: caching-the-last-executed-request-4215eca.md
- Store/Restore app state: store-restore-the-application-state-46bf248.md
- Creating extension to modify navigation context: creating-an-extension-to-modify-properties-in-the-navigation-context-199a496.md
- Outbound navigation: navigation-from-an-app-outbound-navigation-d782acf.md
- Share (Teams): the-share-microsoft-teams-functionality-ff89e4b.md

fiori-elements security ODataV4 CAP ABAP annotations PersonalData AcceptableMediaTypes Common.Masked upload navigation extensionAPI


**TITLE**: Selecting Transports for Business Configuration Content (Fiori Elements)

**INTRODUCTION**: Step-by-step, code-focused reference to enable and configure the "Select Transport Request" feature for business configuration content in SAP Fiori elements. Includes manifest settings, OData/annotation prerequisites, enabling/disabling via annotations, and making transport selection mandatory.

**TAGS**: fiori-elements-framework, transport, business-configuration, manifest, annotations, OData, ABAP, select-transport

**STEP**: 1 — Enable the feature in the application manifest

**DESCRIPTION**: Add the transportSelection settings to the target page in your manifest.json. Replace placeholders with your root page id, the transport request property name, and the fully qualified action name that performs transport selection.

**LANGUAGE**: JSON

**CODE**:
```json
{
     "sap.ui5": {
          "routing": {
               "targets": {
                    "<yourRootPage>": {
                         "options": {
                              "settings": {
                                   "content": {
                                        "transportSelection": {
                                             "transportRequestProperty": "<TransportRequestProperty>",
                                             "selectTransportAction": "<Namespace>.<SelectTransportAction>"
                                        }
                                   }
                              }
                         }
                    }
               }
          }
     }
}
```

**STEP**: 2 — OData / Service prerequisites for the entity set

**DESCRIPTION**: Ensure the entity set that backs the current document includes:
- A transport request property (string) to store the selected transport request.
- An action (select transport) on the entity set that accepts a string parameter for the transport request selection.
  - The parameter must have a meaningful label.
  - The action must declare @Common.SideEffects so the UI is refreshed after selection.
  - The action parameter must have a value list annotation to provide available transport requests.

Tip: If the number of transport requests is small and static, define the value list annotation as ValueListWithFixedValues so the parameter renders as a dropdown.

**LANGUAGE**: (OData / Annotation guidance — no code)

**CODE**:
```text
(Ensure the OData action exists with:
 - a string parameter for the transport request
 - a label for the parameter
 - @Common.SideEffects on the action
 - a value list annotation (ValueListWithFixedValues if list is small))
```

**STEP**: 3 — Optionally disable the feature at runtime using Common.OperationAvailable

**DESCRIPTION**: If you enabled transportSelection in the manifest but need to disable it under certain conditions, annotate the SelectTransport action with Common.OperationAvailable that points to a boolean property/path (true = available, false = hidden/disabled).

**LANGUAGE**: XML

**CODE**:
```xml
<Annotations Target="Namespace.SelectTransportAction">
     <Annotation Term="Common.OperationAvailable" Path="selectTransportEnabled" />
</Annotations>
```

**STEP**: 4 — Make transport selection mandatory using Common.FieldControl

**DESCRIPTION**: Use @Common.FieldControl on the transport request property to prevent saving until a transport is selected (shows a warning in the message strip and blocks save if mandatory). Two approaches:
- Static mandatory: set EnumMember to Mandatory.
- Dynamic mandatory: point to a path property that evaluates the field control at runtime.

**LANGUAGE**: XML

**CODE**:
```xml
<Annotations Target="Namespace.TransportRequestProperty">
     <Annotation Term="Common.FieldControl" EnumMember="Common.FieldControlType/Mandatory" />
</Annotations>
```

**LANGUAGE**: XML

**CODE**:
```xml
<Annotations Target="Namespace.TransportRequestProperty">
     <Annotation Term="Common.FieldControl" Path="transportRequestFieldControl" />
</Annotations>
```

**STEP**: 5 — UI behavior notes (what users see & save flow)

**DESCRIPTION**: Implementation behaviors to validate in UI tests:
- The "Select Transport Request" control is not visible in read-only mode.
- The control appears in the header toolbar when editing the object page.
- If transport selection is mandatory and no transport is chosen, a warning message strip is shown until selection.
- If the user clicks Save without a selected transport (and the property is mandatory), a dialog prompts for transport selection before proceeding.
- After successful selection, the chosen transport is displayed in the header toolbar and can be changed later.

**LANGUAGE**: Text / Image references

**CODE**:
```text
UI image references:
- images/Transport_Selection_Message_No_Transport_Request_Selected_abdf348.jpg
- images/Transport_Selection_Prompt_for_Transport_Selection_Dialog_3e81ed2.png
- images/Transport_Selection_Selected_Transport_Request_is_Displayed_412836f.png
```

**STEP**: 6 — ABAP Tooling option: Generate ABAP Repository Objects Wizard

**DESCRIPTION**: For ABAP RAP developers, use the "Enable Transport Selection Strip" option in the "Generate ABAP Repository Objects Wizard" to scaffold necessary artifacts. See the official guide for details and links.

**LANGUAGE**: Text / Link

**CODE**:
```text
Reference:
Generating a Business Configuration Maintenance Object with the Generate ABAP Repository Objects Wizard
https://help.sap.com/docs/ABAP_PLATFORM_NEW/b5670aaaa2364a29935f40b16499972d/047e01c3bcdd4303a60b61364bd5b31d.html
```

fiori-elements-framework transport business-configuration manifest annotations OData ABAP select-transport


**TITLE**: Setting Authorizations for Overview Page Cards (requireAppAuthorization in manifest.json)

**INTRODUCTION**: Add an intent-based authorization check to overview page cards so cards are displayed only when the current user has authorization for the target application. This uses the Cross-Application Navigation Service check (isIntentSupported) at runtime to avoid intent-based navigation errors.

**TAGS**: fiori-elements-framework, sap.ovp, manifest.json, requireAppAuthorization, isIntentSupported, cross-application-navigation

**STEP**: 1 — Add requireAppAuthorization to the card settings in manifest.json

**DESCRIPTION**: Edit your app’s manifest.json and add the requireAppAuthorization property under the specific card settings (sap.ovp.cards.<cardId>.settings). Set the value to the intent string that you want to be checked (example: "#Action-toappnavsample"). At runtime the framework uses isIntentSupported to verify authorization; the card is rendered only when that intent is supported for the current user.

**LANGUAGE**: JSON

**CODE**:
```json
{
  "sap.ovp": {
   ...
    "cards": {
     ...
      "card01": {
        "model": "salesOrder",
        "template": "sap.ovp.cards.stack",
        "settings": {
          "title": "Stack Card Title",
          "subTitle": "Stack Card",
          "requireAppAuthorization": "#Action-toappnavsample",
          "entitySet": "SalesOrderSet"
        }
      }
    }
  ...
  }
}
```

**STEP**: 2 — Runtime behavior and service used

**DESCRIPTION**: At runtime the framework checks the provided intent using the Cross-Application Navigation Service (isIntentSupported). If isIntentSupported returns true for the intent specified in requireAppAuthorization, the card is displayed to the user. If not supported, the card will not be shown (preventing unexpected access errors when a user triggers navigation). This makes the intent check explicit and avoids runtime navigation errors.

**LANGUAGE**: text

**CODE**:
```
Runtime check:
- Service: Cross-Application Navigation Service (isIntentSupported)
- Input: value of sap.ovp.cards.<cardId>.settings.requireAppAuthorization (intent string, e.g. "#Action-toappnavsample")
- Outcome: if supported -> card displayed; if not supported -> card not displayed (no navigation attempt)
```

**STEP**: 3 — Design-time limitation

**DESCRIPTION**: The requireAppAuthorization check is performed only at runtime. It does NOT run in design time for overview page cards. Therefore it is ineffective during adaptation projects or when using UI adaptation tools (for example, creating extension projects from Business Application Studio or Visual Studio Code). Plan testing and validation accordingly (check behavior in a running environment).

**LANGUAGE**: text

**CODE**:
```
Notes:
- Design-time (adaptation/extension projects, BAS/VSCode UI adaptation): requireAppAuthorization is NOT checked
- Always validate authorization behavior in a deployed/running app
```

fiori-elements-framework sap.ovp manifest.json requireAppAuthorization isIntentSupported cross-application-navigation


**TITLE**: Set Criticality on Action Buttons (UI.DataFieldForAction)

**INTRODUCTION**: Show how to mark action buttons with semantic criticality (positive/negative) using annotations. Use these annotations in XML, ABAP CDS, or CAP CDS to render semantic action buttons in lists, object pages (header/footer), and inline table rows. Criticality is applied only to UI.DataFieldForAction and influences button styling and primary-action rules.

**TAGS**: fiori-elements-framework, annotations, UI.DataFieldForAction, criticality, SAP, CDS, ABAP, CAP, XML, ODataV4

**STEP**: 1 — XML Annotation: Add Criticality to a DataFieldForAction

**DESCRIPTION**: Add a UI.DataFieldForAction record and set the Criticality property to UI.CriticalityType/Positive or UI.CriticalityType/Negative. Use Determining=true to mark the action as determining (optional). Place the annotation in the appropriate metadata file (e.g., annotations.xml) for your Fiori elements app. This renders a semantic button (green for Positive, red for Negative).

**LANGUAGE**: XML

**CODE**:
```xml
<Record Type="UI.DataFieldForAction">
    <PropertyValue Property="Determining" Bool="true"/>
    <PropertyValue Property="Label" String="Positive (Dummy)"/>
    <PropertyValue Property="Action" String="com.c_salesordermanage_sd_aggregate.DummyBoundAction"/>
    <PropertyValue Property="Criticality" EnumMember="UI.CriticalityType/Positive"/>
</Record>
```

**STEP**: 2 — ABAP CDS Annotation: DataFieldForAction with Criticality (CDS)

**DESCRIPTION**: Use ABAP CDS UI annotations to mark an action as type #FOR_ACTION. Provide a label and the dataAction identifier. Criticality in ABAP CDS is indicated by the action semantics; include this as part of the UI annotations in your CDS view where applicable.

**LANGUAGE**: ABAP CDS

**CODE**:
```
@UI.<lineItem/fieldGroup>: [
  {
    label: 'Positive (Dummy)',
    dataAction: 'PUSHDOWN:com.c_salesordermanage_sd_aggregate.DummyBoundAction',
    type: #FOR_ACTION
  }
]
```

**STEP**: 3 — CAP CDS (JSON) Annotation: DataFieldForAction with Criticality

**DESCRIPTION**: For CAP (Core Data Services) annotations in JSON format, define a UI.DataFieldForAction object, set Determining and Criticality (#Positive or #Negative), and specify the Action string. Add this JSON snippet into the UI annotation file or service metadata where CAP annotations are consumed.

**LANGUAGE**: JSON

**CODE**:
```
{
    $Type : 'UI.DataFieldForAction',
    Determining : true,
    Label : 'Positive (Dummy)',
    Action : 'com.c_salesordermanage_sd_aggregate.DummyBoundAction',
    Criticality : #Positive
}
```

**STEP**: 4 — Supported Criticality Values (Use these exact enum members or numeric equivalents)

**DESCRIPTION**: Use one of the two supported Criticality values when annotating UI.DataFieldForAction. You can use the enum member or numeric equivalents where applicable.

**LANGUAGE**: text

**CODE**:
```
UI.CriticalityType/Positive   (or numeric value 3)  => Positive / Green (Completed/Available/On Track/Acceptable)
UI.CriticalityType/Negative   (or numeric value 1)  => Negative / Red (Attention/Overload/Alert)
```

**STEP**: 5 — Rules, Contexts, and Constraints

**DESCRIPTION**: Follow these rules when using Criticality for actions. Place critical actions only where supported. Be aware of primary-action exclusivity and OData V4 header constraints.

**LANGUAGE**: text

**CODE**:
```
- Criticality is supported only for UI.DataFieldForAction.
- Supported UI locations: table row inline actions, object page header actions, object page footer actions.
- When an action is marked as critical (semantic), previously emphasized buttons (SAVE, EDIT, APPLY) are no longer emphasized.
- Emphasized buttons and semantic (critical) buttons cannot appear together as primary actions on the same page. Only one primary action is allowed (either emphasized or semantic).
- In SAP Fiori elements for OData V4, an object page header allows a critical action only as the left-most action.
- Add annotations to the metadata/annotation files appropriate for your application type (annotations.xml for XML, CDS view for ABAP CDS, or annotation JSON for CAP).
```

**STEP**: 6 — Visual Reference

**DESCRIPTION**: The platform will render semantic action buttons with visual cues (green/red). Use the provided image reference for design verification.

**LANGUAGE**: text

**CODE**:
```
Image reference: images/Criticality_for_Actions_e60c298.png
```

fiori-elements-framework annotations UI.DataFieldForAction criticality SAP CDS ABAP CAP XML ODataV4


**TITLE**: Setting the Default Column Width in SAP Fiori Elements

**INTRODUCTION**: This document explains how to control and override the automatically calculated default column width in SAP Fiori elements tables. It covers: built-in default sizes for common controls, constraints of the automatic algorithm, using the com.sap.vocabularies.HTML5.v1.CssDefaults annotation in XML and CAP CDS, configuring widths in manifest.json, and enabling inclusion of column headers in width calculation.

**TAGS**: fiori-elements-framework, annotations, com.sap.vocabularies.HTML5.v1.CssDefaults, manifest.json, CAP CDS, XML, UI.LineItem, column-width, table-settings

**STEP**: 1 — Default width behavior and limits

**DESCRIPTION**: Understand the automatic width calculation algorithm and limits. The framework computes default column widths using metadata (type, label, referenced properties, text arrangement). You can improve the algorithm by providing precise maxLength for String or Precision for numeric types. The calculated width is clamped to a lower limit of 3rem and an upper limit of 20rem.

Default widths for controls/UI elements:
- Images: 5 rem
- Rating indicator: 6.875 rem
- Progress indicator: 6.875 rem
- Charts: 20 rem

Use em, rem or % (percentage relative to table width) when specifying widths. On mobile phones the table column widths are adjusted automatically to use the available width.

**LANGUAGE**: text

**CODE**:
```text
Lower limit: 3rem
Upper limit: 20rem

Default widths:
- Images: 5 rem
- Rating indicator: 6.875 rem
- Progress indicator: 6.875 rem
- Charts: 20 rem
```

**STEP**: 2 — Set column width using Html5.CssDefaults annotation (XML)

**DESCRIPTION**: Apply com.sap.vocabularies.HTML5.v1.CssDefaults to individual LineItem fields in XML annotations to set a specific width for a column. Use units em, rem, or %.

**LANGUAGE**: XML

**CODE**:
```xml
<Annotation Term="UI.LineItem">
    <Collection>
        <Record Type="UI.DataFieldWithIntentBasedNavigation">
            <PropertyValue Property="SemanticObject" String="EPMSalesOrder" />
            <PropertyValue Property="Action" String="display_sttabupa" />
            <PropertyValue Property="Value" Path="bp_id" />
                <Annotation Term="com.sap.vocabularies.HTML5.v1.CssDefaults">
                    <Record>
                        <PropertyValue Property="width" String="10rem"/>
                    </Record>
                </Annotation>
        </Record>
        <Record Type="UI.DataField">
            <PropertyValue Property="Value" Path="currency_code" />
                <Annotation Term="com.sap.vocabularies.HTML5.v1.CssDefaults">
                    <Record>
                        <PropertyValue Property="width" String="15rem"/>
                    </Record>
                </Annotation>
        </Record>
    </Collection>
</Annotation>
```

**STEP**: 3 — Set column width using Html5.CssDefaults in CAP CDS

**DESCRIPTION**: In CAP (CDS) model annotations, use the ![@HTML5.CssDefaults] inline annotation to specify width for LineItem entries. The snippet below shows two line items with widths set to 10rem and 15rem respectively.

**LANGUAGE**: CDS

**CODE**:
```
LineItem : {
	{
		$Type : 'UI.DataFieldForIntentBasedNavigation',
		SemanticObject : 'EPMSalesOrder',
		Action : 'display_sttabupa',
		Value: 'bp_id',
		Label : 'IBN',
		![@HTML5.CssDefaults] : {width : '10rem'}
	},
	{
		$Type : 'UI.DataField',
		Value : currency_code,
		![@HTML5.CssDefaults] : {width : '15rem'}
	},
}
```

**STEP**: 4 — Configure column width in manifest.json (controlConfiguration)

**DESCRIPTION**: Set column width via manifest.json using controlConfiguration for the Generic Table control. Use the column key to identify the specific column (example key: "DataField::SalesOrderItemCategory"). Width accepts values such as "10em", "15rem", or percentages.

**LANGUAGE**: JSON

**CODE**:
```json
"controlConfiguration": {
    "_Item/@com.sap.vocabularies.UI.v1.LineItem": {
        "columns": {
            "DataField::SalesOrderItemCategory": {
                "width": "10em"
		    }
        }
    }
}
```

**STEP**: 5 — Include column label in width calculation (manifest.json tableSettings)

**DESCRIPTION**: When you want the default width calculation to include the column header label, enable widthIncludingColumnHeader in table settings. You can enable it globally under settings.tableSettings, and also enable it per-column using the column's fully qualified key.

**LANGUAGE**: JSON

**CODE**:
```json
"settings": {
    "tableSettings": {
        "multiEdit": {
            "enabled": true
        },
        "widthIncludingColumnHeader": true
    },
    "columns": {
        "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation::bp_id": {
            "widthIncludingColumnHeader": true
        },
        "com.sap.vocabularies.UI.v1.DataField::gross_amount" : {
            "widthIncludingColumnHeader": true
        }
    }
}
```

**STEP**: 6 — Practical considerations and related resources

**DESCRIPTION**: Best practices and references:
- On mobile devices, table columns are auto-adjusted to fill available width.
- Use precise metadata (maxLength for String, Precision for numeric) to improve automatic sizing.
- Units supported: em, rem, % (relative to table width).
- For finding the correct column key to use in manifest.json controlConfiguration or settings, see "Finding the Right Key for the Anchor".
- For custom columns and extension points, see "Extension Points for Tables".

**LANGUAGE**: text

**CODE**:
```text
Notes:
- Mobile: columns auto-adjust to occupy the full available width.
- Units: em, rem, %
- Improve algorithm accuracy by providing maxLength (String) or Precision (numeric).
- Column key example: "DataField::SalesOrderItemCategory"
Related docs:
- Finding the Right Key for the Anchor (finding-the-right-key-for-the-anchor-6ffb084.md)
- Extension Points for Tables (extension-points-for-tables-d525522.md)
Image reference: images/Custom_Column_Width_5538367.png
```