Skip to Content
Technical Articles

Using Mobile Transaction Bridge to create a mobile app based on transaction IW41

I work for a Consultancy and am trying to keep up with all of SAP’s recent offering in BTP.

In this blog post, I will take you through the steps I took to create a Mobile Transaction Bridge Recording based on SAPGUI transaction IW41 in an On-Premise system. MTB is part of the Business Technology Platform (BTP), Mobile Services offering. I will also cover some design recommendations and a few current problems that encountered along the way.

MTB is being offered as a Key User Tool to develop mobile apps based on SAPGUI transactions. It covers similar ground to Personas and Slipstream however development uses completely different technology in BTP.

I have many years of Personas/Slipstream experience and was intrigued to learn more about MTB and compare the two options.

Introduction to SAP Mobile Transaction Bridge

SAP Mobile Transaction Bridge functionality contains a Recording (design) and a Run (consume) stage. Creation of an MTB App involves the recording of any SAPGUI transaction, selecting which Fields are Input or Output in a succession of Sequences, then joining these Sequences together using a graphical modelling tool.

Once the App is published, an OData service is generated.

A Mobile App is then created with the Mobile Transaction Bridge Odata Feature linking to the OData Service, and a Mobile Connectivity Feature pointing to the SAP Backend system (on premise or in the Cloud).

BAS can be used to create a Mobile App linking to the Mobile Services App using the supplied template.

Users download SAP Mobile Services Client to their phones from the App store, and can be sent a URL or a QR code to open the mobile app.

 

This tutorial shows the basic set up of Mobile Transaction Bridge. https://developers.sap.com/group.cp-mobile-mtb-odata.html

Access SAP BAS Mobile Services

I won’t go into the details of how to create a Trial account if you don’t have one, as there are plenty of articles about that out there.

Open your BTP Space and select Mobile Services.

Create a Mobile Services Instance, selecting the appropriate Service Plan:

After creation of the Instance, Click on ‘Support’ and enter your Organization and Space:

And Press ‘Open’.

Mobile Transaction Bridge Recording can be found here:

Before going further, we need to make sure the Backend system is fit for purpose.

There are some pre-requisites that need to be fulfilled as described in the following notes:

https://launchpad.support.sap.com/#/notes/2853735

with a brief overview here:

 

A new webgui SICF Service is required that will be used by MTB to trigger the SAPGUI Transactions as described below

 

https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mtb/introduction.html

Create a new service with additional parameters, as in

https://launchpad.support.sap.com/#/notes/2873312

https://launchpad.support.sap.com/#/notes/2944771

When the relevant packages were installed the option to create new Recordings wasn’t available as the ‘+’ button to create new Recordings was greyed out. This was caused by Screen Personas being active. In order to turn it off for the MTB recorder, the following parameter was added to the Service:

Creating the Destination in Cloud Foundry

In BTP I created a Destination for the On Premise system at Account level, with parameters HTML.Timeout set to 60000 and Usage Backend

Configuring the system in MTB

In Mobile Services, go to Mobile Transaction Bridge and select Back-End systems

Click on ‘+’ to create a new Back End system.

This points to the new SICF service configured earlier and allows Recordings of this destination.

You can define more than one system.

 

Recording a Transaction

 

Click on Recordings, then Recorder. If you have more than one Destination configured, you need to select the relevant one. I am using a Trial Account and can only have 2 Recordings at any one time.

 

There is more documentation in SAP Mobile Services Documentation in section ‘Mobile Transaction Bridge’ at https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mtb/introduction.html

 

Clicking on Recorder New brings up this screen:

Select ‘OK’ , which should allow you to create a recording by clicking on the ‘+’ sign,  after entering a SAPGUI Transaction code eg SU01, IW41 etc. (If not, see my settings for Screen Personas in the SICF service above).

In this example, I want to simplify the process of entering Actual Time against a Work Order Operation.

 

MTB Recordings are made up of Sequences, and each Sequence is made up of Steps. Once the Sequences are recorded, they can be connected using a visual UI tool called Application Designer. Initially I was going to record the whole process, of finding a Work Order, selecting an Operation, and then entering Time values, but advice came from SAP that it is better to create Sequences of ‘Find Order’, ‘Open Order Details’, and ‘Update Order’ and connect them using the Application Designer. I will go through this example here.

First click on the + sign to create a new Recording:

Now click on the newly created Recording:

And click ‘+’ to create the first Sequence:

 

Record ‘Search for Order’

Click Create then click on the newly created Sequence

And then click on Record:

This frames the screen in Red, and creates the first Step

Pressing a Button in the dialog screen creates a new Step, and Input and Output fields are defined by clicking on the Configure area at the top of the screen.

First, I click on the search help button of the Work Order. Which creates another Step.

Ensure the correct search help is defaulted and registered by clicking on a different search help to the one you want to use, then clicking back to it.

Now click on ‘Configure’ at the top of the screen.

 

By clicking on a Field, a new screen appears on the left where you can configure it as an Input field, and make it mandatory, or an output field.

Click on the Add button on the left once you have defined the settings. I chose Order and Description as my search fields. This leaves a green check mark in the field.

Click on Configure again to go back to the screen Flow and Click on ‘Find’.

 

This brings up a list of Orders

Click on Configure again to select the Output fields to be displayed and clicking on the top right + sign of the Grid selects all the fields in the table as possible output fields.

Note you can overwrite the Title of the OData name and Field names to make them more understandable later. You can also change them later if you forget.

Then Click on the Stop recording button. Don’t worry if you get the ‘Out of Sync’ message

We will connect the output from this Sequence to the Input of another later.

Now we record a second Sequence to display the Operations of the Order starting from the first screen again.

Click on the new Sequence, and then click create and Record

Click on Configure and add the Order field and make it mandatory. Don’t forget the Add button on the left.

Then Click on Configure again, enter a valid Order number, and click the Enter button to proceed to the next screen.

Click on Configure again in the next screen to define the output on the next Mobile app screen,

Add the Order field and rename it for clarity and then select the Operation Fields by selecting the whole table with the top right + sign and possibly rename those fields as well. You can’t change the order of the fields displayed on the screen yet,SAP are looking into that in a future release.

 

Also Add the Order field as an Output so we can use it later to connect to the final Sequence.

When finished, Click ‘Add’, then Configure, and then Stop Record.

I have the fields required for the update.

Create a new Sequence called ‘Update Order’ starting again from the first screen.

Click on Record.

Click Configure and make the Order Input field mandatory and press Add.

Click on Configure again, then click Enter to proceed to the next screen.

Select a Line (Recording use the Row Index, the user will be able to select from the Tabstrip).

 

And Click on Actual data Tab.

Click Configure and Add + and make the Actual Work Field mandatory

Then Click Configure again then click SAVE. Then STOP Recording.

 

Testing the Recording

 To test the Recording output and OData service, navigate back to the list of Apps and after pressing the three dots, select Test OData Service.

 

Firstly, we test the Search for Order Sequence.

Pressing Execute results in

And the Raw Response as follows

Do the same for Show Order details

And finally, the Update Order Sequence

Under Parsed Response we see the following

 but in the RAW Response we see the success message

Application Designer

Now to connect these Sequences.

Go to the Application Designer for your App.Pressing the three dots, select Test OData Service.

Each Sequence would appear in the Mobile Services App as a separate option as things are, but there is an option on the right hand side of the screen, once a Sequence is clicked, to hide it from the main page.

To link the output from Search Order to Show Order Details, first we need to create an Aggregation which is used to allow selection of a Row from a List and send it as input to another Sequence. Right click on a blank space on the screen and select Add Node/Aggregations/List Item Action.

Then draw a line from the output table ListofOrders to the List Input of the List Item Action.

Now right click on a blank part of the screen and create a copy of the Show Order details Sequence

Now we take the output from the Order selection Action List Item as input into the Show Order Details Sequence.

Now we Add another Sequence based on the Update Order Sequence (right click in space, Add Node, Sequences) and again a List Item Action coming from our Line Item selection screen.

Link the List of Operations tab to the new List Item Tab. Then link the Order which was an output field from Show Order details, and the Row/Index coming from the new List Item Action to the copy of the Update Order Sequence copy.

NB The RowIndex is always compatible even if the user pages down on their phone.

Publish the App

Once you have tested the OData services and linked them as above, you are ready to Publish the Recording and build the Mobile App. Note that the SAP documentation mentions the ability to Preview the App on the right-hand side of the screen, however this is still under development by SAP. I did see a prototype which looked very useful.

Click on the Wizard Icon against the MTB Recording and Publish and confirm

This makes the ODdata service available for consumption. Details of which can be found in the Runtime section of this document https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mtb/runtime.html

NB Currently I have been advised that there is a bug in the BAS Template when creating MTB Apps, but that it will be fixed in the next few releases. The other available options described are SAP BTP SDK for Android and iOS, and WEBIDE.

Conclusion

As a summary, in this blog post we introduce a way of recording SAPGUI transactions and creating an OData service. This Service enables the user to select screen fields as input and output from the screens and record Button clicks. These Sequences can be tested individually before publishing the Recording and going through the full cycle of creating an App for test purposes. They can then be linked together in an easy way to create an MTB Recording using a Graphical Interface. The Recording can then be used in a SAP Mobile App.

This is still very new, and there are a few enhancements planned to make it even easier to use, such as showing the Success/Failure after pressing SAVE, allowing the sequence of Fields displayed to be changed, and Preview functionality while in the Application Designer. Offline data capability is also being considered.

The performance of the MTB App compared to a Screen Personas/Slipstream App is a lot faster, and the handling of TabStrip controls is better. MTB would be an ideal choice for developing Mobile Apps based on SAPGUI transactions, and even better in a few more releases. I’m not sure if it is a Tool for a Key User, but that is the same for Personas.

SAP Personas/Slipstream comes free with recent Releases of SAP, however I see that Fiori Client is being taken out of service early next year which might have an impact on the comparison. There is a small charge for BTP and Mobile Services in the Cloud.

Overall it shows a great deal of promise in bring SAPGUI transactions into the modern mobile world.

2 Comments
You must be Logged on to comment or reply to a post.