**TITLE**: Filter Bar with Parameterized Entity Set

**INTRODUCTION**: Parameterized entity sets use parameters to dynamically transform data at runtime, enabling consistent processing of values with different units of measure. For example, a 'Currency' parameter can automatically convert sales amounts stored in various currencies into a single target currency when data is fetched, allowing proper aggregation without altering the original back-end data. When linked to a parameterized entity set, the filter bar automatically adds fields for required parameters.

**TAGS**: filter bar, parameterized, parameters, table integration

**STEP**: Define Parameterized Entity

**DESCRIPTION**: For example, the 'CustomerType' in the following sample code represents the main entity set from which further data needs to be fetched. This has a 'Parameters' navigation entity set defined as well.

**LANGUAGE**: XML

**CODE**:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="SAP__common" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_CORE',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Core.V1" Alias="SAP__core" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_MEASURES',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Measures.V1" Alias="SAP__measures" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="SAP__UI" />
	</edmx:Reference>
	<edmx:DataServices>
		<Schema Namespace="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001" Alias="SAP__self">
			<EntityType Name="CustomerParameters">
				<Key>
					<PropertyRef Name="PreferredCurrency" />
				</Key>
				<Property Name="PreferredCurrency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Set"
					Type="Collection(com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerType)"
					Partner="Parameters"
					ContainsTarget="true"
				/>
			</EntityType>
			<EntityType Name="CustomerType">
				<Key>
					<PropertyRef Name="CustomerID" />
				</Key>
				<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="10" />
				<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="80" />
				<Property Name="CityName" Type="Edm.String" Nullable="false" MaxLength="40" />
				<Property Name="TotalSpend" Type="Edm.Decimal" Precision="12" Scale="variable" />
				<Property Name="CurrencyCode" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Parameters"
					Type="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters"
					Nullable="false"
				/>
			</EntityType>
			<EntityType Name="CurrencyVHType">
				<Key>
					<PropertyRef Name="Currency" />
				</Key>
				<Property Name="Currency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<Property Name="Currency_Text" Type="Edm.String" Nullable="false" MaxLength="40" />
			</EntityType>
			<EntityType Name="CityVHType">
				<Key>
					<PropertyRef Name="CityName" />
				</Key>
				<Property Name="CityName" Type="Edm.String" MaxLength="100" Nullable="false" />
			</EntityType>
			<EntityContainer Name="Container">
				<EntitySet Name="Customer" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters">
					<NavigationPropertyBinding Path="Set/Parameters" Target="Customer" />
				</EntitySet>
				<EntitySet Name="CurrencyVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CurrencyVHType" />
				<EntitySet Name="CityVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CityVHType" />
			</EntityContainer>
			<Annotations Target="SAP__self.CityType">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CityType/CityName">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/Currency_Text">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/USDConversionRate">
				<Annotation Term="SAP__common.Label" String="Conversion Rate (USD)" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters/PreferredCurrency">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="Currency" />
						<PropertyValue Property="CollectionPath" String="CurrencyVH" />
						<PropertyValue Property="SearchSupported" Bool="true" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="PreferredCurrency" />
									<PropertyValue Property="ValueListProperty" String="Currency" />
								</Record>
								<Record Type="SAP__common.ValueListParameterDisplayOnly">
									<PropertyValue Property="ValueListProperty" String="Currency_Text" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="Preferred Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters">
				<Annotation Term="SAP__common.ResultContext" />
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="PreferredCurrency" />
						</Record>
					</Collection>
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CustomerID">
				<Annotation Term="SAP__common.Text" Path="CustomerName">
					<Annotation Term="SAP__UI.TextArrangement" EnumMember="SAP__UI.TextArrangementType/TextFirst" />
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CityName">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="City" />
						<PropertyValue Property="CollectionPath" String="CityVH" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="CityName" />
									<PropertyValue Property="ValueListProperty" String="CityName" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/TotalSpend">
				<Annotation Term="SAP__measures.ISOCurrency" Path="CurrencyCode" />
				<Annotation Term="SAP__common.Label" String="Total Spend" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CurrencyCode">
				<Annotation Term="SAP__common.IsCurrency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType">
				<Annotation Term="SAP__common.Label" String="Customer List" />
				<Annotation Term="SAP__UI.HeaderInfo">
					<Record>
						<PropertyValue Property="TypeName" String="Customer" />
						<PropertyValue Property="TypeNamePlural" String="Customers" />
						<PropertyValue Property="Title">
							<Record Type="SAP__UI.DataField">
								<PropertyValue Property="Value" Path="CustomerID" />
							</Record>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Label" String="Customer" />
							<PropertyValue Property="Value" Path="CustomerID" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="CityName" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="TotalSpend" />
						</Record>
					</Collection>
				</Annotation>
				<Annotation Term="SAP__UI.SelectionFields">
					<Collection>
						<PropertyPath>CityName</PropertyPath>
					</Collection>
				</Annotation>
			</Annotations>
		</Schema>
	</edmx:DataServices>
</edmx:Edmx>
```

**STEP**: Define Parameter Entity

**DESCRIPTION**: In the 'CustomerParameters' entity type, you can now find the parameters that need to be supplied with values to access the data from the main parameterized entity set. Note that the 'Partner' term points to 'Parameters' here, which was also the navigation entity set pointing to this 'CustomerParameter' in the main entity type.

**LANGUAGE**: XML

**CODE**:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="SAP__common" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_CORE',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Core.V1" Alias="SAP__core" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_MEASURES',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Measures.V1" Alias="SAP__measures" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="SAP__UI" />
	</edmx:Reference>
	<edmx:DataServices>
		<Schema Namespace="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001" Alias="SAP__self">
			<EntityType Name="CustomerParameters">
				<Key>
					<PropertyRef Name="PreferredCurrency" />
				</Key>
				<Property Name="PreferredCurrency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Set"
					Type="Collection(com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerType)"
					Partner="Parameters"
					ContainsTarget="true"
				/>
			</EntityType>
			<EntityType Name="CustomerType">
				<Key>
					<PropertyRef Name="CustomerID" />
				</Key>
				<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="10" />
				<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="80" />
				<Property Name="CityName" Type="Edm.String" Nullable="false" MaxLength="40" />
				<Property Name="TotalSpend" Type="Edm.Decimal" Precision="12" Scale="variable" />
				<Property Name="CurrencyCode" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Parameters"
					Type="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters"
					Nullable="false"
				/>
			</EntityType>
			<EntityType Name="CurrencyVHType">
				<Key>
					<PropertyRef Name="Currency" />
				</Key>
				<Property Name="Currency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<Property Name="Currency_Text" Type="Edm.String" Nullable="false" MaxLength="40" />
			</EntityType>
			<EntityType Name="CityVHType">
				<Key>
					<PropertyRef Name="CityName" />
				</Key>
				<Property Name="CityName" Type="Edm.String" MaxLength="100" Nullable="false" />
			</EntityType>
			<EntityContainer Name="Container">
				<EntitySet Name="Customer" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters">
					<NavigationPropertyBinding Path="Set/Parameters" Target="Customer" />
				</EntitySet>
				<EntitySet Name="CurrencyVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CurrencyVHType" />
				<EntitySet Name="CityVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CityVHType" />
			</EntityContainer>
			<Annotations Target="SAP__self.CityType">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CityType/CityName">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/Currency_Text">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/USDConversionRate">
				<Annotation Term="SAP__common.Label" String="Conversion Rate (USD)" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters/PreferredCurrency">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="Currency" />
						<PropertyValue Property="CollectionPath" String="CurrencyVH" />
						<PropertyValue Property="SearchSupported" Bool="true" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="PreferredCurrency" />
									<PropertyValue Property="ValueListProperty" String="Currency" />
								</Record>
								<Record Type="SAP__common.ValueListParameterDisplayOnly">
									<PropertyValue Property="ValueListProperty" String="Currency_Text" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="Preferred Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters">
				<Annotation Term="SAP__common.ResultContext" />
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="PreferredCurrency" />
						</Record>
					</Collection>
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CustomerID">
				<Annotation Term="SAP__common.Text" Path="CustomerName">
					<Annotation Term="SAP__UI.TextArrangement" EnumMember="SAP__UI.TextArrangementType/TextFirst" />
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CityName">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="City" />
						<PropertyValue Property="CollectionPath" String="CityVH" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="CityName" />
									<PropertyValue Property="ValueListProperty" String="CityName" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/TotalSpend">
				<Annotation Term="SAP__measures.ISOCurrency" Path="CurrencyCode" />
				<Annotation Term="SAP__common.Label" String="Total Spend" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CurrencyCode">
				<Annotation Term="SAP__common.IsCurrency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType">
				<Annotation Term="SAP__common.Label" String="Customer List" />
				<Annotation Term="SAP__UI.HeaderInfo">
					<Record>
						<PropertyValue Property="TypeName" String="Customer" />
						<PropertyValue Property="TypeNamePlural" String="Customers" />
						<PropertyValue Property="Title">
							<Record Type="SAP__UI.DataField">
								<PropertyValue Property="Value" Path="CustomerID" />
							</Record>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Label" String="Customer" />
							<PropertyValue Property="Value" Path="CustomerID" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="CityName" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="TotalSpend" />
						</Record>
					</Collection>
				</Annotation>
				<Annotation Term="SAP__UI.SelectionFields">
					<Collection>
						<PropertyPath>CityName</PropertyPath>
					</Collection>
				</Annotation>
			</Annotations>
		</Schema>
	</edmx:DataServices>
</edmx:Edmx>
```

**STEP**: Annotate Parameter Entity with ResultContext

**DESCRIPTION**: Furthermore, the parameter entity type is annotated with the 'ResultContext' annotation, indicating that the parent entity set (in our example 'CustomerType') is a parameterized entity set.

**LANGUAGE**: XML

**CODE**:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="SAP__common" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_CORE',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Core.V1" Alias="SAP__core" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_MEASURES',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Measures.V1" Alias="SAP__measures" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="SAP__UI" />
	</edmx:Reference>
	<edmx:DataServices>
		<Schema Namespace="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001" Alias="SAP__self">
			<EntityType Name="CustomerParameters">
				<Key>
					<PropertyRef Name="PreferredCurrency" />
				</Key>
				<Property Name="PreferredCurrency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Set"
					Type="Collection(com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerType)"
					Partner="Parameters"
					ContainsTarget="true"
				/>
			</EntityType>
			<EntityType Name="CustomerType">
				<Key>
					<PropertyRef Name="CustomerID" />
				</Key>
				<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="10" />
				<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="80" />
				<Property Name="CityName" Type="Edm.String" Nullable="false" MaxLength="40" />
				<Property Name="TotalSpend" Type="Edm.Decimal" Precision="12" Scale="variable" />
				<Property Name="CurrencyCode" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Parameters"
					Type="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters"
					Nullable="false"
				/>
			</EntityType>
			<EntityType Name="CurrencyVHType">
				<Key>
					<PropertyRef Name="Currency" />
				</Key>
				<Property Name="Currency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<Property Name="Currency_Text" Type="Edm.String" Nullable="false" MaxLength="40" />
			</EntityType>
			<EntityType Name="CityVHType">
				<Key>
					<PropertyRef Name="CityName" />
				</Key>
				<Property Name="CityName" Type="Edm.String" MaxLength="100" Nullable="false" />
			</EntityType>
			<EntityContainer Name="Container">
				<EntitySet Name="Customer" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters">
					<NavigationPropertyBinding Path="Set/Parameters" Target="Customer" />
				</EntitySet>
				<EntitySet Name="CurrencyVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CurrencyVHType" />
				<EntitySet Name="CityVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CityVHType" />
			</EntityContainer>
			<Annotations Target="SAP__self.CityType">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CityType/CityName">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/Currency_Text">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/USDConversionRate">
				<Annotation Term="SAP__common.Label" String="Conversion Rate (USD)" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters/PreferredCurrency">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="Currency" />
						<PropertyValue Property="CollectionPath" String="CurrencyVH" />
						<PropertyValue Property="SearchSupported" Bool="true" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="PreferredCurrency" />
									<PropertyValue Property="ValueListProperty" String="Currency" />
								</Record>
								<Record Type="SAP__common.ValueListParameterDisplayOnly">
									<PropertyValue Property="ValueListProperty" String="Currency_Text" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="Preferred Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters">
				<Annotation Term="SAP__common.ResultContext" />
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="PreferredCurrency" />
						</Record>
					</Collection>
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CustomerID">
				<Annotation Term="SAP__common.Text" Path="CustomerName">
					<Annotation Term="SAP__UI.TextArrangement" EnumMember="SAP__UI.TextArrangementType/TextFirst" />
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CityName">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="City" />
						<PropertyValue Property="CollectionPath" String="CityVH" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="CityName" />
									<PropertyValue Property="ValueListProperty" String="CityName" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/TotalSpend">
				<Annotation Term="SAP__measures.ISOCurrency" Path="CurrencyCode" />
				<Annotation Term="SAP__common.Label" String="Total Spend" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CurrencyCode">
				<Annotation Term="SAP__common.IsCurrency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType">
				<Annotation Term="SAP__common.Label" String="Customer List" />
				<Annotation Term="SAP__UI.HeaderInfo">
					<Record>
						<PropertyValue Property="TypeName" String="Customer" />
						<PropertyValue Property="TypeNamePlural" String="Customers" />
						<PropertyValue Property="Title">
							<Record Type="SAP__UI.DataField">
								<PropertyValue Property="Value" Path="CustomerID" />
							</Record>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Label" String="Customer" />
							<PropertyValue Property="Value" Path="CustomerID" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="CityName" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="TotalSpend" />
						</Record>
					</Collection>
				</Annotation>
				<Annotation Term="SAP__UI.SelectionFields">
					<Collection>
						<PropertyPath>CityName</PropertyPath>
					</Collection>
				</Annotation>
			</Annotations>
		</Schema>
	</edmx:DataServices>
</edmx:Edmx>
```

**STEP**: Define Entity Set

**DESCRIPTION**: Access the main entity set via the navigation entity set. The 'Customer' entity set corresponds to 'CustomerParameters'.

**LANGUAGE**: XML

**CODE**:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="SAP__common" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_CORE',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Core.V1" Alias="SAP__core" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_MEASURES',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="Org.OData.Measures.V1" Alias="SAP__measures" />
	</edmx:Reference>
	<edmx:Reference
		Uri="/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value"
	>
		<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="SAP__UI" />
	</edmx:Reference>
	<edmx:DataServices>
		<Schema Namespace="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001" Alias="SAP__self">
			<EntityType Name="CustomerParameters">
				<Key>
					<PropertyRef Name="PreferredCurrency" />
				</Key>
				<Property Name="PreferredCurrency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Set"
					Type="Collection(com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerType)"
					Partner="Parameters"
					ContainsTarget="true"
				/>
			</EntityType>
			<EntityType Name="CustomerType">
				<Key>
					<PropertyRef Name="CustomerID" />
				</Key>
				<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="10" />
				<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="80" />
				<Property Name="CityName" Type="Edm.String" Nullable="false" MaxLength="40" />
				<Property Name="TotalSpend" Type="Edm.Decimal" Precision="12" Scale="variable" />
				<Property Name="CurrencyCode" Type="Edm.String" Nullable="false" MaxLength="5" />
				<NavigationProperty
					Name="Parameters"
					Type="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters"
					Nullable="false"
				/>
			</EntityType>
			<EntityType Name="CurrencyVHType">
				<Key>
					<PropertyRef Name="Currency" />
				</Key>
				<Property Name="Currency" Type="Edm.String" Nullable="false" MaxLength="5" />
				<Property Name="Currency_Text" Type="Edm.String" Nullable="false" MaxLength="40" />
			</EntityType>
			<EntityType Name="CityVHType">
				<Key>
					<PropertyRef Name="CityName" />
				</Key>
				<Property Name="CityName" Type="Edm.String" MaxLength="100" Nullable="false" />
			</EntityType>
			<EntityContainer Name="Container">
				<EntitySet Name="Customer" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CustomerParameters">
					<NavigationPropertyBinding Path="Set/Parameters" Target="Customer" />
				</EntitySet>
				<EntitySet Name="CurrencyVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CurrencyVHType" />
				<EntitySet Name="CityVH" EntityType="com.sap.gateway.srvd.zrc_arcustomer_definition.v0001.CityVHType" />
			</EntityContainer>
			<Annotations Target="SAP__self.CityType">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CityType/CityName">
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/Currency_Text">
				<Annotation Term="SAP__common.Label" String="Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CurrencyType/USDConversionRate">
				<Annotation Term="SAP__common.Label" String="Conversion Rate (USD)" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters/PreferredCurrency">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="Currency" />
						<PropertyValue Property="CollectionPath" String="CurrencyVH" />
						<PropertyValue Property="SearchSupported" Bool="true" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="PreferredCurrency" />
									<PropertyValue Property="ValueListProperty" String="Currency" />
								</Record>
								<Record Type="SAP__common.ValueListParameterDisplayOnly">
									<PropertyValue Property="ValueListProperty" String="Currency_Text" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="Preferred Currency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerParameters">
				<Annotation Term="SAP__common.ResultContext" />
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="PreferredCurrency" />
						</Record>
					</Collection>
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CustomerID">
				<Annotation Term="SAP__common.Text" Path="CustomerName">
					<Annotation Term="SAP__UI.TextArrangement" EnumMember="SAP__UI.TextArrangementType/TextFirst" />
				</Annotation>
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CityName">
				<Annotation Term="SAP__core.Computed" />
				<Annotation Term="SAP__common.ValueList">
					<Record>
						<PropertyValue Property="Label" String="City" />
						<PropertyValue Property="CollectionPath" String="CityVH" />
						<PropertyValue Property="Parameters">
							<Collection>
								<Record Type="SAP__common.ValueListParameterInOut">
									<PropertyValue Property="LocalDataProperty" PropertyPath="CityName" />
									<PropertyValue Property="ValueListProperty" String="CityName" />
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__common.Label" String="City" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/TotalSpend">
				<Annotation Term="SAP__measures.ISOCurrency" Path="CurrencyCode" />
				<Annotation Term="SAP__common.Label" String="Total Spend" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType/CurrencyCode">
				<Annotation Term="SAP__common.IsCurrency" />
			</Annotations>
			<Annotations Target="SAP__self.CustomerType">
				<Annotation Term="SAP__common.Label" String="Customer List" />
				<Annotation Term="SAP__UI.HeaderInfo">
					<Record>
						<PropertyValue Property="TypeName" String="Customer" />
						<PropertyValue Property="TypeNamePlural" String="Customers" />
						<PropertyValue Property="Title">
							<Record Type="SAP__UI.DataField">
								<PropertyValue Property="Value" Path="CustomerID" />
							</Record>
						</PropertyValue>
					</Record>
				</Annotation>
				<Annotation Term="SAP__UI.LineItem">
					<Collection>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Label" String="Customer" />
							<PropertyValue Property="Value" Path="CustomerID" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="CityName" />
						</Record>
						<Record Type="SAP__UI.DataField">
							<PropertyValue Property="Value" Path="TotalSpend" />
						</Record>
					</Collection>
				</Annotation>
				<Annotation Term="SAP__UI.SelectionFields">
					<Collection>
						<PropertyPath>CityName</PropertyPath>
					</Collection>
				</Annotation>
			</Annotations>
		</Schema>
	</edmx:DataServices>
</edmx:Edmx>
```

**STEP**: Use Parameterized Entity Set

**DESCRIPTION**: Reference the parameterized entity set in your manifest.json using the 'contextPath' property. This enables the filter bar to detect and use the parameters defined in the entity set, automatically adding fields for required parameters such as 'Preferred Currency'. The table will then display data according to the parameter values specified in the filter bar.

**LANGUAGE**: JSON

**CODE**:
```json
{
	"_version": "1.12.0",
	"sap.app": {
		"id": "sap.fe.core.fpmExplorer.filterBarParameterizedWithTable",
		"type": "application",
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": [""],
			"fallbackLocale": ""
		},
		"applicationVersion": {
			"version": "1.0.0"
		},
		"dataSources": {
			"mainService": {
				"uri": "/sap/fe/core/mock/filterBarParameterizedWithTable/",
				"type": "OData",
				"settings": {
					"annotations": [],
					"odataVersion": "4.0"
				}
			}
		}
	},
	"sap.ui5": {
		"dependencies": {
			"minUI5Version": "1.111.1",
			"libs": {
				"sap.ui.core": {},
				"sap.fe.templates": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleUrl": "i18n/i18n.properties"
				}
			},
			"@i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleUrl": "i18n/i18n.properties"
				}
			},
			"": {
				"dataSource": "mainService",
				"settings": {
					"operationMode": "Server",
					"autoExpandSelect": true,
					"earlyRequests": true
				}
			}
		},
		"routing": {
			"routes": [
				{
					"pattern": ":?query:",
					"name": "default",
					"target": "sample"
				}
			],
			"targets": {
				"sample": {
					"type": "Component",
					"id": "Default",
					"name": "sap.fe.core.fpm",
					"viewLevel": 1,
					"options": {
						"settings": {
							"viewName": "sap/fe/core/fpmExplorer/filterBarParameterizedWithTable/FilterBarParameterizedWithTable",
							"contextPath": "/Customer/Set"
						}
					}
				}
			}
		}
	}
}
```

filter bar
parameterized
parameters
table integration


**TITLE**: FilterBar APIs

**INTRODUCTION**: The FilterBar building block enables you to extend the filter bar using APIs. This includes managing selection variants and controlling the filter field visibility and state.

**TAGS**: filter bar APIs, public APIs, programmatic access

**STEP**: Selection Variant Management

**DESCRIPTION**: You can get and set the selection variant of a filter bar using the APIs provided by the FilterBar building block.

**STEP**: Filter Field Visibility

**DESCRIPTION**: You can show and hide filter fields using the APIs provided by the FilterBar building block.

**STEP**: Filter Field State

**DESCRIPTION**: You can enable and disable filter fields using the APIs provided by the FilterBar building block.

FilterBar APIs

filter bar APIs
public APIs
programmatic access


**TITLE**: Filter Bar with Variant Management and Chart

**INTRODUCTION**: Linking the FilterBar building block to the VariantManagement building block enables you to render a filter bar where users can save and manage different filter configurations. This example shows a chart with a filter bar that allows users to filter the data displayed in the chart.

**TAGS**: filter bar, chart, variant management, integration

**STEP**: Variant Management Configuration

**DESCRIPTION**: Configure the variant management to control both the filter bar and chart by specifying their IDs in the 'for' property. This enables users to save and restore different combinations of filters and chart settings.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros" xmlns:f="sap.f">
	<VBox>
		<macros:VariantManagement
			id="VMWithChart"
			for="FilterBarVM,ChartVM"
			showSetAsDefault="true"
			executeOnSelectionForStandardDefault="true"
			headerLevel="H2"
		/>
		<macros:FilterBar metaPath="@com.sap.vocabularies.UI.v1.SelectionFields#SF1" id="FilterBarVM" />
		<macros:Chart
			id="ChartVM"
			metaPath="/RootEntity/@com.sap.vocabularies.UI.v1.Chart"
			personalization="Sort,Type,Item"
			selectionMode="Multiple"
			filterBar="FilterBarVM"
		/>
	</VBox>
</core:FragmentDefinition>
```

**STEP**: Filter Bar Configuration

**DESCRIPTION**: Create the filter bar with a specific ID that matches the variant management configuration. The filter bar will provide filtering capabilities for the chart.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros" xmlns:f="sap.f">
	<VBox>
		<macros:VariantManagement
			id="VMWithChart"
			for="FilterBarVM,ChartVM"
			showSetAsDefault="true"
			executeOnSelectionForStandardDefault="true"
			headerLevel="H2"
		/>
		<macros:FilterBar metaPath="@com.sap.vocabularies.UI.v1.SelectionFields#SF1" id="FilterBarVM" />
		<macros:Chart
			id="ChartVM"
			metaPath="/RootEntity/@com.sap.vocabularies.UI.v1.Chart"
			personalization="Sort,Type,Item"
			selectionMode="Multiple"
			filterBar="FilterBarVM"
		/>
	</VBox>
</core:FragmentDefinition>
```

**STEP**: Chart Configuration

**DESCRIPTION**: Connect the chart to the filter bar using the 'filterBar' property. The chart will automatically update when filters are applied, and both components will be managed by the same variant management.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros" xmlns:f="sap.f">
	<VBox>
		<macros:VariantManagement
			id="VMWithChart"
			for="FilterBarVM,ChartVM"
			showSetAsDefault="true"
			executeOnSelectionForStandardDefault="true"
			headerLevel="H2"
		/>
		<macros:FilterBar metaPath="@com.sap.vocabularies.UI.v1.SelectionFields#SF1" id="FilterBarVM" />
		<macros:Chart
			id="ChartVM"
			metaPath="/RootEntity/@com.sap.vocabularies.UI.v1.Chart"
			personalization="Sort,Type,Item"
			selectionMode="Multiple"
			filterBar="FilterBarVM"
		/>
	</VBox>
</core:FragmentDefinition>
```

filter bar
chart
variant management
integration


**TITLE**: Form Extensions

**INTRODUCTION**: Form extensions enable you to define custom inline fields and extend your forms.

**TAGS**: form extensions, custom, ReferenceFacet, extensibility

**STEP**: Add Further Properties

**DESCRIPTION**: You can add further properties to your form by using the FormElement macro. The placement and anchor attributes define where the new element will be added.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<macros:Form metaPath="/Travel/@com.sap.vocabularies.UI.v1.FieldGroup#ApprovalData" id="myForm" title="Extended Form">
		<macros:FormElement
			metaPath="Description"
			id="Description"
			label="Added Property Example"
			placement="After"
			anchor="DataField::BookingFee"
		/>
		<macros:FormElement metaPath="EndDate" id="customSlider" placement="Before" label="Slider Example">
			<macros:fields>
				<Slider />
			</macros:fields>
		</macros:FormElement>
	</macros:Form>
</core:FragmentDefinition>
```

**STEP**: Add Custom Form Elements

**DESCRIPTION**: You can also add custom form elements to your form. In this example, a slider is added as a custom field.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<macros:Form metaPath="/Travel/@com.sap.vocabularies.UI.v1.FieldGroup#ApprovalData" id="myForm" title="Extended Form">
		<macros:FormElement
			metaPath="Description"
			id="Description"
			label="Added Property Example"
			placement="After"
			anchor="DataField::BookingFee"
		/>
		<macros:FormElement metaPath="EndDate" id="customSlider" placement="Before" label="Slider Example">
			<macros:fields>
				<Slider />
			</macros:fields>
		</macros:FormElement>
	</macros:Form>
</core:FragmentDefinition>
```

**STEP**: Add Elements through Manifest

**DESCRIPTION**: If you want to add elements to your object page form rendered through UI.Facet annotations, you can use the 'fields' property in the controlConfiguration section of the respective UI.FieldGroup.

**LANGUAGE**: JSON

**CODE**:
```json
{
	"sample": {
		"type": "Component",
		"id": "sample",
		"name": "sap.fe.templates.ObjectPage",
		"options": {
			"settings": {
				"contextPath": "/Travel",
				"controlConfiguration": {
					"@com.sap.vocabularies.UI.v1.FieldGroup#ApprovalData": {
						"fields": {
							"myCustomFormElement": {
								"template": "my.custom.FormElement.fragment.xml",
								"label": "My custom form element"
							}
						}
					}
				}
			}
		}
	}
}
```

Form Extensions

form extensions
custom
ReferenceFacet
extensibility


**TITLE**: Form

**INTRODUCTION**: The Form building block enables you to render a form based on a FieldGroup annotation.

**TAGS**: ReferenceFacet, CollectionFacet, form, FieldGroup

**STEP**: Define UI.FieldGroup Annotation

**DESCRIPTION**: To define the fields of the form, you can use the UI.FieldGroup annotation in your service definition. This annotation allows you to specify which properties should be included in the form.

**LANGUAGE**: CDS

**CODE**:
```cds
using TravelService as service from '../service/service';

annotate service.Travel {
  TravelStatus @Common.ValueListWithFixedValues;
  CurrencyCode @Common.ValueList: {
    CollectionPath: 'Currencies',
    Parameters    : [
      {
        $Type            : 'Common.ValueListParameterInOut',
        LocalDataProperty: CurrencyCode_code,
        ValueListProperty: 'code'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'name'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'descr'
      }
    ]
  };
}

annotate service.Travel with @UI.LineItem: [
  {Value: TravelID},
  {
    $Type : 'UI.DataFieldForAnnotation',
    Target: '@UI.ConnectedFields#TripDates'
  },
  {Value: to_Agency_AgencyID},
  {
    Value             : TravelStatus_code,
    Criticality       : TravelStatus.criticality,
    @UI.Importance    : #High,
    @HTML5.CssDefaults: {width: '10em'}
  },
  {Value: BookingFee},
  {Value: TotalPrice}
];

annotate service.Travel with @(UI: {SelectionFields: [
  TravelID,
  to_Agency_AgencyID,
  TravelStatus_code,
  BeginDate,
  EndDate
]});

annotate service.Travel with @Capabilities.FilterRestrictions.FilterExpressionRestrictions: [
  {
    Property          : 'BeginDate',
    AllowedExpressions: 'SingleRange'
  },
  {
    Property          : 'EndDate',
    AllowedExpressions: 'SingleRange'
  }
];

annotate service.Travel with @(UI: {
  FieldGroup #TravelData    : {Data: [
    {Value: TravelID},
    {Value: to_Agency_AgencyID},
    {Value: BeginDate},
    {Value: EndDate}
  ]},
  FieldGroup #ApprovalData  : {Data: [
    {
      $Type      : 'UI.DataField',
      Value      : TravelStatus_code,
      Criticality: TravelStatus.criticality,
      Label      : 'Status'
    },
    {Value: BookingFee},
    {Value: TotalPrice}
  ]},
  FieldGroup #HeaderMain    : {Data: [
    {Value: BeginDate},
    {Value: EndDate},
    {Value: TotalPrice}
  ]},
  ConnectedFields #TripDates: {
    Label   : 'Business Trip Dates',
    Template: '{BeginDate} / {EndDate}',
    Data    : {
      BeginDate: {
        $Type: 'UI.DataField',
        Value: BeginDate
      },
      EndDate  : {
        $Type: 'UI.DataField',
        Value: EndDate
      }
    }
  },
  Facets                    : [
    {
      $Type : 'UI.ReferenceFacet',
      ID    : 'TravelData',
      Label : 'Travel Information',
      Target: '@UI.FieldGroup#TravelData',
    },
    {
      $Type : 'UI.ReferenceFacet',
      ID    : 'ApprovalData',
      Label : 'Approval Data',
      Target: '@UI.FieldGroup#ApprovalData'
    },
    {
      $Type : 'UI.ReferenceFacet',
      ID    : 'BookingList',
      Label : 'Bookings',
      Target: 'to_Booking/@UI.LineItem'
    }
  ],
  HeaderFacets              : [{
    $Type : 'UI.ReferenceFacet',
    Target: '@UI.FieldGroup#HeaderMain'
  }],
  HeaderInfo                : {
    TypeName      : 'Travel',
    TypeNamePlural: 'Travels',
    Title         : {
      $Type: 'UI.DataField',
      Value: Description
    },
    Description   : {
      $Type: 'UI.DataField',
      Value: TravelID
    },
    TypeImageUrl  : 'sap-icon://header',
  }
});

annotate service.Travel {
  to_Agency @Common.ValueList: {
    CollectionPath: 'TravelAgency',
    Label         : '',
    Parameters    : [
      {
        $Type            : 'Common.ValueListParameterInOut',
        LocalDataProperty: to_Agency_AgencyID,
        ValueListProperty: 'AgencyID'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'Name'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'Street'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'PostalCode'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'City'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'CountryCode_code'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'PhoneNumber'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'EMailAddress'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'WebAddress'
      }
    ]
  };
}

annotate service.TravelAgency with @(UI: {
  DataPoint #Recommendation: {
    Value        : Recommendation,
    TargetValue  : 100.0,
    Title        : 'Recommendation',
    Visualization: #Progress
  },
  DataPoint #Rating        : {
    Value        : Rating,
    TargetValue  : 5.0,
    Title        : 'Rating',
    Visualization: #Rating
  },
  FieldGroup #Contact      : {Data: [{
    $Type : 'UI.DataFieldForAnnotation',
    Target: '@Communication.Contact',
    Label : 'Travel Agency'
  }]}
});

annotate service.TravelAgency with @(
  Communication.Contact : {
    email: [{
      type   : #work,
      address: EMailAddress
    }],
    fn   : Name,
    adr  : [{
      type    : #work,
      code    : PostalCode,
      country : CountryCode_code,
      locality: City
    }]
  },
  Common.IsNaturalPerson: false
);

annotate service.Booking {
  CurrencyCode @Common.ValueList: {
    CollectionPath: 'Currencies',
    Parameters    : [
      {
        $Type            : 'Common.ValueListParameterInOut',
        LocalDataProperty: CurrencyCode_code,
        ValueListProperty: 'code'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'name'
      },
      {
        $Type            : 'Common.ValueListParameterDisplayOnly',
        ValueListProperty: 'descr'
      }
    ]
  };
}

annotate service.Booking with @(UI: {
  HeaderInfo: {
    TypeName      : 'Booking',
    TypeNamePlural: 'Bookings',
    TypeImageUrl  : 'sap-icon://alert',
    Title         : {
      $Type: 'UI.DataField',
      Value: BookingID
    }
  },
  Facets    : [{
    $Type : 'UI.ReferenceFacet',
    ID    : 'FacetIdentifier1',
    Target: '@UI.FieldGroup'
  }],
  LineItem  : [
    {Value: BookingID},
    {Value: BookingDate},
    {Value: ConnectionID},
    {Value: FlightDate},
    {Value: FlightPrice}
  ],
  FieldGroup: {Data: [
    {
      $Type: 'UI.DataField',
      Value: BookingID
    },
    {
      $Type: 'UI.DataField',
      Value: BookingDate
    },
    {
      $Type: 'UI.DataField',
      Value: FlightDate
    },
    {
      $Type: 'UI.DataField',
      Value: FlightPrice
    }
  ]}
});

annotate service.TravelAgency with @(UI: {FieldGroup #Link: {Data: [{
  $Type: 'UI.DataFieldWithUrl',
  Value: Name,
  Url  : WebAddress
}]}});
```

**STEP**: Usage of Form Building Block

**DESCRIPTION**: To use a form, you need to define the metaPath pointing to a UI.FieldGroup annotation. You can also set a tile for the form.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<macros:Form metaPath="/Travel/@com.sap.vocabularies.UI.v1.FieldGroup#ApprovalData" id="myForm" title="Sample Form" />
</core:FragmentDefinition>
```

Form

ReferenceFacet CollectionFacet form FieldGroup


**TITLE**: Form Element

**INTRODUCTION**: The FormElement building block enables you to add a label and visibility control to a field inside a form.

**TAGS**: form element, label, field, input, validation

**STEP**: Implementation

**DESCRIPTION**: To use a form element, you need to define the metaPath of the field you want to display. You can also set a label for the field. If no label is provided, the label will be set automatically based on the metadata.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:f="sap.ui.layout.form" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<VBox>
		<Panel headerText="Label Set Manually">
			<f:Form>
				<f:layout>
					<f:ColumnLayout columnsM="2" columnsL="3" columnsXL="4" labelCellsLarge="12" />
				</f:layout>
				<f:formContainers>
					<f:FormContainer>
						<f:formElements>
							<macros:FormElement metaPath="TravelID" id="formElementIdWithLabel" label="Travel ID number" />
							<macros:FormElement metaPath="Description" id="formElementDescriptionWithLabel" label="Travel description" />
						</f:formElements>
					</f:FormContainer>
				</f:formContainers>
			</f:Form>
		</Panel>
		<Panel headerText="Label Set Automatically">
			<f:Form>
				<f:layout>
					<f:ColumnLayout columnsM="2" columnsL="3" columnsXL="4" labelCellsLarge="12" />
				</f:layout>
				<f:formContainers>
					<f:FormContainer>
						<f:formElements>
							<macros:FormElement metaPath="TravelID" id="formElementId" />
							<macros:FormElement metaPath="Description" id="formElementDescription" />
						</f:formElements>
					</f:FormContainer>
				</f:formContainers>
			</f:Form>
		</Panel>
	</VBox>
</core:FragmentDefinition>
```

Form Element

form element
label
field
input
validation


**TITLE**: Building Blocks Usage

**INTRODUCTION**: You can use the building blocks provided by SAP Fiori elements to create a custom app if none of the floorplans suit your use case. By using the custom page building block, you can build a custom app that still runs on the SAP Fiori elements framework, but where all pages are treated as custom pages. When creating a new app, we recommend that you use the SAP Fiori tools - Application Generator and then choose the 'Custom Page' template. You can even include the SAP Fiori elements building blocks into an existing SAPUI5 freestyle application – to do so, make the changes described on this page.

**TAGS**: extend sap.fe.PageController, extend sap.fe.AppComponent, wrap FPM component, handling edit mode, metaPath, contextPath, navigation, sap.fe.macros

**STEP**: Extending the sap.fe.AppComponent

**DESCRIPTION**: Change your Component.js file to extend the SAP Fiori elements AppComponent instead of the SAPUI5 Core Component. This ensures your app runs within the SAP Fiori elements framework.

**LANGUAGE**: TypeScript

**CODE**:
```typescript
sap.ui.define(["sap/fe/core/AppComponent"], function (AppComponent) {
	"use strict";

	return AppComponent.extend("sap.fe.core.fpmExplorer.guidanceCustomApps.Component", {
		metadata: {
			manifest: "json"
		}
	});
});
```

**STEP**: Adapting Your Manifest

**DESCRIPTION**: In the manifest, wrap each view that uses SAP Fiori elements building blocks into the SAP Fiori development portal component. SAP Fiori elements requires the context path to serve as a pointer to the metadata path.

**LANGUAGE**: JSON

**CODE**:
```json
{
	"_version": "1.12.0",
	"sap.app": {
		"id": "sap.fe.core.fpmExplorer.guidanceCustomApps",
		"type": "application",
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": [""],
			"fallbackLocale": ""
		},
		"applicationVersion": {
			"version": "1.0.0"
		},
		"dataSources": {
			"mainService": {
				"uri": "/sap/fe/core/mock/service/",
				"type": "OData",
				"settings": {
					"annotations": [],
					"odataVersion": "4.0"
				}
			}
		}
	},
	"sap.ui5": {
		"dependencies": {
			"minUI5Version": "1.111.1",
			"libs": {
				"sap.ui.core": {},
				"sap.fe.templates": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"": {
				"dataSource": "mainService",
				"settings": {
					"operationMode": "Server",
					"autoExpandSelect": true,
					"earlyRequests": true
				}
			}
		},
		"routing": {
			"routes": [
				{
					"pattern": ":?query:",
					"name": "default",
					"target": "sample"
				}
			],
			"targets": {
				"sample": {
					"type": "Component",
					"id": "Default",
					"name": "sap.fe.core.fpm",
					"viewLevel": 1,
					"options": {
						"settings": {
							"viewName": "sap.fe.core.fpmExplorer.guidanceCustomApps.BBUsage",
							"contextPath": "/Travel"
						}
					}
				}
			}
		}
	}
}
```

**STEP**: Adding the SAP Fiori Elements Library as a Dependent Library

**DESCRIPTION**: To benefit from performance optimizations, add the SAP Fiori elements library as a dependency.

- For building blocks only: add sap.fe.macros.

- For floorplans: add sap.fe.templates (which includes sap.fe.macros).

**LANGUAGE**: JSON

**CODE**:
```json
{
	"_version": "1.12.0",
	"sap.app": {
		"id": "sap.fe.core.fpmExplorer.guidanceCustomApps",
		"type": "application",
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": [""],
			"fallbackLocale": ""
		},
		"applicationVersion": {
			"version": "1.0.0"
		},
		"dataSources": {
			"mainService": {
				"uri": "/sap/fe/core/mock/service/",
				"type": "OData",
				"settings": {
					"annotations": [],
					"odataVersion": "4.0"
				}
			}
		}
	},
	"sap.ui5": {
		"dependencies": {
			"minUI5Version": "1.111.1",
			"libs": {
				"sap.ui.core": {},
				"sap.fe.templates": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"": {
				"dataSource": "mainService",
				"settings": {
					"operationMode": "Server",
					"autoExpandSelect": true,
					"earlyRequests": true
				}
			}
		},
		"routing": {
			"routes": [
				{
					"pattern": ":?query:",
					"name": "default",
					"target": "sample"
				}
			],
			"targets": {
				"sample": {
					"type": "Component",
					"id": "Default",
					"name": "sap.fe.core.fpm",
					"viewLevel": 1,
					"options": {
						"settings": {
							"viewName": "sap.fe.core.fpmExplorer.guidanceCustomApps.BBUsage",
							"contextPath": "/Travel"
						}
					}
				}
			}
		}
	}
}
```

**STEP**: Extending the sap.fe.PageController

**DESCRIPTION**: Extend the page controller of SAP Fiori elements instead of the SAPUI5 mvc.Controller. Adapt the view controller of your custom page as shown below. Always call the onInit of the PageController when adding your own initialization logic.

**LANGUAGE**: TypeScript

**CODE**:
```typescript
import PageController from "sap/fe/core/PageController";

export default class SamplePageController extends PageController {
	public onInit(): void {
		super.onInit();
	}
}
```

**STEP**: Adding Building Blocks

**DESCRIPTION**: You can now add the building blocks provided by SAP Fiori elements. The example below uses the Table building block by defining the metaPath relative to the contextPath.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<macros:Table metaPath="/Travel/@com.sap.vocabularies.UI.v1.LineItem" />
</core:FragmentDefinition>
```

**STEP**: Accessing the App Component

**DESCRIPTION**: You can’t access your app component from the view controller of your custom view using this.getOwnerComponent() because you've added an additional component to your application tree. You must use this.getAppComponent() instead.

Building Blocks Usage

extend sap.fe.PageController
extend sap.fe.AppComponent
wrap FPM component
handling edit mode
metaPath
contextPath
navigation
sap.fe.macros


**TITLE**: Custom Root View

**INTRODUCTION**: If neither of the standard root views provided by SAP Fiori elements suit your needs, you can create and register a custom root view. The following standard root views are available: NavContainer and Flexible Column Layout.

**TAGS**: sap.fe.core.rootView.NavContainer, sap.fe.core.rootView.Fcl, flexible column layout

**STEP**: Add a NavContainer or FlexibleColumnLayout to Your Custom Root View

**DESCRIPTION**: Ensure your custom root view contains an sap.m.NavContainer (or an sap.f.FlexibleColumnLayout) as the main container for your application content.

**LANGUAGE**: XML

**CODE**:
```xml
<mvc:View
	height="100%"
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns:fpmExplorer="sap.fe.core.fpmExplorer.controls"
	controllerName="sap.fe.core.rootView.NavContainer"
>
	<fpmExplorer:Page
		title="Custom Root View"
		documentation="1175a122737043f7a6ff7ff9d0e9b815"
		introduction="If neither of the standard root views provided by SAP Fiori elements suit your needs, you can create and register a custom root view. The following standard root views are available: NavContainer and Flexible Column Layout."
	>
		<fpmExplorer:sample>
			<VBox>
				<MessageStrip
					type="Information"
					text="The sample shows a list report where the NavContainer control is used in a custom root view."
				/>
				<NavContainer id="ownRootView" autoFocus="false" height="600px" />
			</VBox>
		</fpmExplorer:sample>
		<fpmExplorer:implementation>
			<fpmExplorer:ImplementationStep
				title="Add a NavContainer or FlexibleColumnLayout to Your Custom Root View"
				text="Ensure your custom root view contains an sap.m.NavContainer (or an sap.f.FlexibleColumnLayout) as the main container for your application content."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/OwnRootView.view.xml" codeType="view" start="ownRootView" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Use the Appropriate Controller for Your Custom Root View"
				text="Ensure your custom root view uses the sap.fe.core.rootView.NavContainer controller (or sap.fe.core.rootView.Fcl controller), or a controller extending it. This enables the default SAP Fiori elements features in your custom root view."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink
						file="guidance/guidanceOwnRootView/OwnRootView.view.xml"
						codeType="view"
						start="controllerName"
						fullTag="false"
					/>
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Set the Control ID for the Main Container"
				text="Ensure the ID of the NavContainer (or FlexibleColumnLayout) is set as 'appContent' or is defined in the application manifest under '/sap.ui5/routing/config/controlId'. This allows the router to target the correct container."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/manifest.json" codeType="manifest" start="routing" end="4" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Register the Root View in the Manifest"
				text="Ensure your custom root is defined in the application manifest under '/sap.ui5/rootView/viewName'. This registers your custom root view for the application."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/manifest.json" codeType="manifest" start="rootView" end="4" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>
		</fpmExplorer:implementation>
	</fpmExplorer:Page>
</mvc:View>
```

**STEP**: Use the Appropriate Controller for Your Custom Root View

**DESCRIPTION**: Ensure your custom root view uses the sap.fe.core.rootView.NavContainer controller (or sap.fe.core.rootView.Fcl controller), or a controller extending it. This enables the default SAP Fiori elements features in your custom root view.

**LANGUAGE**: XML

**CODE**:
```xml
<mvc:View
	height="100%"
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns:fpmExplorer="sap.fe.core.fpmExplorer.controls"
	controllerName="sap.fe.core.rootView.NavContainer"
>
	<fpmExplorer:Page
		title="Custom Root View"
		documentation="1175a122737043f7a6ff7ff9d0e9b815"
		introduction="If neither of the standard root views provided by SAP Fiori elements suit your needs, you can create and register a custom root view. The following standard root views are available: NavContainer and Flexible Column Layout."
	>
		<fpmExplorer:sample>
			<VBox>
				<MessageStrip
					type="Information"
					text="The sample shows a list report where the NavContainer control is used in a custom root view."
				/>
				<NavContainer id="ownRootView" autoFocus="false" height="600px" />
			</VBox>
		</fpmExplorer:sample>
		<fpmExplorer:implementation>
			<fpmExplorer:ImplementationStep
				title="Add a NavContainer or FlexibleColumnLayout to Your Custom Root View"
				text="Ensure your custom root view contains an sap.m.NavContainer (or an sap.f.FlexibleColumnLayout) as the main container for your application content."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/OwnRootView.view.xml" codeType="view" start="ownRootView" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Use the Appropriate Controller for Your Custom Root View"
				text="Ensure your custom root view uses the sap.fe.core.rootView.NavContainer controller (or sap.fe.core.rootView.Fcl controller), or a controller extending it. This enables the default SAP Fiori elements features in your custom root view."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink
						file="guidance/guidanceOwnRootView/OwnRootView.view.xml"
						codeType="view"
						start="controllerName"
						fullTag="false"
					/>
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Set the Control ID for the Main Container"
				text="Ensure the ID of the NavContainer (or FlexibleColumnLayout) is set as 'appContent' or is defined in the application manifest under '/sap.ui5/routing/config/controlId'. This allows the router to target the correct container."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/manifest.json" codeType="manifest" start="routing" end="4" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>

			<fpmExplorer:ImplementationStep
				title="Register the Root View in the Manifest"
				text="Ensure your custom root is defined in the application manifest under '/sap.ui5/rootView/viewName'. This registers your custom root view for the application."
			>
				<fpmExplorer:CodeBlock>
					<fpmExplorer:CodeLink file="guidance/guidanceOwnRootView/manifest.json" codeType="manifest" start="rootView" end="4" />
				</fpmExplorer:CodeBlock>
			</fpmExplorer:ImplementationStep>
		</fpmExplorer:implementation>
	</fpmExplorer:Page>
</mvc:View>
```

**STEP**: Set the Control ID for the Main Container

**DESCRIPTION**: Ensure the ID of the NavContainer (or FlexibleColumnLayout) is set as 'appContent' or is defined in the application manifest under '/sap.ui5/routing/config/controlId'. This allows the router to target the correct container.

**LANGUAGE**: JSON

**CODE**:
```json
{
	"_version": "1.12.0",
	"sap.app": {
		"id": "sap.fe.core.fpmExplorer.guidanceOwnRootView",
		"type": "application",
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": [""],
			"fallbackLocale": ""
		},
		"applicationVersion": {
			"version": "1.0.0"
		},
		"dataSources": {
			"mainService": {
				"uri": "/sap/fe/core/mock/service/",
				"type": "OData",
				"settings": {
					"annotations": [],
					"odataVersion": "4.0"
				}
			}
		}
	},
	"sap.ui5": {
		"dependencies": {
			"minUI5Version": "1.111.1",
			"libs": {
				"sap.ui.core": {},
				"sap.fe.templates": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"": {
				"dataSource": "mainService",
				"settings": {
					"operationMode": "Server",
					"autoExpandSelect": true,
					"earlyRequests": true
				}
			}
		},
		"rootView": {
			"viewName": "sap.fe.core.fpmExplorer.guidanceOwnRootView.OwnRootView"
		},
		"routing": {
			"config": {
				"controlId": "ownRootView"
			},
			"routes": [
				{
					"pattern": ":?query:",
					"name": "listPage",
					"target": "listPage"
				},
				{
					"pattern": "/Travel({key}):?query:",
					"name": "objectPage",
					"target": "objectPage"
				}
			],
			"targets": {
				"listPage": {
					"type": "Component",
					"id": "Default",
					"name": "sap.fe.templates.ListReport",
					"options": {
						"settings": {
							"contextPath": "/Travel",
							"variantManagement": "Page",
							"initialLoad": "Enabled",
							"navigation": {
								"Travel": {
									"detail": {
										"route": "objectPage"
									}
								}
							}
						}
					}
				},
				"objectPage": {
					"type": "Component",
					"id": "objectPage",
					"name": "sap.fe.templates.ObjectPage",
					"options": {
						"settings": {
							"contextPath": "/Travel"
						}
					}
				}
			}
		}
	}
}
```

**STEP**: Register the Root View in the Manifest

**DESCRIPTION**: Ensure your custom root is defined in the application manifest under '/sap.ui5/rootView/viewName'. This registers your custom root view for the application.

**LANGUAGE**: JSON

**CODE**:
```json
{
	"_version": "1.12.0",
	"sap.app": {
		"id": "sap.fe.core.fpmExplorer.guidanceOwnRootView",
		"type": "application",
		"i18n": {
			"bundleUrl": "i18n/i18n.properties",
			"supportedLocales": [""],
			"fallbackLocale": ""
		},
		"applicationVersion": {
			"version": "1.0.0"
		},
		"dataSources": {
			"mainService": {
				"uri": "/sap/fe/core/mock/service/",
				"type": "OData",
				"settings": {
					"annotations": [],
					"odataVersion": "4.0"
				}
			}
		}
	},
	"sap.ui5": {
		"dependencies": {
			"minUI5Version": "1.111.1",
			"libs": {
				"sap.ui.core": {},
				"sap.fe.templates": {}
			}
		},
		"contentDensities": {
			"compact": true,
			"cozy": true
		},
		"models": {
			"": {
				"dataSource": "mainService",
				"settings": {
					"operationMode": "Server",
					"autoExpandSelect": true,
					"earlyRequests": true
				}
			}
		},
		"rootView": {
			"viewName": "sap.fe.core.fpmExplorer.guidanceOwnRootView.OwnRootView"
		},
		"routing": {
			"config": {
				"controlId": "ownRootView"
			},
			"routes": [
				{
					"pattern": ":?query:",
					"name": "listPage",
					"target": "listPage"
				},
				{
					"pattern": "/Travel({key}):?query:",
					"name": "objectPage",
					"target": "objectPage"
				}
			],
			"targets": {
				"listPage": {
					"type": "Component",
					"id": "Default",
					"name": "sap.fe.templates.ListReport",
					"options": {
						"settings": {
							"contextPath": "/Travel",
							"variantManagement": "Page",
							"initialLoad": "Enabled",
							"navigation": {
								"Travel": {
									"detail": {
										"route": "objectPage"
									}
								}
							}
						}
					}
				},
				"objectPage": {
					"type": "Component",
					"id": "objectPage",
					"name": "sap.fe.templates.ObjectPage",
					"options": {
						"settings": {
							"contextPath": "/Travel"
						}
					}
				}
			}
		}
	}
}
```

Custom Root View


**TITLE**: KPI Tag

**INTRODUCTION**: The KPITag building block enables you to render the key performance indicator (KPI) tag. It is a clickable control with a KPI value.

**TAGS**: kpi tag, key performance indicator, metrics, dashboard, summary

**STEP**: Implementation

**DESCRIPTION**: For a simple usage, a number, optional a unit, and the status need to be passed to the control.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<FlexBox direction="Column" gap="1rem">
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Success" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="mySuccessKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Success" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Error" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Warning" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Information" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myInformationKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Information" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Showing icon" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPIWithIcon" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" showIcon="true" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Handling press event" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorWithPress" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" press=".onKPIPressed" />
		</FlexBox>
	</FlexBox>
</core:FragmentDefinition>
```

**STEP**: Implementation

**DESCRIPTION**: By setting the showIcon property to true, in addition a status icon is shown.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<FlexBox direction="Column" gap="1rem">
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Success" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="mySuccessKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Success" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Error" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Warning" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Information" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myInformationKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Information" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Showing icon" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPIWithIcon" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" showIcon="true" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Handling press event" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorWithPress" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" press=".onKPIPressed" />
		</FlexBox>
	</FlexBox>
</core:FragmentDefinition>
```

**STEP**: Implementation

**DESCRIPTION**: The press event can be handled by defining an event handler.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<FlexBox direction="Column" gap="1rem">
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Success" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="mySuccessKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Success" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Error" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Warning" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Information" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myInformationKPI" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Information" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Showing icon" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myWarningKPIWithIcon" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Warning" showIcon="true" />
		</FlexBox>
		<FlexBox alignItems="Center" justifyContent="Start">
			<Label text="Handling press event" class="sapUiSmallMarginEnd" />
			<macros:KPITag id="myErrorWithPress" number="{TotalPrice}" unit="{CurrencyCode_code}" status="Error" press=".onKPIPressed" />
		</FlexBox>
	</FlexBox>
</core:FragmentDefinition>
```

**LANGUAGE**: TypeScript

**CODE**:
```typescript
import PageController from "sap/fe/core/PageController";
import type KPITag from "sap/fe/macros/KPITag";
import type Popover from "sap/m/Popover";
import type UI5Event from "sap/ui/base/Event";

export default class MainController extends PageController {
	private myPopover?: Popover;

	public async onKPIPressed(event: UI5Event<{}, KPITag>): Promise<void> {
		if (!this.myPopover) {
			this.myPopover = (await this.getExtensionAPI().loadFragment({
				id: "KPITagPopover",
				name: "sap.fe.core.fpmExplorer.kpiTagDefault.Fragment"
			})) as Popover;
		}

		const kpiTag = event.getSource();

		this.myPopover?.openBy(kpiTag);
		this.myPopover?.setBindingContext(kpiTag.getBindingContext());
	}
}
```

KPI Tag

kpi tag
key performance indicator
metrics
dashboard
summary


**TITLE**: Micro Chart

**INTRODUCTION**: The MicroChart building block enables you to render different types of micro charts.

**TAGS**: chart, micro chart, overview, harvey ball, bullet chart, radial chart, column chart, area chart, line chart, stacked bar chart, comparison chart

**STEP**: Define UI.FieldGroup Annotation

**DESCRIPTION**: To define the micro chart, you can use the UI.Chart annotation in your service definition. This annotation refers to a UI.DataPoint annotation.

**LANGUAGE**: CDS

**CODE**:
```cds
service Service {
  entity RootEntity {
    key ID                  : String(2);
        SalesOrder          : String(10) not null @(
          title: 'Sales Order No.',
          Core.Computed
        );
        _Item               : Composition of many ChildEntity
                                on _Item.Parent = $self;
        _CreditLimitDetails : Association to CreditLimitDetails
                                on _CreditLimitDetails.SalesDocument = SalesOrder;
  }

  entity ChildEntity {
    key ID                    : String(2)           @(
          title        : 'Sales Order Item UUID',
          PersonalData : {IsPotentiallySensitive: true},
          Core.Computed: true
        );
        NetAmount             : Decimal(15, 2)      @(
          Analytics           : {Measure: true},
          Measures.ISOCurrency: TransactionCurrency,
          Core.Immutable      : true
        );
        SalesOrder            : String(10) not null @(
          title: 'Sales Order No.',
          Core.Computed
        );
        SalesOrderItem        : String(1) not null  @(
          title: 'Item',
          Core.Computed
        );
        SalesOrderItemNumber  : Integer;
        TransactionCurrency   : String(5);
        NetAmount_text        : String(10);
        TargetAmount          : Decimal(15, 2)      @(
          UI                  : {ExcludeFromNavigationContext: true},
          Measures.ISOCurrency: TransactionCurrency,
          Core.Immutable      : true,
          Common              : {Label: 'Target Value'}
        );
        Criticality           : Integer;
        ToleranceRangeLow     : Decimal(23, 0);
        ToleranceRangeHigh    : Decimal(23, 0);
        DeviationRangeLow     : Decimal(23, 0);
        DeviationRangeHigh    : Decimal(23, 0);
        AcceptanceRangeLow    : Decimal(23, 0);
        AcceptanceRangeHigh   : Decimal(23, 0);
        RequestedDeliveryDate : Date                @(Common: {Label: 'Delivery Date'});
        Parent                : Association to RootEntity;
  }

  annotate ChildEntity with @(UI: {
    PresentationVariant #ComparisonPath: {
      Visualizations: ['@UI.Chart#ComparisonPath'],
      SortOrder     : [{
        Property  : 'NetAmount',
        Descending: true
      }]
    },
    Chart #ColumnMaxPath               : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Items Column Chart',
      Description      : 'Column MicroChart',
      ChartType        : #Column,
      Measures         : [NetAmount],
      Dimensions       : [SalesOrderItem],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : NetAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#ColumnMaxPath'
      }]
    },
    DataPoint #ColumnMaxPath           : {
      Value                 : NetAmount,
      Title                 : 'Data',
      Description           : 'Column Micro Chart',
      Criticality           : Criticality,
      CriticalityCalculation: {
        ImprovementDirection    : #Maximize,
        DeviationRangeLowValue  : DeviationRangeLow,
        ToleranceRangeLowValue  : ToleranceRangeLow,
        AcceptanceRangeLowValue : AcceptanceRangeLow,
        AcceptanceRangeHighValue: AcceptanceRangeHigh,
        ToleranceRangeHighValue : ToleranceRangeHigh,
        DeviationRangeHighValue : DeviationRangeHigh
      }
    },
    Chart #AreaMaxPath                 : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Items Area Chart',
      Description      : 'Area MicroChart',
      ChartType        : #Area,
      Measures         : [NetAmount],
      Dimensions       : [SalesOrderItemNumber],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : NetAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#AreaMaxPath'
      }]
    },
    DataPoint #AreaMaxPath             : {
      Value                 : NetAmount,
      Title                 : 'Data',
      Description           : 'Area Micro Chart',
      TargetValue           : TargetAmount,
      CriticalityCalculation: {
        ImprovementDirection    : #Target,
        DeviationRangeLowValue  : DeviationRangeLow,
        ToleranceRangeLowValue  : ToleranceRangeLow,
        AcceptanceRangeLowValue : AcceptanceRangeLow,
        AcceptanceRangeHighValue: AcceptanceRangeHigh,
        ToleranceRangeHighValue : ToleranceRangeHigh,
        DeviationRangeHighValue : DeviationRangeHigh
      }
    },
    Chart #LineMaxPath                 : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Items Line Chart',
      Description      : 'Line MicroChart',
      ChartType        : #Line,
      Measures         : [
        NetAmount,
        TargetAmount
      ],
      Dimensions       : [RequestedDeliveryDate],
      MeasureAttributes: [
        {
          $Type    : 'UI.ChartMeasureAttributeType',
          Measure  : NetAmount,
          Role     : #Axis1,
          DataPoint: '@UI.DataPoint#LineValueCriticality'
        },
        {
          $Type    : 'UI.ChartMeasureAttributeType',
          Measure  : TargetAmount,
          Role     : #Axis1,
          DataPoint: '@UI.DataPoint#LineTargetCriticality'
        }
      ]
    },
    DataPoint #LineValueCriticality    : {
      Value      : NetAmount,
      Title      : 'Net Amount',
      Description: 'Net Amount Line',
      Criticality: #Positive
    },
    DataPoint #LineTargetCriticality   : {
      Value      : TargetAmount,
      Title      : 'Target Amount',
      Description: 'Target Amount Line',
      Criticality: #Neutral
    },
    Chart #BarStackedPath              : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Items Stacked Bar Chart',
      Description      : 'Stacked Bar MicroChart',
      ChartType        : #BarStacked,
      Measures         : [NetAmount],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : NetAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#BarStackedPath'
      }]
    },
    DataPoint #BarStackedPath          : {
      Value      : NetAmount,
      Title      : 'Net Amount',
      Criticality: Criticality,
    },
    Chart #RadialChart                 : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'MicroChart',
      ChartType        : #Bullet,
      Measures         : [NetAmount],
      Dimensions       : [SalesOrderItem],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : NetAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#RadialPath'
      }]
    },
    DataPoint #RadialPath              : {
      Value      : NetAmount,
      Title      : 'Net Amount',
      Criticality: Criticality,
    },
    Chart #ComparisonPath              : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Items Comparison Chart',
      Description      : 'Comparison Chart from PV',
      ChartType        : #Bar,
      Measures         : [NetAmount],
      Dimensions       : [SalesOrderItem],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : NetAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#ComparisonPath'
      }]
    },
    DataPoint #ComparisonPath          : {
      Value       : NetAmount,
      Title       : 'Net Amount',
      Criticality : Criticality,
      MaximumValue: 100,
      MinimumValue: -100,
    }
  });

  entity CreditLimitDetails                                 @(title: 'Bullet Chart') {
    key SalesDocument                      : String(10);
        CustomerCreditExposureAmount       : Decimal(23, 2) @(Measures.ISOCurrency: TransactionCurrency, );
        Delivered                          : Boolean        @(title: 'Delivery Status');
        CustomerCreditExposureAmountHidden : Decimal(23, 2) @(
          Measures.ISOCurrency: TransactionCurrency,
          UI.Hidden           : Delivered
        );
        CustomerCreditForecast             : Decimal(23, 2) @(Measures.ISOCurrency: TransactionCurrency, );
        CustomerCreditExposureAmount_text  : String(15);
        CustomerCreditLimitAmount          : Decimal(23, 2) @(Measures.ISOCurrency: TransactionCurrency, );
        MaximumCreditValue                 : Decimal(23, 2);
        CustomerCreditLimitAmount_text     : String(15);
        TransactionCurrency                : String(5);
        CustomerIsAboveThreshold           : Integer;
        ToleranceRangeLow                  : Decimal(23, 2);
        ToleranceRangeHigh                 : Decimal(23, 2);
        DeviationRangeLow                  : Decimal(23, 2);
        DeviationRangeHigh                 : Decimal(23, 2);
        AcceptanceRangeLow                 : Decimal(23, 2);
        AcceptanceRangeHigh                : Decimal(23, 2);
  }

  annotate CreditLimitDetails with @(UI: {
    Chart #CreditLimitChart                : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Credit Limit Bullet',
      Description      : 'Bullet MicroChart',
      ChartType        : #Bullet,
      Measures         : [CustomerCreditExposureAmount],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : CustomerCreditExposureAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#CustomerCreditExposureAmount'
      }]
    },
    DataPoint #CustomerCreditExposureAmount: {
      Value                 : CustomerCreditExposureAmount,
      Title                 : 'Exposure Amount',
      Description           : 'Bullet Micro Chart',
      TargetValue           : CustomerCreditLimitAmount,
      ForecastValue         : CustomerCreditForecast,
      MaximumValue          : 7000,
      MinimumValue          : 200,
      Criticality           : CustomerIsAboveThreshold,
      CriticalityCalculation: {
        ImprovementDirection    : #Maximize,
        DeviationRangeLowValue  : DeviationRangeLow,
        ToleranceRangeLowValue  : ToleranceRangeLow,
        AcceptanceRangeLowValue : AcceptanceRangeLow,
        AcceptanceRangeHighValue: AcceptanceRangeHigh,
        ToleranceRangeHighValue : ToleranceRangeHigh,
        DeviationRangeHighValue : DeviationRangeHigh
      }
    },
    Chart #HarveyBallCriticalityPath       : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Credit Limit HarveyBall',
      Description      : 'HarveyBall MicroChart',
      ChartType        : #Pie,
      Measures         : [CustomerCreditExposureAmount],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : CustomerCreditExposureAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#HarveyBallValuePath'
      }]
    },
    DataPoint #HarveyBallValuePath         : {
      Value       : CustomerCreditExposureAmount,
      MaximumValue: CustomerCreditLimitAmount,
      Criticality : CustomerIsAboveThreshold
    },
    Chart #RadialCriticalityPath           : {
      $Type            : 'UI.ChartDefinitionType',
      Title            : 'Credit Limit Radial',
      Description      : 'Radial MicroChart',
      ChartType        : #Donut,
      Measures         : [CustomerCreditExposureAmount],
      MeasureAttributes: [{
        $Type    : 'UI.ChartMeasureAttributeType',
        Measure  : CustomerCreditExposureAmount,
        Role     : #Axis1,
        DataPoint: '@UI.DataPoint#RadialValuePath'
      }]
    },
    DataPoint #RadialValuePath             : {
      Value      : CustomerCreditExposureAmount,
      TargetValue: CustomerCreditLimitAmount,
      Criticality: CustomerIsAboveThreshold
    }
  });
}
```

**STEP**: Usage of Micro Chart Building Block

**DESCRIPTION**: To use a micro chart, you need to define the metaPath pointing to a UI.Chart annotation.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<VBox class="sapUiMediumMargin">
		<Panel>
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom">
				<HBox binding="{path:'/RootEntity(\'8\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="harveyball"
						metaPath="/RootEntity/_CreditLimitDetails/@com.sap.vocabularies.UI.v1.Chart#HarveyBallCriticalityPath"
						batchGroupId="$auto.abc"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bullet"
						metaPath="_CreditLimitDetails/@com.sap.vocabularies.UI.v1.Chart#CreditLimitChart"
						batchGroupId="$auto.abc"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'4\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="radial"
						metaPath="_CreditLimitDetails/@com.sap.vocabularies.UI.v1.Chart#RadialCriticalityPath"
						batchGroupId="$auto.abc"
					/>
				</HBox>
			</HBox>
		</Panel>
		<Panel>
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'5\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="column"
						metaPath="_Item/@com.sap.vocabularies.UI.v1.Chart#ColumnMaxPath"
						batchGroupId="$auto.abc"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart id="area" metaPath="_Item/@com.sap.vocabularies.UI.v1.Chart#AreaMaxPath" batchGroupId="$auto.def" />
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart id="line" metaPath="_Item/@com.sap.vocabularies.UI.v1.Chart#LineMaxPath" batchGroupId="$auto.def" />
				</HBox>
			</HBox>
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'5\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bar"
						metaPath="_Item/@com.sap.vocabularies.UI.v1.Chart#BarStackedPath"
						batchGroupId="$auto.abc"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'2\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="comparison"
						metaPath="_Item/@com.sap.vocabularies.UI.v1.PresentationVariant#ComparisonPath"
						batchGroupId="$auto.abc"
					/>
				</HBox>
			</HBox>
		</Panel>
	</VBox>
</core:FragmentDefinition>
```

Micro Chart

chart
micro chart
overview
harvey ball
bullet chart
radial chart
column chart
area chart
line chart
stacked bar chart
comparison chart


**TITLE**: Micro Chart Dynamic Size

**INTRODUCTION**: The MicroChart building block enables you to render micro charts in different sizes.

**TAGS**: chart, micro chart, dynamic size, responsive, harvey ball, bullet chart, radial chart, column chart, area chart, line chart, stacked bar chart, comparison chart

**STEP**: Implementation

**DESCRIPTION**: To define the size of the micro chart, you can use the 'size' property of the micro chart building block. Valid sizes are 'XS', 'S', 'M', and 'L'.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<VBox class="sapUiMediumMargin">
		<Panel headerText="Small">
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom">
				<HBox binding="{path:'/RootEntity(\'4\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="harveyball"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#HarveyBallCriticalityPath"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						size="S"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'2\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bullet"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#CreditLimitChart"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						size="S"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'8\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="radial"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#RadialCriticalityPath"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						size="S"
					/>
				</HBox>
			</HBox>
		</Panel>
		<Panel headerText="Medium">
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="column"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#ColumnMaxPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						size="M"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="areastring"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#AreaMaxPathString"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.def"
						size="M"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="line"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#LineMaxPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.def"
						size="M"
					/>
				</HBox>
			</HBox>
		</Panel>
		<Panel headerText="Large">
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'2\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bar"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#BarStackedPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						size="L"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="comparison"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#ComparisonPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						size="L"
					/>
				</HBox>
			</HBox>
		</Panel>
	</VBox>
</core:FragmentDefinition>
```

Micro Chart Dynamic Size

chart
micro chart
dynamic size
responsive
harvey ball
bullet chart
radial chart
column chart
area chart
line chart
stacked bar chart
comparison chart


**TITLE**: Show Only Chart

**INTRODUCTION**: The MicroChart building block enables you to render micro charts without additional information.

**TAGS**: chart, micro chart, show only chart, minimal, harvey ball, bullet chart, radial chart, column chart, area chart, line chart, stacked bar chart, comparison chart

**STEP**: Implementation

**DESCRIPTION**: To show only the chart without additional information, you can set the 'showOnlyChart' property to true in the micro chart building block.

**LANGUAGE**: XML

**CODE**:
```xml
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:macros="sap.fe.macros">
	<VBox class="sapUiMediumMargin">
		<Panel headerText="Default">
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom">
				<HBox binding="{path:'/RootEntity(\'8\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="harveyball"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#HarveyBallCriticalityPath"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						showOnlyChart="false"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bullet"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#CreditLimitChart"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						showOnlyChart="false"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'4\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="radial"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#RadialCriticalityPath"
						contextPath="/RootEntity/_CreditLimitDetails"
						batchGroupId="$auto.abc"
						showOnlyChart="false"
					/>
				</HBox>
			</HBox>
		</Panel>
		<Panel headerText="Show Only Chart">
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'5\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="column"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#ColumnMaxPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						showOnlyChart="true"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="area"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#AreaMaxPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.def"
						showOnlyChart="true"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'1\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="line"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#LineMaxPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.def"
						showOnlyChart="true"
					/>
				</HBox>
			</HBox>
			<HBox justifyContent="SpaceAround" class="sapUiLargeMarginBottom sapUiLargeMarginTop">
				<HBox binding="{path:'/RootEntity(\'5\')'}" class="sapUiTinyMarginEnd">
					<macros:MicroChart
						id="bar"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#BarStackedPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						showOnlyChart="true"
						size="XS"
					/>
				</HBox>
				<HBox binding="{path:'/RootEntity(\'2\')'}" class="sapUiTinyMarginBegin sapUiTinyMarginEnd">
					<macros:MicroChart
						id="comparison"
						metaPath="@com.sap.vocabularies.UI.v1.Chart#ComparisonPath"
						contextPath="/RootEntity/_Item"
						batchGroupId="$auto.abc"
						showOnlyChart="true"
						size="XS"
					/>
				</HBox>
			</HBox>
		</Panel>
	</VBox>
</core:FragmentDefinition>
```

Show Only Chart

chart
micro chart
show only chart
minimal
harvey ball
bullet chart
radial chart
column chart
area chart
line chart
stacked bar chart
comparison chart