Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
parser: v2
author_name: Jose Luis Phillips
author_profile: https://github.com/I545182
time: 15
tags: [ tutorial>beginner, software-product>sap-service-and-asset-manager ]
primary_tag: software-product>sap-service-and-asset-manager
---

# Create Entity via MAIF Config Panel (No Code)
Create an Entity supporting input or configured data filters via the MAIF Config Panel (no code required).

## Prerequisites
- Access to the MAIF Config Panel transaction **/SYCLO/CONFIGPANEL**
- Note [3634246](https://me.sap.com/notes/3634246)

## You will learn
- How to create an Entity via the MAIF Config Panel using the MAIF Low Code Handler

## Intro
In this mission you will add an Entity to your SAP Service and Asset Manager service via the MAIF Config Panel using the MAIF Low Code Handler.

**Features**

1. Use up to 5 input filters in online requests.
Sample URI: **/sap/opu/odata/MERP/SAP_ONLINE_LOOKUP_EXT_<#>/ZFlights?$filter=FlightNumber eq '0790' and Date ge datetime'2024-07-11T00:00:00'**

2. Define up to 5 oMDO Data Filters.

**Use Case**

1. Offline: Expose configuration data or small data sets designed to be used with data filters only requiring periodic refresh (no exchange).

2. Online: Expose data designed to be used with input filters (data filters optional).

**Limitations**

The Low Code Handler inherits from the Basic Handler which supports the Basic Process Flow only.

1. Does not support: Exchange, Delta Calculation, or Paging

---

### Create oMDO - Specify Database Tables

The database tables are stored as a filter of the oMDO.

1. Execute transaction **/SYCLO/CONFIGPANEL** from the SAP GUI to open the MAIF Config Panel. Select **oData Mobile Data Object Configuration**. Click **Create** and enter the fields below.

![Create oMDO](create_omdo.png)

| Field Name | Value |
| :--------- | ----- |
| oMDO Id | **`ZSAM<#>_FLIGHT`** |
| Mobile Application | **`SAP Service and Asset Manager <#>`** |
| Description | **`Flight`** |
| oMDO Handler | **`/MFND/CL_CORE_LOW_CODE_OD : oMDO Handler - Low Code`** |
| Process Flow | **`Basic Flow without Key List`** |
| Enable Client State Tracking | enabled |
| Enable Periodic Refresh | enabled |
| Refresh Frequency| **`720`** |
| Optimal Client State Reuse| enabled |
| Support Delta Sync | enabled |

2. Select the **Data Filter** tab. Expand **Operation - Initialization** > **Standard Filter** > **DEFINE_ENTITY_TYPES**. Click **Create** and enter the fields below, then click **Save**.

![Add Data Filter](add_data_filter.png)

| Field Name | Value |
| :--------- | ----- |
| Object Name | **`SFLIGHT`** |


### Create Entity

**NOTE**: An offline entity must be assigned to a Feature (see [Create Feature via MAIF Config Panel](https://developers.sap.com/tutorials/mob-app-mao-erp-add-feature.html)).

1. Click **ConfigPanel Home**. Select **oData Model Configuration**. Click **Create** and enter fields below.

![Create Entity](create_entity.png)

[OPTION BEGIN [Online]]

| Field Name | Value |
| :--------- | ----- |
| Entity Type Name | **`ZFlight`** |
| Mobile Application | **`SAP Service and Asset Manager <#>`** |
| oData Service Id | **`/MERP/SAP_ONLINE_LOOKUP_EXT_<#>`** |
| oMDO Id | **`ZSAM<#>_FLIGHT`** |
| oMDO Entity Type | **`SFLIGHT : SFLIGHT`** |
| Entityset Name | **`ZFlights`** |
| Active | **`Yes`** |

[OPTION END]

[OPTION BEGIN [Offline]]

| Field Name | Value |
| :--------- | ----- |
| Entity Type Name | **`ZFlight`** |
| Mobile Application | **`SAP Service and Asset Manager <#>`** |
| oData Service Id | **`/MERP/SAP_SRV_ASSET_MANAGER_<#>`** |
| oMDO Id | **`ZSAM<#>_FLIGHT`** |
| oMDO Entity Type | **`SFLIGHT : SFLIGHT`** |
| Entityset Name | **`ZFlights`** |
| Active | **`By Feature`** |
| App. Feature Id | **`ZFLIGHT`** |

[OPTION END]



2. Select **Property List** tab. Click **Propose Properties**. Click **Select All**. Deselect **Client** property. Enable **Key** for **Airline**, **FlightNumber**, and **Date** properties. Click **Accept**. Click **Save**.

![Add Properties](add_properties.png)


### Test from Gateway Client - Input Filters

1. Execute transaction **/IWFND/GW_CLIENT** from the SAP GUI to open the Gateway Client. Open **Metadata** menu option, select **Cleanup Cache**. Enter the fields below then execute the request.

![Gateway Response](gateway_response.png)

| Field Name | Value |
| :--------- | ----- |
| Request URI | **`/sap/opu/odata/MERP/SAP_ONLINE_LOOKUP_EXT_<#>/ZFlights`** |

2. Test input filter. Enter the fields below then execute the request.

![Gateway Response Filtered](gateway_response_filtered.png)

| Field Name | Value |
| :--------- | ----- |
| Request URI | **`/sap/opu/odata/MERP/SAP_ONLINE_LOOKUP_EXT_<#>/ZFlights?$filter=FlightNumber eq '0790' and Date ge datetime'2024-07-11T00:00:00'`** |


### Add Data Filter

1. Execute transaction **/SYCLO/CONFIGPANEL** from the SAP GUI to open the MAIF Config Panel. Select **oData Mobile Data Object Configuration**. Select oMDO **ZSAM<#>_FLIGHT**. Select **Data Filter** tab. Expand **Operation - Initialization** > **Standard Filter** > **DEFINE_DATA_FILTERS**. Click **Change**. Click **Create** and enter fields below then click **Save**.

![Create Data Filter](create_data_filter.png)

| Field Name | Value |
| :--------- | ----- |
| oMDO Operation | **`READ`** |
| Object Name | **`SFLIGHT`** |
| Field Name | **`CARRID`** |

2. Expand **Operation - READ** > **Standard Filter** > **R_CARRIER**. Click **Change**. Click **Create** and enter fields below then click **Save**.

![Add Airline Filter](add_airline_filter.png)

| Field Name | Value |
| :--------- | ----- |
| Filter Rule Type | **`Static Value in Range Table Format`** |
| Sign | **`Inclusive`** |
| Option | **`=`** |
| Low Value | **`AZ`** |

>**NOTE**: Other Filter Rule Types are also supported.


### Test from Gateway Client - Data Filters

1. Execute transaction **/IWFND/GW_CLIENT** from the SAP GUI to open the Gateway Client. Enter the fields below then execute the request.

![Gateway Response with Data Filter](gateway_response_data_filtered.png)

| Field Name | Value |
| :--------- | ----- |
| Request URI | **`/sap/opu/odata/MERP/SAP_ONLINE_LOOKUP_EXT_<#>/ZFlights`** |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
parser: v2
author_name: Jose Luis Phillips
author_profile: https://github.com/I545182
time: 15
tags: [ tutorial>beginner, software-product>sap-service-and-asset-manager ]
primary_tag: software-product>sap-service-and-asset-manager
---

# Create Feature via MAIF Config Panel
Create, Assign, and Activate a Feature.

## Prerequisites
- Access to the MAIF Config Panel transaction **/SYCLO/CONFIGPANEL**

## You will learn
- How to create, assign, and activate a Feature

## Intro
In this mission you will create a custom feature and assign to a persona in your SAP Service and Asset Manager Service Mobile App Config via the MAIF Config Panel.

**Use Case**

1. Offline Entities must be assigned to a Feature.

---

### Create Feature

1. Execute transaction **/SYCLO/CONFIGPANEL** from the SAP GUI to open the MAIF Config Panel. Select **Mobile Application Configuration**. Select your Mobile App, click **Features** tab, then click **Change**. Click **Add Feature** and enter fields below, then click **Save**.

![Create Feature](create_feature.png)

| Field Name | Value |
| :--------- | ----- |
| App. Feature Id | **`ZFLIGHT`** |
| Active | enabled |
| Feature Desc. | **`This feature enables custom Flight data`** |


### Assign Feature to Persona

1. Click **ConfigPanel Home**. Select **Component Assignments**. Select your mobile app. Filter by the fields below. Click **Change** and enable fields below, then click **Save**.

![Activate Feature](activate_feature.png)

| Field Name | Value |
| :--------- | ----- |
| User Persona | **`MAINTENANCE_TECHNICIAN`** |
| App. Feature Id | **`ZFLIGHT`** |
| In-Scope | enabled |
| Active Flag | enabled |


### Assign oMDO to Feature

This step is required once you have created an oMDO which you would like to use to retrieve data in the offline scenario (see the **Create oMDO** step of [Create an Entity via MAIF Config Panel (No Code)](https://developers.sap.com/tutorials/mob-app-mao-erp-add-entity-no-code.html)).

1. Click **ConfigPanel Home**. Select **Component Assignments**. Select your mobile app. Click **oMDO Assignments**. Filter by the fields below. Click **Change** and enable fields below, then click **Save**.

![Assign oMDO to Feature](omdo_assignment.png)

| Field Name | Value |
| :--------- | ----- |
| App. Feature Id | **`ZFLIGHT`** |
| oMDO Id | **`ZSAM<#>_FLIGHT`** |
| In-Scope | enabled |
| Active Flag | enabled |


### Test from Gateway Client

1. Execute transaction **/IWFND/GW_CLIENT** from the SAP GUI to open the Gateway Client. Enter the fields below then execute the request. You should see feature `ZFLIGHT` in the response. Ensure test user has Maintenance Technician persona assigned.

![UserFeatures Gateway Response](userfeature_response.png)

| Field Name | Value |
| :--------- | ----- |
| Request URI | **`/sap/opu/odata/MERP/SAP_ONLINE_LOOKUP_EXT_<#>/UserFeatures`** |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading