** TEAM FPM ** – Using FPM Applications on an iPad
WebDynpro and FPM are designed for the creation of desktop applications. Nevertheless it was always technically possible to run FPM based applications on a tablet or even on a smartphone. But as there are a lot of limitations this wasn’t supported by SAP. This has changed now. With note 1853087 SAP offers “conditional” support for running WebDynpro/FPM in Safari on iPad.
0. Creating an Adaptation Schema
- Call Transaction SM34
- Enter FPM_VC_ADAPT_SCHEMA as View Cluster and press ‘Maintain’
- Add a new Schemata entry (name is arbitrary e.g. ZDEVICE)
- Mark the new entry and select in and then select Dimensions in the left-Hand tree
- Add 1 Dimension (Name DEVICE, Index 1 and Data element FPM_DEVICE_TYPE)
- Don’t forget to save everything
1. Enable CBA
- Call up the FPM Workbench via Transaction FPM_WB. When launched from SAPGui the FPM Workbench will open up in a stand-alone browser window.
- Click on the Link Enable FPM Applications for Context-Based Adaptations in the section Context Based Adaptations.
- This will bring up the CBA Enabler. On the first step you have to enter the application configuration name of the application you want to convert (FPM_DEMO_PLAYER), the adaptation schema you want to use (use the one created in Step 0 or if skipped use FPM_DEVICE) and 2 names for 2 to be created objects (the adapted application and the adapted application configuration) . These names are arbitrary, however I recommend to use the same for both objects e.g. ZDEMO_PLAYER. Then press Next.
- On the 2nd step of the CBA Enabler you have the option to assign a package or a transport request. You can simply press Save without changing any data here. Now the application is prepared for being adapted and you see a very simple screen with 2 links.
Before adapting our application let me explain what has happened after pressing Save:
We didn’t really convert the existing application FPM_DEMO_PLAYER. Instead we wrapped the existing application into a new one (ZDEMO_PLAYER). This new one embeds the original functionality (this is no copy it’s still the original application) and adds the necessary adaptation capabilities. So if you would start now the new application (via the link Execute Application) it would still look the same as before.
Now let’s start the Configuration Editor (by pressing the link Launch Configuration Editor) to make the adaptations for the iPad.
2. Adapting the UI
After pressing Launch Configuration Editor you will be directly brought to the FPM configuration editor (“FLUID”). In case you closed the CBA enabler you can launch it via SE80. Go to your local objects and select the new FPM application configuration ZDEMO_PLAYER there and then press Start Configurator or F7. The Configurator will start in the browser. Enter in display mode and navigate to the floorplan configuration by pressing the Link FPM_DEMO_PLAYER_OIF.
In the toolbar you see 3 icon buttons allowing to show additional editor views.
Press the left one to open up the adaptation panel. The Configuration Editor should look now more or less like this:
To create a new adaptation for the iPad press the Add Button in the header of the adaptation panel. You will get now a popup. There you should uncheck the Checkbox Applies to all values, enter TABLET as Device Type and Z as Namespace.
After pressing OK the system creates an adaptation specific for tablets for you. You can now adjust the configuration using the whole set of functionality the FPM configuration editor offers. Feel free to do any changes you think suitable.
In the end the application might look like this on the tablet:
What did I do to get this result:
I removed the tennis player mainview completely, then I created a new mainview for the Detail UIBB and moved the form UIBB there.
I removed the Edit and Check button from the toolbar.
To remove the list and form title I created additional adaptations for the list configuration FPM_DEMO_PLAYER_LIST_FOOTBALL and the form configuration FPM_DEMO_PLAYER_FORM_FOOTBALL. This works the same way as for the floorplan configuration.
All these changes were done completely within the FPM configuration editor, without the need to modify any SAP delivered object. And you will only see these changes when running the application on a tablet. If you launch it from your desktop PC you will still get the unchanged application.
WebDynpro and FPM weren’t designed for use on mobile devices and if you want to have apps with optimal mobile user experience you should not use FPM to create them. Nevertheless for existing applications this approach offers a way to use them on a mobile device as well. There are several advantages:
- The desktop application isn’t touched at all
- The adaptation for mobile only consists of the changes to the original application. So bug-fixes or functional enhancements will still be applied to the “mobile application” as well
- Although you have a rather different UI the application is still the same and the business logic isn’t changed at all
- The effort for such adaptations is low