Skip to content

Reference Scenarios

The screens and the user interaction flows in SAP GUI for HTML can be very complex. Even the simplest flows need to be looked at from the perspective of the intended consumption via OData (be it a mobile application or any type of application).

Recordings have to be designed in such a way, that they can be combined consumed in a repeatable and understandable manner.

Start and end screens for each recording has to make sense from the perspective of the call linking, e.g. when a sequence is being consumed via OData, it should stop on a screen which will be used by another sequence.

SU01 - Find And Display User Details

A mobile consumer for an OData service based on recordings created in SAP Transaction SU01 could for example look for:

  • A method to find users taking search criteria as parameters and returning a list of users
  • A method to display user details taking the user name as a parameter and returning various details of the user profile, including the roles

Record Find Method

In Mobile Transaction Bridge Recorder:

  1. Start transaction SU01
  2. Create an App, then create a Sequence Find User and then start recording
    • The canvas containing the SAP GUI for HTML application starts glowing in red, signalizing the recording mode
    • The Configure button appears on the left side of the top(header) pane and can be used to select input and/or output fields
  3. Open F4 help for the username field
  4. Use the Configure tool to select input fields, for example First name, Last name, Department
  5. Perform search
  6. Use the Configure tool to select the table with search results as an output field

    Note

    Do not select a user, as this should not be part of the recording - we only want the list of users as an output.

  7. Close the dialog

    Note

    Keep in mind where the recording ends, with regard to the other recordings which will belong to the same OData service

  8. Stop recording

Record Get Method

In Mobile Transaction Bridge Recorder:

  1. After finishing the Find User recording, go to the list of sequences
  2. Create a Sequence Get User Details and then start recording
  3. Use the Configure tool to select the username field as an input field

    Note

    You can also enter a username in the field - however, in case there is already a username in there, you must enter another one, as SAP GUI for HTML will not send it again to the back-end and therefore it will not be recorded.

  4. Select Display

  5. Use the Configure tool to select output fields, for example Full Name, Email, Department
  6. Navigate to the Roles tab
  7. Use the Configure tool to select the table with roles as an output field
  8. Stop recording

    Note

    Same here, keep in mind where the recording ends. You could also go back the start of the SAP Transaction before stopping the recording, as both recordings start there!

OData Result

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://docs.oasis-open.org/odata/ns/edmx http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edmx.xsd http://docs.oasis-open.org/odata/ns/edm http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edm.xsd">
    <edmx:DataServices>
        <Schema Namespace="com.sap.cloud.platform.mobile.zenbridge" Alias="Self" xmlns="http://docs.oasis-open.org/odata/ns/edm">
            <ComplexType Name="FindUserUserListEntry">
                <Property Name="Building" Type="Edm.String" Nullable="false"/>
                <Property Name="City" Type="Edm.String" Nullable="false"/>
                <Property Name="CompanyInUserSAddress" Type="Edm.String" Nullable="false"/>
                <Property Name="CostCtr" Type="Edm.String" Nullable="false"/>
                <Property Name="Department" Type="Edm.String" Nullable="false"/>
                <Property Name="Extension" Type="Edm.String" Nullable="false"/>
                <Property Name="FirstName" Type="Edm.String" Nullable="false"/>
                <Property Name="IdType" Type="Edm.String" Nullable="false"/>
                <Property Name="Internal" Type="Edm.String" Nullable="false"/>
                <Property Name="LastName" Type="Edm.String" Nullable="false"/>
                <Property Name="Name" Type="Edm.String" Nullable="false"/>
                <Property Name="RoomNo" Type="Edm.String" Nullable="false"/>
                <Property Name="RowIndex" Type="Edm.Int32" Nullable="false"/>
                <Property Name="UserName" Type="Edm.String" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="GetUserDetailsRolesEntry">
                <Property Name="EndDate" Type="Edm.String" Nullable="false"/>
                <Property Name="Role" Type="Edm.String" Nullable="false"/>
                <Property Name="RowIndex" Type="Edm.Int32" Nullable="false"/>
                <Property Name="ShortRoleDescription" Type="Edm.String" Nullable="false"/>
                <Property Name="StartDate" Type="Edm.String" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="OUTPUT_FindUser">
                <Property Name="UserList" Type="Collection(Self.FindUserUserListEntry)" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="OUTPUT_GetUserDetails">
                <Property Name="Department" Type="Edm.String" Nullable="false"/>
                <Property Name="EMail" Type="Edm.String" Nullable="false"/>
                <Property Name="FullName" Type="Edm.String" Nullable="false"/>
                <Property Name="Roles" Type="Collection(Self.GetUserDetailsRolesEntry)" Nullable="false"/>
                <Property Name="User" Type="Edm.String" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="RESPONSE_FindUser" BaseType="Self.Response">
                <Property Name="Output" Type="Self.OUTPUT_FindUser" Nullable="true"/>
            </ComplexType>
            <ComplexType Name="RESPONSE_GetUserDetails" BaseType="Self.Response">
                <Property Name="Output" Type="Self.OUTPUT_GetUserDetails" Nullable="true"/>
            </ComplexType>
            <ComplexType Name="Response" Abstract="true">
                <Property Name="State" Type="Self.State" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="State">
                <Property Name="ErrorCode" Type="Edm.Int32" Nullable="false"/>
                <Property Name="PrecedingActions" Type="Collection(Edm.String)" Nullable="true"/>
                <Property Name="StatusBarMessage" Type="Edm.String" Nullable="false"/>
                <Property Name="SubsequentActions" Type="Collection(Edm.String)" Nullable="true"/>
            </ComplexType>
            <Action Name="FindUser">
                <Parameter Name="Department" Type="Edm.String" Nullable="true"/>
                <Parameter Name="FirstName" Type="Edm.String" Nullable="true"/>
                <ReturnType Type="Self.RESPONSE_FindUser" Nullable="false"/>
            </Action>
            <Action Name="GetUserDetails">
                <Parameter Name="User" Type="Edm.String" Nullable="false"/>
                <ReturnType Type="Self.RESPONSE_GetUserDetails" Nullable="false"/>
            </Action>
            <Action Name="Home">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Login">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Logout">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <EntityContainer Name="ZenBridge">
                <ActionImport Name="FindUser" Action="Self.FindUser"/>
                <ActionImport Name="GetUserDetails" Action="Self.GetUserDetails"/>
                <ActionImport Name="Home" Action="Self.Home"/>
                <ActionImport Name="Login" Action="Self.Login"/>
                <ActionImport Name="Logout" Action="Self.Logout"/>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

SU01 - Create A User

A mobile consumer for an OData service based on recordings created in SAP Transaction SU01 could for example look for:

  • A method to create a new user by using a template user and modifying only a few fields, like First Name and Last Name

Record Create Method

In Mobile Transaction Bridge Recorder:

  1. Start transaction SU01
  2. Create an App, then create a Sequence Create User and then start recording
    • The canvas containing the SAP GUI for HTML application starts glowing in red, signalizing the recording mode
    • The Configure button appears on the left side of the top(header) pane and can be used to select input and/or output fields
  3. Click on Copy
  4. Use the Configure tool to select input fields From and To
  5. Click on Copy
  6. Use the Configure tool to select input fields Password and Repeat Password
  7. Enter some password for the user, so that you can continue the flow

    Note

    Passwords will not be recorded!

  8. Hit enter, to force communication with back-end

  9. Go to the Address tab
  10. Use the Configure tool to select input fields, for example First Name and Last Name
  11. Click Save
  12. Stop recording

Create Result

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://docs.oasis-open.org/odata/ns/edmx http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edmx.xsd http://docs.oasis-open.org/odata/ns/edm http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edm.xsd">
    <edmx:DataServices>
        <Schema Namespace="com.sap.cloud.platform.mobile.zenbridge" Alias="Self" xmlns="http://docs.oasis-open.org/odata/ns/edm">
            <ComplexType Name="RESPONSE_CreateUser" BaseType="Self.Response"/>
            <ComplexType Name="Response" Abstract="true">
                <Property Name="State" Type="Self.State" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="State">
                <Property Name="ErrorCode" Type="Edm.Int32" Nullable="false"/>
                <Property Name="PrecedingActions" Type="Collection(Edm.String)" Nullable="true"/>
                <Property Name="StatusBarMessage" Type="Edm.String" Nullable="false"/>
                <Property Name="SubsequentActions" Type="Collection(Edm.String)" Nullable="true"/>
            </ComplexType>
            <Action Name="CreateUser">
                <Parameter Name="FirstName" Type="Edm.String" Nullable="true"/>
                <Parameter Name="From" Type="Edm.String" Nullable="true"/>
                <Parameter Name="LastName" Type="Edm.String" Nullable="true"/>
                <Parameter Name="NewPassword" Type="Edm.String" Nullable="true"/>
                <Parameter Name="RepeatPassword" Type="Edm.String" Nullable="true"/>
                <Parameter Name="To" Type="Edm.String" Nullable="true"/>
                <Parameter Name="User" Type="Edm.String" Nullable="false"/>
                <ReturnType Type="Self.RESPONSE_CreateUser" Nullable="false"/>
            </Action>
            <Action Name="Home">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Login">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Logout">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <EntityContainer Name="ZenBridge">
                <ActionImport Name="CreateUser" Action="Self.CreateUser"/>
                <ActionImport Name="Home" Action="Self.Home"/>
                <ActionImport Name="Login" Action="Self.Login"/>
                <ActionImport Name="Logout" Action="Self.Logout"/>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

SU01 - Block/Unblock User

A mobile consumer for an OData service based on recordings created in SAP Transaction SU01 could for example look for:

  • A method to find users taking search criteria as parameters and returning a list of users
  • A method to display user details taking the username as a parameter and returning various details of the user profile, including the roles

Record Block Method

In Mobile Transaction Bridge Recorder:

  1. Start transaction SU01
  2. Create an App, then create a Sequence Block User and then start recording
    • The canvas containing the SAP GUI for HTML application starts glowing in red, signalizing the recording mode
    • The Configure button appears on the left side of the top(header) pane and can be used to select input and/or output fields
  3. Use the Configure tool to select input fields User
  4. Click on Lock/Unlock
  5. Confirm
  6. Stop recording

Record Unblock Method

In Mobile Transaction Bridge Recorder:

  1. After finishing the Find User recording, go to the list of sequences
  2. Create a Sequence Unblock and then start recording
  3. Click on Lock/Unlock
  4. Confirm
  5. Stop recording

Block Result

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://docs.oasis-open.org/odata/ns/edmx http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edmx.xsd http://docs.oasis-open.org/odata/ns/edm http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edm.xsd">
    <edmx:DataServices>
        <Schema Namespace="com.sap.cloud.platform.mobile.zenbridge" Alias="Self" xmlns="http://docs.oasis-open.org/odata/ns/edm">
            <ComplexType Name="Response" Abstract="true">
                <Property Name="State" Type="Self.State" Nullable="false"/>
            </ComplexType>
            <ComplexType Name="State">
                <Property Name="ErrorCode" Type="Edm.Int32" Nullable="false"/>
                <Property Name="PrecedingActions" Type="Collection(Edm.String)" Nullable="true"/>
                <Property Name="StatusBarMessage" Type="Edm.String" Nullable="false"/>
                <Property Name="SubsequentActions" Type="Collection(Edm.String)" Nullable="true"/>
            </ComplexType>
            <Action Name="Block">
                <Parameter Name="User" Type="Edm.String" Nullable="true"/>
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Home">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Login">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Logout">
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <Action Name="Unblock">
                <Parameter Name="User" Type="Edm.String" Nullable="true"/>
                <ReturnType Type="Self.Response" Nullable="false"/>
            </Action>
            <EntityContainer Name="ZenBridge">
                <ActionImport Name="Block" Action="Self.Block"/>
                <ActionImport Name="Home" Action="Self.Home"/>
                <ActionImport Name="Login" Action="Self.Login"/>
                <ActionImport Name="Logout" Action="Self.Logout"/>
                <ActionImport Name="Unblock" Action="Self.Unblock"/>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

Last update: September 29, 2020