Msb 360 Doku Developer Guide

153
Version: 2.0 Date: August 10, 2011 Mobisys GmbH Altrottstr. 26 D-69190 Walldorf www.mobisys.de Documentation Mobisys Solution Builder Release 3.60

description

MM

Transcript of Msb 360 Doku Developer Guide

  • Version: 2.0 Date: August 10, 2011

    Mobisys GmbH Altrottstr. 26 D-69190 Walldorf www.mobisys.de

    Documentation

    Mobisys Solution Builder Release 3.60

  • Mobisys Solution Builder Release 3.60 Copyright

    Copyright Copyright 2011 Mobisys GmbH. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of Mobisys GmbH. The information contained herein may be changed without prior notice.

    Some software products marketed by Mobisys GmbH and its distributors contain proprietary software components of other software vendors.

    SAP, SAP NetWeaver, SAP ERP, ABAP, BAPI and other SAP products and services referred to in this document, as well as the corresponding logos, are registered trademarks of SAP AG in Germany or other countries. Microsoft, Windows, and other Microsoft products and services mentioned in this document are registered trademarks of Microsoft Corporation.

    Citrix and Citrix products and services mentioned in this document, as well as the corresponding logos, are registered trademarks of Citrix Systems, Inc.

    HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

    All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. Mobisys is not liable for errors or omissions with respect to this publication. The only warranties for Mobisys products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

    Version 2.0, Date: August 10, 2011 Page 2

  • Mobisys Solution Builder Release 3.60 Table of Contents

    Table of Contents 1 General information ........................................................................................................... 7

    1.1 Introduction ................................................................................................................ 71.2 Overview of the Mobisys Solution Builder .................................................................. 71.3 Supplementary products of the MSB family ............................................................... 81.4 Features of the MSB .................................................................................................. 91.5 Prerequisites ............................................................................................................ 101.6 Installation scenarios ............................................................................................... 11

    1.6.1 MSB on systems with an SAP application ........................................................ 111.6.2 MSB on your own SAP NetWeaver Application Server .................................... 12

    1.6.2.1 Connection to SAP ERP release lower than 4.70 ..................................... 121.6.2.2 Scalability for large installations ................................................................ 121.6.2.3 Use as middleware for asynchronous processing ..................................... 131.6.2.4 Use of the SAP Web Dispatcher ............................................................... 141.6.2.5 Security ...................................................................................................... 14

    1.6.3 Communication channels with the MSB Client ................................................. 152 Structure of an MSB application ...................................................................................... 16

    2.1 Overview .................................................................................................................. 162.2 Introduction .............................................................................................................. 162.3 MSB application ....................................................................................................... 162.4 MSB transaction ....................................................................................................... 172.5 MSB screen ............................................................................................................. 172.6 MSB components ..................................................................................................... 172.7 Dynamic screen design and flow logic ..................................................................... 18

    3 My first MSB application .................................................................................................. 193.1 Overview .................................................................................................................. 193.2 Introduction .............................................................................................................. 193.3 Prerequisites ............................................................................................................ 193.4 Functions of the application 1ST .............................................................................. 203.5 Preparation in the SAP system (transaction SE80) ................................................. 20

    3.5.1 Creating a package in the SAP system ............................................................ 213.5.2 Creating a function group in the SAP system ................................................... 213.5.3 Creation of a message class ............................................................................ 21

    3.6 Working with transaction MSB ................................................................................. 223.6.1 Create application 1ST ..................................................................................... 223.6.2 Add transaction MAIN ....................................................................................... 24

    3.6.2.1 Add screen 1 ............................................................................................. 243.6.2.2 Add components ........................................................................................ 263.6.2.3 Generate PBO/PAI function modules ........................................................ 283.6.2.4 Insert include for MSB macros .................................................................. 283.6.2.5 Insert customer own coding ....................................................................... 29

    3.6.3 Add new transaction Hello ................................................................................ 293.6.3.1 Add screen 001 ......................................................................................... 303.6.3.2 Add component ......................................................................................... 313.6.3.3 Generate PBO/PAI function modules ........................................................ 323.6.3.4 Insert customer own coding ....................................................................... 32

    3.7 MSB Client ............................................................................................................... 343.7.1 Main menu ........................................................................................................ 343.7.2 Transaction Hello MSB ..................................................................................... 35

    Version 2.0, Date: August 10, 2011 Page 3

  • Mobisys Solution Builder Release 3.60 Table of Contents

    4 Creating an MSB application ........................................................................................... 36

    4.1 Overview .................................................................................................................. 364.2 Introduction .............................................................................................................. 364.3 Define application .................................................................................................... 38

    4.3.1 Create application ............................................................................................. 384.3.2 Delete application ............................................................................................. 444.3.3 Process / display application ............................................................................ 44

    4.4 Define transaction .................................................................................................... 454.4.1 Create transaction ............................................................................................ 454.4.2 Delete transaction ............................................................................................. 474.4.3 Copy transaction ............................................................................................... 474.4.4 Process / display transaction ............................................................................ 48

    4.5 Define screens ......................................................................................................... 494.5.1 Create screen ................................................................................................... 494.5.2 Delete screen .................................................................................................... 514.5.3 Copy screen ...................................................................................................... 514.5.4 Edit / display screen .......................................................................................... 53

    4.6 Define component .................................................................................................... 534.6.1 Create component ............................................................................................ 534.6.2 Device-independent component data ............................................................... 544.6.3 Device-dependent component data .................................................................. 554.6.4 Component types .............................................................................................. 57

    4.6.4.1 Label (LBL) ................................................................................................ 584.6.4.2 Input fields (EDT) ....................................................................................... 604.6.4.3 Button (BTN) .............................................................................................. 624.6.4.4 Radio button (RBT, selection button)....................................................... 634.6.4.5 Checkbox (CHB) ........................................................................................ 644.6.4.6 Combobox (CBX) ...................................................................................... 654.6.4.7 List box (LBX) ............................................................................................ 674.6.4.8 Data grid (GRD) ......................................................................................... 684.6.4.9 Image (Graphic) (IMG) .............................................................................. 714.6.4.10 Memo field (multi-line entry) (MEM) .......................................................... 724.6.4.11 RFID tag read (read an RFID Tag) (RFR) ................................................. 734.6.4.12 RFID tag write (write an RFID Tag) (RFW) ............................................... 744.6.4.13 RFID multiple tag read (RFM) ................................................................... 754.6.4.14 Signature (SUB) ........................................................................................ 764.6.4.15 Camera (CAM) .......................................................................................... 774.6.4.16 Browser (HTM) .......................................................................................... 79

    4.6.5 Special components for screen design ............................................................. 804.6.5.1 LBL_Shortinfo Short info line ................................................................. 804.6.5.2 LBL_Message Line for status messages ................................................ 80

    4.6.6 Tag control ........................................................................................................ 814.6.6.1 Tag ............................................................................................... 814.6.6.2 Tag ...................................................................................... 824.6.6.3 Tag ................................................................................................ 83

    4.6.7 Events ............................................................................................................... 854.6.8 Value lists ......................................................................................................... 86

    4.6.8.1 Fixed value list ........................................................................................... 874.6.8.2 Value list determined by the program ........................................................ 87

    4.6.9 Multilingual capability ........................................................................................ 894.6.10 Layouts ............................................................................................................. 90

    4.6.10.1 Standard layouts ........................................................................................ 934.6.11 Tab index .......................................................................................................... 93

    Version 2.0, Date: August 10, 2011 Page 4

  • Mobisys Solution Builder Release 3.60 Table of Contents

    4.6.12 Shortcodes ........................................................................................................ 944.6.12.1 Shortcode on a standard screen (screen type STD) ................................. 944.6.12.2 Shortcode on a menu screen (screen type MNU) ..................................... 94

    4.6.13 MSB message .................................................................................................. 954.6.14 Delete component ............................................................................................. 984.6.15 Copy component ............................................................................................... 984.6.16 Process / Display a component ........................................................................ 99

    4.7 Programming the flow logic .................................................................................... 1004.7.1 Function modules ........................................................................................... 1004.7.2 Generate PBO and PAI function modules ...................................................... 100

    4.7.2.1 Customized namespace .......................................................................... 1024.7.2.2 Saving Customer own Coding ................................................................. 103

    4.7.3 Adapt PBO function modules .......................................................................... 1034.7.4 Adapt PAI function modules ........................................................................... 1054.7.5 Includes .......................................................................................................... 106

    4.7.5.1 PBO_ENTRY include .............................................................................. 1074.7.5.2 PBO_EXIT include ................................................................................... 1084.7.5.3 PAI_ENTRY include ................................................................................ 1104.7.5.4 PAI_EXIT include .................................................................................... 112

    4.7.6 Macros ............................................................................................................ 1144.7.6.1 set_comp ................................................................................................. 1144.7.6.2 get_comp ................................................................................................. 1164.7.6.3 globaldata ................................................................................................ 1174.7.6.4 getglobalvalue ......................................................................................... 1174.7.6.5 menu_navigation ..................................................................................... 1184.7.6.6 get_destination ........................................................................................ 1194.7.6.7 msb_message ......................................................................................... 119

    4.8 Test of application .................................................................................................. 1204.8.1 MSB Client configuration ................................................................................ 1204.8.2 User maintenance ........................................................................................... 1204.8.3 Device management ....................................................................................... 1204.8.4 Basic settings of the MSB ............................................................................... 121

    5 MSB Administration ....................................................................................................... 1225.1 Overview ................................................................................................................ 1225.2 Introduction ............................................................................................................ 1225.3 Basic settings of the MSB ...................................................................................... 1235.4 Manage devices ..................................................................................................... 125

    5.4.1 Device management ....................................................................................... 1255.4.2 Device type management ............................................................................... 1265.4.3 Client version management ............................................................................ 127

    5.5 Maintain users ........................................................................................................ 1285.5.1 Maintain roles ................................................................................................. 1285.5.2 Assignment of roles to transactions ................................................................ 1295.5.3 User maintenance ........................................................................................... 1305.5.4 User groups .................................................................................................... 1315.5.5 User management for user groups ................................................................. 1325.5.6 Assignment of roles to users .......................................................................... 1335.5.7 User monitor ................................................................................................... 134

    5.6 Work area administration ....................................................................................... 1355.6.1 Define scheme ................................................................................................ 1355.6.2 Define work area ............................................................................................. 1365.6.3 Assignment of a user to a work area .............................................................. 1365.6.4 Program access work areas ........................................................................... 136

    Version 2.0, Date: August 10, 2011 Page 5

  • Mobisys Solution Builder Release 3.60 Table of Contents

    Version 2.0, Date: August 10, 2011 Page 6

    5.7 Maintain value lists ................................................................................................. 1376 Automatically generated objects of an MSB application ............................................... 138

    6.1 Introduction ............................................................................................................ 1386.2 Function modules ................................................................................................... 138

    6.2.1 Customized namespace ................................................................................. 1396.2.2 PBO function module ...................................................................................... 1406.2.3 PAI function module ........................................................................................ 141

    6.3 Includes .................................................................................................................. 1426.3.1 PBO_ENTRY include ...................................................................................... 1436.3.2 PBO_EXIT include .......................................................................................... 1436.3.3 PAI_ENTRY include ....................................................................................... 1446.3.4 PAI_EXIT include ............................................................................................ 144

    7 MSB macros .................................................................................................................. 1457.1 Macro: set_menu_dynamic .................................................................................... 1467.2 Macro: get_destination ........................................................................................... 1467.3 Macro: set_comp ................................................................................................... 1467.4 Macro: msb_message ............................................................................................ 1477.5 Macro: msb_message_voice ................................................................................. 1487.6 Macro: msb_message_sound ................................................................................ 1487.7 Macro: get_comp ................................................................................................... 1497.8 Macro: format_matnr_output .................................................................................. 1497.9 Macro: format_matnr_input .................................................................................... 1497.10 Macro: getglobalvalue ............................................................................................ 1507.11 Macro: globaldata .................................................................................................. 1507.12 Macro: menue_navigation ...................................................................................... 1507.13 Macro: create_character_cr ................................................................................... 1517.14 Macro: set_statefulmode ........................................................................................ 1527.15 Macro: message_or_shortinfo ............................................................................... 1527.16 Macro: set_focus .................................................................................................... 1537.17 Macro: set_screengroup ........................................................................................ 153

  • Mobisys Solution Builder Release 3.60 General information Introduction

    1 General information

    1.1 Introduction With the Mobisys Solution Builder (also referred to as "MSB"), an SAP-certified ABAP add-on, you can rapidly develop applications that can be executed on mobile end devices on the basis of the SAP NetWeaver Application Server and the corresponding SAP applications. All mobile applications are defined in the SAP system. The user interface is created with the graphical Mobisys Screen Designer (also referred to as "MSD") and stored in the SAP system. The flow logic is programmed completely in ABAP within a generated framework (function modules and includes). On the end device, the Mobisys Client (also referred to as the MSB Client) is used, which is available for a large number of mobile and stationary data-entry devices. The MSB Client is a so-called "Thin client", which is connected directly with the SAP system, on which the Mobisys Solution Builder Add-on is installed. All screen information is sent from the SAP system to the MSB Client at runtime as a compressed data structure, where it is processed into a corresponding display. The MSB solution also contains functions for device management, user management and authorizations managed in the SAP system.

    1.2 Overview of the Mobisys Solution Builder The Mobisys Solution Builder contains various software components and modules, which are installed, configured and used for the creation and execution of mobile applications. The mobile application is developed using the MSB Developer Kit and the Mobisys Screen Designer (MSD) contained in it. The actual running of the application is carried out using the MSB Client on the end device, and using the MSB Runtime Module on the SAP side. This works in the following way:

    On the end device, the screen information from the SAP system is displayed from the MSB Client installed there. The entered data is then sent back from the Client to the SAP system.

    To manage the end devices used, the users, work areas and authorizations, the functions of the MSB Administration can be used. This is only accessible to specific users (administrators).

    Version 2.0, Date: August 10, 2011 Page 7

  • Mobisys Solution Builder Release 3.60 General information Supplementary products of the MSB family

    Figure 1: Overview of the Mobisys Solution Builder

    A mobile application is first defined in the SAP system for the MSB add-on using transaction /mobisys/msb. To create the mobile screens, you use the Mobisys Screen Designer (MSD), which is part of the MSB Developer Kit. The Mobisys Screen Designer is a MS Windows .NET application, which is installed on a local developer computer. On the SAP side, the MSB generates the ABAP function modules for the flow logic by a simple click; these are then filled with customer-specific ABAP code. The MSB Client logs on to the SAP system and calls the start screen stored there. At this point, the function module called PBO (Process Before Output) runs through this start screen. The user can now fill in the input fields in this screen or press a corresponding button, sending the screen back to the SAP system. There the PAI (Process After Input) function module is run and the data is processed. The PAI function module also contains the information on the subsequent screen that is to be sent to the Client. After this, you run through the same process with a new screen. This is therefore a client/server application, in which the entire control and flow logic are stored on the SAP side. On the basis of a compressed data protocol developed especially for this product, only about 2 KB of data is transferred between the Client and the SAP server, which is considerably less than for the usual browser-based mobile solutions.

    1.3 Supplementary products of the MSB family Besides the products described in this document, the MSB Runtime Module, the MSB Developer Kit with the MSD Client and the MSB Client, Mobisys also offers the following products, which greatly expand the range of applications of the solution

    MSB Offline Module for mobile offline applications, where the end device is not continuously connected with SAP systems

    MSB Screen Designer for ITSmobile for the efficient screen design and the customer-specific enhancement of the flow logic of applications running on SAP ITSmobile.

    MSB Voice Edition for voice-controlled mobile applications

    Version 2.0, Date: August 10, 2011 Page 8

  • Mobisys Solution Builder Release 3.60 General information Features of the MSB

    MSB Workforce Activity Manager, a control station to manage staff and the tasks which are carried out with mobile end devices

    MSB RFID Edition to connect stationary RFID reader systems MSB Gateway to connect devices with serial or TCP/IP interface - such as scales,

    NC controls, identification systems - simply and quickly to the SAP system ... and other specific solutions to connect all types of end devices to SAP systems

    In addition, Mobisys also offers ready-to-use "turnkey" MSB standard transactions for frequently used mobile processes, which can be customized if required. All available products and standard transactions can be found on the Mobisys homepage http://www.mobisys.de or will be given to you upon request. For further information, please contact us at [email protected] Note Nr. 1

    The documentation of these supplementary products and standard transactions is not part of this document.

    1.4 Features of the MSB The most important features of the Mobisys Solution Builder are:

    The MSB is an SAP-certified Add-On of the SAP NetWeaver Application Server. The development of mobile applications is carried out entirely in the SAP system,

    enabling a rapid deployment of customer requirements. The screen layout and the flow logic are stored centrally on the SAP server. No specific knowledge of web development in the SAP system is required, since

    development is only with ABAP. No development outside of the SAP system is necessary. The Mobisys Screen Designer makes it possible to create the screens on the mobile

    devices using WYSIWIG technology. No additional middleware to connect the mobile end devices is required. It can also be used in distributed system landscapes, even on a separate NetWeaver

    Application Server not connected to the application. Many different types of end devices can be used. Device-specific features are supported (scanner on/off, sound, RFID, camera, etc.) Automated software updates on the mobile end devices are controlled via the SAP

    system. An additional authorization concept is used for the maintenance of users and roles on

    the mobile end devices. An integrated device management function controls the connection to any number of

    end devices. There is support for several voice-controlled systems (for example, for pick-by-voice). An offline module enables the entry of SAP data independently of the SAP system.

    Version 2.0, Date: August 10, 2011 Page 9

  • Mobisys Solution Builder Release 3.60 General information Prerequisites

    The comprehensive features of Mobisys Solution Builder provide the following advantages:

    Cost-effective development and operation, since the work is carried out without middleware, directly in the SAP system.

    Low development costs, since the program framework is completely generated from the MSB add-on, making it possible to concentrate on the business processes at hand.

    Rapid project implementation: The screen structure and the process flow control can be coordinated directly with the end user. The acquisition, control and posting of data can be developed independently of this. Quick tests during the development phase are possible.

    Investment protection, as the old and new Windows-compatible hardware can be used in combination; this means that inhibitions with respect to undertaking major new projects are lower.

    Minimization of the training costs: o Existing ABAP skills can be reused. o No particular knowledge of the NetWeaver Application Server is necessary. o No knowledge of the mobile infrastructure, or of XML or HTML is necessary.

    1.5 Prerequisites The following software components are required for the overall MSB solution:

    MSB Runtime Module (Runtime and Administration) and MSB Developer Kit as add-ons of the SAP NetWeaver Application Server

    Mobisys Screen Designer (MSD) as a local installation on the Windows PC of the developer

    MSB Client as a local installation on Windows-based PCs or on Windows-based mobile end devices

    The technical prerequisites for using the overall MSB solution, the installation and the basic configuration are described in the installation documentation of the following relevant software components for the corresponding release:

    MSB Installation and Test MSD Installation MSB Client for PC MSB Client for mobile end devices

    In the documentation of the above products, the interdependence of individual releases of these software components is described. Additionally, the models of end devices supported for the MSB Client are described.

    Version 2.0, Date: August 10, 2011 Page 10

  • Mobisys Solution Builder Release 3.60 General information Installation scenarios

    1.6 Installation scenarios Mobisys Solution Builder is an add-on based on SAP NetWeaver Application Server and is technically independent of the SAP applications, that is, of the SAP ERP system. There are therefore different ways of connecting the MSB to SAP systems.

    1.6.1 MSB on systems with an SAP application In this case, the MSB is installed in the same system as the SAP application (for example, an ERP system).

    Figure 2: MSB on a system with the SAP application (ERP)

    From Release SAP ERP 4.70, the MSB can be installed as an add-on on the same SAP system. Besides being used for an ERP system, this option can also be used for other SAP applications based on the SAP NetWeaver Application Server Release 6.1 or higher. The advantage of this connection is that the development resources are lower compared with the option described below, since the data and functions of the SAP application can be accessed directly in the flow logic of the application.

    Version 2.0, Date: August 10, 2011 Page 11

  • Mobisys Solution Builder Release 3.60 General information Installation scenarios

    1.6.2 MSB on your own SAP NetWeaver Application Server In this case, the MSB is installed on your own SAP NetWeaver Application Server, which is separate from the application.

    Figure 3: MSB on your own SAP NetWeaver Application Server

    The advantages of this option are shown in the technical aspects described below.

    1.6.2.1 Connection to SAP ERP release lower than 4.70 For SAP ERP releases lower than 4.70, MSB has to be installed on a separate SAP NetWeaver Application Server (Release 6.1 or higher). The connection to the application is carried out via an RFC connection and RFC-enabled function modules.

    1.6.2.2 Scalability for large installations This option can also be used for SAP ERP releases starting with Rel. 4.70 and other solutions:

    You can use it in the case of extensive installations (for example, for several thousand end devices and terminals)

    Alternatively, if you intend to separate the communication layer from the application layer, the MSB can also be installed independently of the SAP application. In this case, the MSB is installed on one or several proprietary SAP NetWeaver Application Servers.

    Version 2.0, Date: August 10, 2011 Page 12

  • Mobisys Solution Builder Release 3.60 General information Installation scenarios

    1.6.2.3 Use as middleware for asynchronous processing The MSB can also be configured as middleware if necessary. Data can then be exchanged with the SAP application either synchronously or asynchronously. In the case of asynchronous connections, it is also possible to continue working temporarily without the SAP application and when it becomes available again to post the data, for example, via IDocs.

    Figure 4: Use as middleware for asynchronous processing

    The SAP NetWeaver Application Server is connected to the SAP system via a remote connection. For this, you have the following options:

    As long as the SAP system is available, the data entered on the end device will be posted synchronously via RFC or BAPI.

    If there is no connection to the SAP system, the data will be stored temporarily on the SAP NetWeaver Application Server. The data can then be transferred to the SAP system via IDoc or tRFC once the connection has become available again and can then be posted asynchronously.

    Version 2.0, Date: August 10, 2011 Page 13

  • Mobisys Solution Builder Release 3.60 General information Installation scenarios

    1.6.2.4 Use of the SAP Web Dispatcher In the case of large-scale projects, several SAP NetWeaver Application Servers can be set up in this option to communicate with the mobile end devices. One of the servers is configured as the central instance and also has its own database. The upstream SAP Web Dispatcher then ensures an even load distribution on these servers.

    Figure 5: Use of the SAP Web Dispatcher

    1.6.2.5 Security For maximum security, it is possible to install the SAP Web Dispatcher in a so-called Demilitarized Zone (DMZ). This zone is protected by two firewalls. In addition, it is also possible to additionally protect the connection between the SAP NetWeaver Application Server and the SAP system by means of a third firewall.

    Figure 6: Firewall with MSB on a proprietary NetWeaver Application Server

    Version 2.0, Date: August 10, 2011 Page 14

  • Mobisys Solution Builder Release 3.60 General information Installation scenarios

    1.6.3 Communication channels with the MSB Client The communication between the MSB Runtime Module and the MSB Client on the end device is carried out via an HTTP or HTTPS protocol and the SAP Internet Communication Framework. This connection permits communication both via a network connection and also via telecommunication links as follows:

    Figure 7: Communication channels with the MSB Client

    In addition to the WLAN capability, with MSB Client you can also use GPRS/EDGE/HSDPA - via the GSM or UMTS network - to enter data from any location and still to have direct, synchronous access to the SAP system. The switch from WLAN to GSM and back can be done automatically.

    Version 2.0, Date: August 10, 2011 Page 15

  • Mobisys Solution Builder Release 3.60 Structure of an MSB application Overview

    2 Structure of an MSB application

    2.1 Overview This chapter contains an overview of the structure of an MSB application. You can find a sample application in Chapter 3, My First MSB Application. Further detailed information can be found in Chapter 4, Creating an MSB Application.

    2.2 Introduction An MSB application is subdivided into one or several transactions. Each transaction consists of one or several screens. On each screen, one or more components can be found (screen elements such as entry fields, buttons, list boxes, or labels). The MSB application also contains function modules for dynamic screen design and for the flow logic.

    MobisysApplication:MDEWareh.Mgmt.

    Figure 8: Structure of an MSB application

    2.3 MSB application Several transactions are contained in one MSB application, so that you can access all transactions when you log on to the end device. We recommend storing all transactions that must be available within a specific task area in one application. An MSB application usually has a transaction called MAIN (you can also provide any other name for it). This is a type of menu transaction that contains only buttons which are linked to further transactions of the application.

    Version 2.0, Date: August 10, 2011 Page 16

  • Mobisys Solution Builder Release 3.60 Structure of an MSB application MSB transaction

    Applications are defined in the SAP system in transaction /MOBISYS/MSB. To call up the transaction, enter /N/MOBISYS/MSB in the OK Code field (on the SAP GUI at the top left) and then confirm this with the ENTER key. Note Nr. 2

    Since the application has to be set up during the configuration of the MDE device and the user logs into one application, we do not recommend that you create several applications for the same user groups, and change them as required on the MDE device. It is preferable to use only one application, in which you have installed all mobile transactions and then use the MSB authorization and role management functions for the user-related menu display. This makes it possible to easily display or hide menus, screens and transactions for the relevant user.

    2.4 MSB transaction Similarly to SAP transactions, an MSB transaction is a logical process that can encompass several screens. At the end of a transaction, the entries are posted, a result is displayed or the system goes into another transaction. The navigation menu (normally found in transaction MAIN) can consist of one or more transactions.

    2.5 MSB screen A screen is a lower-level element of a transaction. In a transaction, a series of screens is normally processed in sequence. One transaction can have up to 999 screens. The screens are normally numbered consecutively from 001 to 999. Elements of a screen are normally maintained graphically with Mobisys Screen Designer (MSD), they can however also be maintained directly in the SAP system using transaction /MOBISYS/MSB.

    2.6 MSB components MSB components are elements of a screen, that is the buttons, fields, labels, etc. which are shown on the device display. The components can contain device-specific as well as device-independent data.

    Device-independent data, such as the type of component, data type, or default value, is the same for all output devices.

    Device-dependent data, such as the screen position of a field or its visible length, can be defined individually for each type of end device used.

    In this way, you can define screens for different device models in one application, for example, for devices with different display sizes.

    Version 2.0, Date: August 10, 2011 Page 17

  • Mobisys Solution Builder Release 3.60 Structure of an MSB application Dynamic screen design and flow logic

    2.7 Dynamic screen design and flow logic By means of the definition of a screen and its components, you specify what is to be displayed on the device. Furthermore, in the program-based flow logic, you can design a screen dynamically, by defining components as displayed or hidden. In this way, a screen can be created for a user in step-by-step fashion. For each screen, two function modules are generated, in which the flow logic of the screen can be programmed in ABAP:

    PBO function module (Process Before Output) Here you can adapt a screen before it is displayed on the end device, and provide the field contents for it dynamically. You can display or hide components, for example, or change other attributes of the components, such as colors or positions.

    PAI function module (Process After Input) Here screen inputs and events are processed and the subsequent screen is determined dynamically. This means that entered data can be tested, error messages initiated, and successfully checked data can be posted via function module call or BAPI call.

    Version 2.0, Date: August 10, 2011 Page 18

  • Mobisys Solution Builder Release 3.60 My first MSB application Overview

    3 My first MSB application

    3.1 Overview This chapter describes the structure and function of MSB using the sample application 1ST. The procedure to create your first own application is explained here step by step. In this way, you can create a completely executable application and test it with the MSB Client, in order to become acquainted with the overall concept. Note that in the following, not all details and options are explained. Further detailed information can be found in Chapter 4, Creating an MSB Application.

    3.2 Introduction The application 1ST is made up of the following elements:

    Main menu (transaction MAIN) Transaction HELLO Application screens Program module (PBO and PAI function modules for the screens)

    The application can be executed immediately and can be used both in an SAP ERP and also in a separate SAP NetWeaver Application Server.

    3.3 Prerequisites The prerequisites for the creation of the application 1ST are:

    Basic knowledge of the SAP system and of the programming language ABAP The MSB Runtime Module and the MSB Developer Kit must already be installed and

    configured in the SAP system. Note Nr. 3

    The installation and configuration of the MSB and its modules are described in the document MSB v3.60 Installation and Test. When you first create an MSB application, the Mobisys Screen Designer (MSD) is not used. The focus of this initial step is on the processing of an application directly in the SAP transaction MSB (called via N/MOBISYS/MSB.) Note Nr. 4

    The use of Mobisys Screen Designer (MSD) is described in the document Mobisys Screen Designer.

    Version 2.0, Date: August 10, 2011 Page 19

  • Mobisys Solution Builder Release 3.60 My first MSB application Functions of the application 1ST

    3.4 Functions of the application 1ST The purpose of the first MSB application is to learn how to handle the Mobisys Solution Builder. It consists of the following transactions:

    Menu transaction (MAIN) Demo transaction (HELLO)

    Each of the two transactions consists of one processing screen. A simple menu is implemented in the first transaction. From here, you can start the demo transaction HELLO or log off. The demo transaction shows a simple entry screen with the option to enter two numbers. A button is used to calculate the sum of the two numbers input and to output the result. The system checks whether the numbers input are valid. Incorrect entries are displayed by an error message. The output texts and error message texts are stored in their own message class and can be defined in a language-dependent manner if necessary.

    3.5 Preparation in the SAP system (transaction SE80) At the start of each new application, the corresponding package, the corresponding function group and a message class have to be created. This is done in the SAP system using transaction SE80 (ABAP Development Workbench with Object Navigator).

    Figure 9: Development packages and applications in transaction SE80

    Version 2.0, Date: August 10, 2011 Page 20

  • Mobisys Solution Builder Release 3.60 My first MSB application Preparation in the SAP system (transaction SE80)

    3.5.1 Creating a package in the SAP system This chapter describes how a package and a function group are created via the Object Navigator (ABAP Development Workbench, Transaction SE80) in the SAP system. Creating a package and creating a function group can however also be initiated directly from the MSB (Transaction /MOBISYS/MSB). Detailed information can be found in Chapter 4 Creating an MSB Application. To work with the Object Navigator, call transaction SE80 and select the object type Package. After this, you can enter the new package name. When naming the package, you should always ensure that the name of the package or the function group starts with Z_MSB_, whereby corresponds to the MSB application name (max. 3 characters, in our example 1ST). Package: Z_MSB_1ST Short description: Mobisys MSB Application 1ST Software component: HOME (for customer developments) Transport layer: (depends on the system) Package type: Not a main package In the dialog box Prompt for Transportable Workbench Request you next have to enter a Workbench request, in order to specify the transport track.

    3.5.2 Creating a function group in the SAP system After you have selected the object type Function group in the Object Navigator (SAP Transaction SE80), you can enter the new function group. Please take note here of the naming conventions already mentioned. Function group: Z_MSB_1ST Short text: Mobisys MSB Application 1ST

    3.5.3 Creation of a message class The message class is also created in Object Navigator (transaction SE80) for package Z_MSB_1ST (Create -> Message Class). Message class: Z_MSB_1ST Short text: Message class for MSB application 1ST The following message texts are stored in the message class:

    Figure 10: Messages for an application

    Version 2.0, Date: August 10, 2011 Page 21

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    3.6 Working with transaction MSB All further steps are carried out directly in transaction 1ST and described in the following sections:

    1. Create application 1ST 2. Add transaction MAIN 3. Add screen 001 in transaction MAIN 4. Add components 5. Generate PBO /PAI function modules for the first transaction 6. Insert include for MSB macros 7. Insert Customer own coding 8. Add transaction HELLO 9. Add screen 001 in transaction HELLO 10. Add components 11. Generate PBO /PAI function modules for the second transaction 12. Insert Customer own coding 13. Test the application

    3.6.1 Create application 1ST Mobisys Solution Builder is started via transaction /MOBISYS/MSB. In the first screen, you enter the new application name and create it with the button New Application:

    Figure 11: New Application 1ST

    Version 2.0, Date: August 10, 2011 Page 22

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    By pressing the menu button New Application, the Properties window of the application appears. Here, you make entries for the new application as follows:

    Figure 12: Application 1ST properties

    After it is created, the application 1ST is displayed in MSB as follows:

    Figure 13: Display of the application 1ST in MSB

    Note Nr. 5

    You must create the application directly in transaction MSB even if the screens are to be designed with the Mobisys Screen Designer (MSD). It is not possible to create an application with MSD. However, lower-level elements can then be created in MSD.

    Version 2.0, Date: August 10, 2011 Page 23

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    3.6.2 Add transaction MAIN Each application consists of several transactions and the corresponding screens with their components. In order to add transaction MAIN, proceed as follows:

    1. Put the cursor on the line of the application and press the button New (F7). 2. Make the following entries in the dialog box that displays:

    Figure 14: Properties of the new transaction MAIN

    3.6.2.1 Add screen 1 Each transaction consists of one or several screens. Next, you have to add a screen to the transaction. For this, put the cursor on the line of transaction MAIN and press the button New (F7), in order to add a new node. By clicking the radio button Child a new screen is created:

    Version 2.0, Date: August 10, 2011 Page 24

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    Figure 15: Creation of a new screen in transaction MAIN First you create a new screen to execute the menu function. From here, you can call a further transaction. For this, enter screen type MNU (Menu). The parameters of the new screen are set as follows:

    Figure 16: Properties of the new screen

    Version 2.0, Date: August 10, 2011 Page 25

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    Note Nr. 6

    The screen type MNU means that in the client, a menu can also be selected using the shortcode. In the client, you can set the shortcode to either 2 digits (default setting) or 3 digits. In this way, a user can enter the numbers 2 and 5 into the main menu directly via the keyboard and the system then immediately calls the screen of menu 25. In the case of an input screen that is not a menu screen, the screen type must not be MNU, as otherwise the screen would be processed immediately after entering 2 (or 3) characters.

    3.6.2.2 Add components Each screen is composed of one or several components, which you must add after this. For this, put the cursor on the line of the initial screen 001 Main menu and press the button New (F7). After this, you select the component.

    Figure 17: Selection of component as subordinate element of the screen (Child) n the next step, you have to specify the component type. In this example, a button is to be inserted, for which you select the component type Button.

    Figure 18: Selection of component type Button

    Version 2.0, Date: August 10, 2011 Page 26

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    After this, you enter the properties of the component in the following dialog box:

    Figure 19: Properties of a component (button BTN_BACK)

    All further components are added in the same manner. Further components that you can add to a screen are: ID Type D Element Data type Event Description Layout Tab X Y L H BTN_WA Button WA Y_HEADERBUTTON 50 0 90 30 BTN_USER Button User Y_HEADERBUTTON 140 0 100 30 BTN_HELLO Button Calling a transaction

    HELLO 10 Hello MSB Y_SHORTINFO 1 8 140 224 30 LBL_TEXT Label Hello MSB Y_MESSAGE_WINDW 5 70 230 100 LBL_SHORTINFO Label Short info Y_MESSAGE_WINDW 0 304 240 16 Figure 20: Screen elements of Screen 1 in transaction MAIN

    Version 2.0, Date: August 10, 2011 Page 27

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    An overview of the components for transaction MAIN could have the following appearance:

    Figure 21: Components for Screen 1 of transaction MAIN

    3.6.2.3 Generate PBO/PAI function modules After you have added all the components for this screen, you can generate the PBO and PAI function modules. For this, put the cursor on the line of the initial screen 001 Main menu. After this, press the Generate PBO/PAI button (Ctrl+F5). This automatically generates the following two function modules:

    Z_MSB_1ST_MAIN_001_PBO Z_MSB_1ST_MAIN_001_PAI

    In addition, the following two includes are generated:

    Z_MSB_1ST_MAIN_PBO_ENTRY Z_MSB_1ST_MAIN_PBO_EXIT

    3.6.2.4 Insert include for MSB macros Includes that you can use within your own programming are also delivered with the MSB. Ready-made standard macros are located in the include /MOBISYS/MSBMAKROS. For this, enter the include in the TOP-Include (LZ_MSB_1STTOP) of the function group as follows: FUNCTION-POOL z_msb_1st. "MESSAGE-ID.. *include msb macros INCLUDE /mobisys/msbmakros. Figure 22: Including an MSB macro You can get further information on the MSB macros and the corresponding coding in Chapter 7, MSB Macros.

    Version 2.0, Date: August 10, 2011 Page 28

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    3.6.2.5 Insert customer own coding Now you can insert your customer-specific programming logic (customer own coding). For this, put the cursor on the line of the screen 001 Main screen and click the button Inbound processing (Strg+F1) or the button Outbound processing (Strg + F2). Your own source text has to be inserted between the two marks >>> Begin of customer own coding >>> and > * Data section DATA: lv_msgtxt TYPE msgtx. * Read message text from message class MESSAGE e000(z_msb_1st) INTO lv_msgtxt. * Use macro set_comp to set the description of the component set_comp 'DESCR' 'BTN_USER' i_user. set_comp 'DESCR' 'BTN_WA' sy-sysid. set_comp 'DESCR' 'LBL_TEXT' lv_msgtxt. * >> *

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    Figure 25: Add transaction in MSB

    After entering the transaction data, you can add the individual screens.

    3.6.3.1 Add screen 001 A screen 001 is also added to this transaction. This time however it is a standard screen (Screen type= STD). Proceed as follows:

    1. In the tree structure of the MSB, put the cursor on a transaction and click on the button New. Alternatively, you can double-click on a transaction line.

    2. In the first dialog box, select Screen. 3. Make the following entries in the dialog box that displays:

    Figure 26: Add new screen

    Version 2.0, Date: August 10, 2011 Page 30

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    3.6.3.2 Add component In the new screen, you add the following components: ID Type Data

    Element Data type Event

    Description Layout Tab X Y L H BTN_BACK Button Call screen1ST/MAIN/001 ESC Y_HEADERBUTTON 0 0 50 30 BTN_WA Button Work area Y_HEADERBUTTON 50 0 90 30 BTN_USER Button User Y_HEADERBUTTON 140 0 100 30 LBL_TITLE Label 10 My first Y_LABELNORMAL 0 32 240 16 LBL_CAP_DATUM Label Date: 5 60 90 23 LBL_DATUM Label - Y_DATA_SHOW 100 60 130 23 LBL_CAP_UZEIT Label Time: Y_LABELNORMAL 5 88 90 23 LBL_UZEIT Label - Y_DATA_SHOW_R 100 88 130 23 EDT_S1 Edit Field BASMN Enter Summand 1. Y_INPUT_CHAR 1 100 168 130 23 LBL_CAP_S1 Label Summand 1: Y_LABELNORMAL 5 172 95 23 EDT_S2 Edit Field BASMN Enter Summand 2. Y_INPUT_CHAR 2 100 196 130 23 LBL_CAP_S2 Label Summand 2: Y_LABELNORMAL 5 200 95 23 LBL_LINE Label - Y_LINE_BLACK 5 225 230 2 LBL_CAP_SUMME Label Total: Y_LABELNORMAL 5 228 90 23 LBL_SUMME Label BASMN - Y_DATA_SHOW 100 228 130 23 BTN_SUMME Button Individual event TOTAL Calculate total Y_OKBUTTON 3 5 256 230 30 LBL_MESSAGE Label Status message Y_MESSAGELINE_G 0 288 240 16 LBL_SHORTINFO Label Short info Y_SHORTINFO 0 304 240 16 Figure 27: Components to be added

    Version 2.0, Date: August 10, 2011 Page 31

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    The following screen provides an overview of the components created for transaction HELLO:

    Figure 28: Elements of a transaction

    3.6.3.3 Generate PBO/PAI function modules After you have added all the components for this screen, you can generate the PBO and PAI function modules. For this, put the cursor on the line of the initial screen 001 Main menu. After this, click the button Generate PBO/PAI (Strg+F5), through which the following two function modules are generated:

    Z_MSB_1ST_HELLO_001_PBO Z_MSB_1ST_HELLO_001_PAI

    3.6.3.4 Insert customer own coding Now the customer-specific logic (customer own coding) can be programmed as follows. * >>> Begin of customer own coding >>> * Data section DATA lv_datum(10) TYPE c. DATA lv_uzeit(8) TYPE c. DATA ls_values TYPE /mobisys/msb_str_value_in. * store date into lv_datum CONCATENATE sy-datum+6(2) '.' sy-datum+4(2) '.' sy-datum+0(4) INTO lv_datum. * store time into lv_uzeit CONCATENATE sy-uzeit+0(2) ':' sy-uzeit+2(2) ':' sy-uzeit+4(2) INTO lv_uzeit. * Use macro set_comp to set the description of the component

    Version 2.0, Date: August 10, 2011 Page 32

  • Mobisys Solution Builder Release 3.60 My first MSB application Working with transaction MSB

    set_comp 'DESCR' 'BTN_USER' i_user. set_comp 'DESCR' 'BTN_WA' sy-sysid. set_comp 'DESCR' 'LBL_DATUM' lv_datum. set_comp 'DESCR' 'LBL_UZEIT' lv_uzeit. set_comp 'DESCR' 'LBL_SUMME' lbl_summe. * Set focus to a component * Hint for MSB 360 SP 3: Use macro set_focus to do this IF e_msgtyp = 'E' AND NOT edt_s1 IS INITIAL AND edt_s2 IS INITIAL. ls_values-compid = '__FOCUS_COMP'. ls_values-cvalue = 'EDT_S2'. APPEND ls_values TO values. ENDIF. * >> * DO 1 TIMES loop makes it possible to use an EXIT command. DO 1 TIMES. * Check event type IF i_eventtype = 'EVT'. CASE i_event. * Check event 'SUMME' WHEN 'SUMME'. * Check value of edt_s1 IF edt_s1 IS INITIAL. * Generate error message if value is initial MESSAGE e001(z_msb_1st) INTO e_msgtxt. e_msgtyp = 'E'. EXIT. "leave the DO 1 TIMES loop ENDIF. * Check value of edt_s2 IF edt_s2 IS INITIAL. * Generate error message if value is initial MESSAGE e002(z_msb_1st) INTO e_msgtxt. e_msgtyp = 'E'. EXIT. "leave the DO 1 TIMES loop ENDIF. * Generate success message lbl_summe = edt_s1 + edt_s2. MESSAGE s003(z_msb_1st) WITH edt_s1 edt_s2 lbl_summe INTO e_msgtxt. e_msgtyp = 'S'. ENDCASE. ENDIF. ENDDO. *

  • Mobisys Solution Builder Release 3.60 My first MSB application MSB Client

    3.7 MSB Client The newly created application can be tested with MSB Client. In the TCP/IP configuration of the MSB Client, you have to enter the connection data to the SAP system and the name of the application in the system configuration. Note Nr. 7

    The installation and configuration of the MSB Client is described in the document MSB Client. You also have to set up the user data with which the logon is to be carried out, in the MSB User Management screen. Furthermore, the device has to be activated in the MSB device management screen. Note Nr. 8

    The configuration of the MSB Device and MSB User Management are described in Section Manage Devices and User Maintenance.

    3.7.1 Main menu The sample main menu created displays as follows:

    Figure 31: Main menu in MSB Client From here, you can either log off again (ESC button) or you can start the transaction HELLO MSB (button 10).

    Version 2.0, Date: August 10, 2011 Page 34

  • Mobisys Solution Builder Release 3.60 My first MSB application MSB Client

    3.7.2 Transaction Hello MSB In transaction HELLO MSB you can enter a number in the two input fields. When you press the Calculate total button, the total is calculated and output.

    Figure 32: Sample transaction screen

    Figure 33: Results of the sample transaction

    Version 2.0, Date: August 10, 2011 Page 35

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Overview

    4 Creating an MSB application

    4.1 Overview This chapter contains detailed information on the creation of an MSB application. In the chapters after this, the following information is provided:

    Chapter 5 describes the MSB administration functions. Chapter 6 describes Automatically generated objects of an MSB application.

    4.2 Introduction With the Mobisys Solution Builder (Transaction MSB), you can define a complete application that is to be executed on mobile or stationary devices. This application can be operated by any number of users and with all sorts of different mobile devices. For example, the complete warehouse management can be mapped as an application for the warehouse staff in this way. Perhaps other staff should also be able to manage equipment. This equipment management is then usually mapped in a second application. Another scenario to create your own application would be, for example, also a test application, in which you want to test a specific feature only once without influencing the existing application(s). An MSB application contains one or several transactions, which each process an independent partial process of the application. In the case of warehouse management, this would be, for example, one transaction each for stock putaway, stock transfer and stock removal. Often menu control is desired for an application program, with which one can navigate within the individual transactions. This menu control is normally then implemented in the form of a company-specific transaction. Access to the transactions can be controlled specifically by the MSB authorization management if required. The application can therefore be tailored very simply to specific users, since menu options for transactions which the user is not allowed to use are automatically hidden. Each transaction is represented by one or several Screens that are displayed on the mobile device. They can be either simple menu screens or complex processing screens. The different MSB components are placed on the screens to define the appearance of the screen. Typical MSB components on a screen are buttons, input fields and output fields. However also lists, combo boxes, radio buttons and checkboxes are included. The appearance of each component can be influenced, since a specific layout, which controls the display, is assigned for each one. Each of the components has a variety of attributes which can control the appearance and also the behavior of the component. The design of the screen can be carried out directly in transaction MSB. However, for this task specifically, there is the Mobisys Screen Designer (MSD), which permits MSB screens to be created easily by means of a graphic interface.

    Version 2.0, Date: August 10, 2011 Page 36

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Introduction

    Note Nr. 9

    The use of the Mobisys Screen Designer (MSD) is described in the document Mobisys Screen Designer. Alongside this static option to determine the appearance of the screen, there is also a dynamic component. For each screen there is a PBO function module (Process Before Output), which is automatically generated by MSB and which can be individually adapted in the SAP system. As a result, for example, output fields can be displayed with a specific output text or lists can be filled with the required list content. This information is sent to the mobile device by the MSB, which shows the screen on the display and which is now waiting for user input. The flow logic of an MSB screen is based on an event-driven processing of the user inputs on the mobile device. An event, which triggers a request to the connected SAP system, can be stored for many MSB components. For example, in the case of a button if it was pressed, or in the case of an input field if a user input was carried out, or a barcode was scanned and the entry was completed by pressing ENTER. This request is forwarded to the PAI function module (Process After Input) of the corresponding screen. These screen inputs and events are processed here. The PAI function module is also generated automatically by the MSB, and can be enhanced individually in the SAP system. Typically, the required posting processes are carried out here. The manner in which the subsequent processing should be carried out is specified here. The result of this processing can be assigned to the MSB components and the subsequent screen can be determined dynamically.

    Version 2.0, Date: August 10, 2011 Page 37

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    4.3 Define application The Mobisys Solution Builder is called with transaction /MOBISYS/MSB. Note: In the OK Code input field, you have to enter an /n before the transaction.

    Figure 33: Initial screen of Mobisys Solution Builder

    You can execute or only display an application, as well as create an application from scratch, or delete an application. Via the button MSB Administration you access the administration functions. With the Basic settings of MSB, you can configure whether locks are set when processing an application, and therefore no other user can process this application at the same time. For this, you have to add the settings parameter ENQUEUE_MSB to table /MOBISYS/MSBSETT and set the attribute at X.

    4.3.1 Create application To create a new application, enter the name of the application and then press the New Application (F5) button. The name should consist of exactly three characters.

    Version 2.0, Date: August 10, 2011 Page 38

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    Figure 34: Create new application

    When creating an application, you must specify the following header information:

    Short description of the application Default language Start transaction: The recommended name of the start transaction is MAIN. Package: The recommended name for the package is: Z_MSB_. Function group: The recommended name for the function group(s) is:

    Z_MSB_. Active: The Active indicator has to be checked, so that the MSB Client can use the

    application. Stateful:

    If the application is to access global variables of the function group or if SAP locks have to be used, then one has to work statefully. Otherwise one works statelessly.

    Device type: The standard device type has to be entered here (for example MSB Client 240x320).

    Version 2.0, Date: August 10, 2011 Page 39

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    Figure 35: Define properties of application 1ST

    Information on the device type In addition to the standard device type, other device types which should be used for this application can also be specified. For each of the device types specified here, the device-dependent data has to be maintained subsequently for the components (such as the position, size, font, etc.). A crucial factor when using additional device types is a different screen size for each device and the resulting option to arrange the components of a screen differently. If, for example, you use devices with a screen size 240x320 (such as Motorola MC9090) and 320x320 (Motorola MC3090), there is no point in adding an additional device type to the

    Version 2.0, Date: August 10, 2011 Page 40

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    application. The scaling function of the MSB Client on the 320x320 device will ensure that the components are distributed automatically over the entire width of the screen. However, if a device with a screen size of 800x600 has been used (for example, for a DLOG Forklift Terminal), an additional device type would undoubtedly make sense. After you have maintained the attributes of the application, a query displays:

    Figure 36: Create package, query

    After the system has created the package, you must maintain the following data:

    Figure 37: Create package, details

    After the package data has been saved, you enter the number of the Workbench request and click on the Next button.

    Figure 38: Create package, Workbench request

    Version 2.0, Date: August 10, 2011 Page 41

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    Now you access the screen with the detail data of the package:

    Figure 39: Change package, attributes

    If the specified function group does not exist yet, you are asked whether it should be created. In the following dialog box, enter the short text for the new function group and the user responsible for it.

    Figure 40: Create function group

    To save the function group, you must specify the package.

    Version 2.0, Date: August 10, 2011 Page 42

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    In the dialog box for the object directory entry, you must specify the package Z_MSB_1ST and save the entry. After this, the query of the workbench request displays. After you have specified the transport order, the application has been created and is displayed in the MSB overview screen.

    Figure 41: Newly created application

    Note Nr. 10

    The namespace, in which the PAI and PBO function modules are created by the program generator, can be specified via the MSB parameter (to be entered in the MSB settings in the MSB_ADMIN transaction). MSB_NAMESPACE_XXX xxx must be replaced by the name of the application. Examples:

    The parameter MSB_NAMESPACE_Y00 for the application Y00 is /Customer/ This leads to all function modules being generated in the namespace /Customer/.

    MSB_NAMESPACE_Y00 = /Customer/ZXX_ This has the effect that all PBO and PAI function modules with the name ZXX_MSB_aaa_sss_ppp are stored in the namespace /Customer/.

    whereby: aaa Name of the application sss Number of the screen (001 to 999) ppp PBO or PAI In this case the package and the function group(s) should also be created in this namespace.

    Version 2.0, Date: August 10, 2011 Page 43

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define application

    4.3.2 Delete application An application can also be deleted again. For example, this might be the case if an application was only created in MSB as a test and is now no longer required. An application may however only be deleted if all assigned transactions were previously deleted (see Section Delete transaction). If this is not the case, deletion is not possible, and an error message appears. If the assigned transactions have been deleted, the following query displays:

    Figure 42: Delete application, query dialog

    The function modules for the application, the function group and the package itself have to be deleted manually in the SAP system. Any open transports have to be released or even deleted beforehand.

    4.3.3 Process / display application When you display or change an application, this application is displayed in a tree structure. The application is on the top level, below it the transactions are displayed, the assigned screens are displayed on the next hierarchy level, and finally the components for these screens are displayed.

    Figure 43: Process application, overview

    Version 2.0, Date: August 10, 2011 Page 44

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define transaction

    4.4 Define transaction Similarly to SAP transactions, an MSB transaction is a logical process that can cover several screens and which is assigned to an MSB application. A transaction has a unique transaction name, a transaction type, a menu number and a start screen. Every transaction can be assigned to an MSB authorization profile. Transactions can also be created with Mobisys Screen Designer.

    4.4.1 Create transaction

    Create a transaction To create a transaction in an existing application, place the cursor on the line Application or on an existing transaction. If the cursor is on another transaction, then you have to select whether you want to create a lower-level screen or a transaction.

    Figure 44: Create transaction (1)

    A dialog box for the entry of the transaction data displays:

    Figure 45: Create transaction (2)

    Version 2.0, Date: August 10, 2011 Page 45

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define transaction

    The following fields have to be maintained here:

    Application The application already has a default setting and cannot be changed.

    Function group The function group only has to be entered if it deviates from the function group already stored for the application.

    Name of the transaction The name of the transaction has to be unique and have a maximum of 10 digits. The name cannot be changed at a later date.

    Short description of the transaction A description of the transaction is stored here.

    Transaction type The transaction type T should always be used here. Transaction type M is obsolete.

    Menu number The menu number corresponds to a speed-dial for the transaction. It can have two or three digits and has to be unique. Alphanumeric characters are also permitted. It permits this transaction to be called directly from a menu screen.

    Start screen The initial screen that is displayed is controlled by the entry in the field Start screen.

    The start screen is normally 001 and only has to be specified if the requested start screen should be a different one.

    Active A transaction can be activated or deactivated with this. The Client can only call active transactions.

    Authorization check The activation of the authorization check permits the assignment of transactions to authorization roles, which can be set up via the MSB Administration functions. These authorization roles are in turn assigned to MSB users.

    Maintain roles With the Maintain Roles button, you can directly access the corresponding MSB Administration screen to maintain the roles. There, the authorization roles are created, to which individual transactions are assigned. Afterwards, through the assignment of the role to a user, you specify which user can use which transaction. The handling is described in detail in Section Maintain Users. Before the authorization roles can be assigned, first save the newly created transaction.

    Figure 46: Create transaction (3)

    Version 2.0, Date: August 10, 2011 Page 46

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define transaction

    4.4.2 Delete transaction

    Delete a transaction A transaction can also be deleted again. For example, this can be the case if a transaction was only integrated into the application as a test and is now no longer required. A transaction may only be deleted if all assigned data definitions have been deleted. If this is not the case, no deletion is possible and an error message appears. If a transaction should no longer be available temporarily, it should not be deleted, but only deactivated (see Create Transaction).

    Figure 47: Delete transaction

    4.4.3 Copy transaction

    Copy a transaction It sometimes happens that a new transaction is very similar to an existing one. In this case, you do not have to create a completely new transaction, but can simply copy it. In order to copy a transaction, put the cursor on a transaction to be referenced. Then click the button Copy.

    Figure 48: Copy transaction

    A selection screen appears, in which you specify whether the corresponding tree structure (that is, all screens with all components) should also be copied. The following applies here:

    You must provide a name for the copied transaction. Afterwards the transaction can be saved. The newly created transaction is then displayed in the application.

    The PBO/PAI function modules of the corresponding screens have to be generated after the copy process and, if applicable, be transferred manually with copy & paste.

    Version 2.0, Date: August 10, 2011 Page 47

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define transaction

    In order to copy transactions and screens, you can also use the report /MOBISYS/MSB_COPY_APPL. In this report, you enter the start and target application, the start and target transactions and optionally, the start and target screens. Then, the screen information and/or the contents of the PAI/PBO function modules is copied in table form. If the coding is copied, then the new function modules are created automatically using the source code. Please note that the definitions of sub-programs and variables which are used globally in function groups must be copied manually.

    4.4.4 Process / display transaction To process or display a transaction, double-click the corresponding transaction. The transaction is displayed and can be processed. The application and the name of the transaction cannot be changed. You can maintain the following fields (see also Create transaction):

    Function group Short description of the transaction Transaction type Shortcut key of the menu entry Start screen Active Authorization check

    Note Nr. 11

    If you want to change the name of the transaction, you can copy it and then insert it with the desired name (see Section Copy Transaction). Subsequently, the PBO/PAI function modules have to be regenerated. The function code can be recopied using copy & paste. Afterwards the original transaction can be deleted.

    Version 2.0, Date: August 10, 2011 Page 48

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define screens

    4.5 Define screens An MSB screen is part of an MSB transaction and is equivalent to a process image, which is displayed on the mobile device. Often there are several screens for one transaction. There are two different types of screens (menu screens and standard screens), which also influence the behavior of the buttons. The appearance of a screen is influenced by the fact that one or more MSB components are placed on the screen (see Section Define component). You also have the option of programming a dynamic screen design and the corresponding flow logic for it. There are two function modules for each screen in which the flow logic can be programmed in ABAP.

    PBO function module (Process Before Output) The screen can be adjusted dynamically here before being displayed on the end device

    PAI function module (Process After Input) Screen inputs and events are processed here and the subsequent screen is determined dynamically.

    You can also create screens using the Mobisys Screen Designer, which is part of the MSB Developer Kit.

    4.5.1 Create screen

    Create a screen To create a screen in an existing application, put the cursor on an existing transaction and then click the Insert Node (F7) button. In the following selection screen, you have to click the radio button Child if you want to create a subordinate screen:

    Figure 49: Add screen (1)

    Version 2.0, Date: August 10, 2011 Page 49

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define screens

    A dialog box for the entry of the screen data is displayed. The following fields have to be filled:

    Figure 50: Add screen (2)

    Make entries in the fields that are not prefilled:

    Application The name of the application has a default setting and cannot be changed.

    Transaction Name of the transaction. The name has a default setting and should not be changed.

    Screen Here you enter the current number of the screen (1 to 999). Duplicate screen numbers within one transaction are not allowed and are reported as errors.

    Description Here you can enter a textual description for the screen.

    Screen type Here you must select either the screen type MNU or STD.

    o MNU stands for Menu screen. Input fields are not allowed here, only buttons and labels are included.

    o If a screen also includes input fields, selection lists, or similar, then select STD for Standard screen.

    Subsequent screen Here you can specify the subsequent screen, which should be called after completing this screen. The subsequent screen can also be set in the PAI function module of the current screen with the parameter E_MASK.

    Rows / Columns The number of the rows and columns available in this screen have to be specified, if you want the screen to be displayed on a browser-based end device.

    Active This field has to be checked to be able to display the screen at all.

    Version 2.0, Date: August 10, 2011 Page 50

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define screens

    Note Nr. 12

    There are two different types of screens (menu screens and standard screens), which among other things also influence the behavior of the buttons and their short codes. Further information is available in the section Shortcodes.

    4.5.2 Delete screen

    Delete a screen A screen may only be deleted if all assigned data definitions were previously deleted. If this is not the case, no deletion is possible and an error message appears.

    Figure 51: Delete screen

    4.5.3 Copy screen

    Copy a screen To copy a screen, a reference screen has to be clicked. Then press the Copy button.

    Figure 52: Copy screen (1), query A selection screen appears, in which you specify whether the corresponding tree structure should also be copied. A new name has to be provided for the copied screen, otherwise the following error message will appear:

    Version 2.0, Date: August 10, 2011 Page 51

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define screens

    Figure 53: Copy screen (2), error message

    For the copied screen, enter a new screen number and a description and save the copy.

    Figure 54: Data to be entered for copying a screen The newly created transaction is then displayed in the application. After the copying procedure, you must generate the PBO/PAI function modules for this screen.

    Figure 55: Copied screen, entry in the screen list of the application

    Version 2.0, Date: August 10, 2011 Page 52

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define component

    4.5.4 Edit / display screen Edit / Display a screen To edit or display a screen, double-click the corresponding screen. The screen is displayed and can be edited. The application, the name of the transaction and the screen number cannot be changed. Therefore the following fields can be maintained (see also Create Transaction).

    Description Screen type Subsequent screen Rows / Columns Active

    Note Nr. 13

    If you want to change the name of the screen, you can copy it and then insert it with the desired screen number (see Copy Screen). After this, the PBO/PAI function modules have to be regenerated. The function code can be recopied using copy & paste. Afterwards the original screen can be deleted.

    4.6 Define component To define an MSB component, it first of all has to be created for a screen. For this, you have to select a component type. Then you enter the device-dependent and device-independent data. The appearance of the component is influenced via layouts, and you can determine whether an action should be triggered via events.

    4.6.1 Create component

    Create a component To create a component in an existing application, position the cursor on an existing screen and click the New button. In the following selection screen, you have to click the radio button Child if you want to create a subordinate component: Next you have to select the component type.

    Figure 56: Add component Figure 57: Specify component type

    You can find a description of the available component types in Section Component Types.

    Version 2.0, Date: August 10, 2011 Page 53

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define component

    After selecting the requested component type, a dialog box appears in which you enter the component data:

    Figure 58: Device-independent component data

    4.6.2 Device-independent component data

    Field Meaning

    Application Name of the application Transaction Name of the transaction Screen Screen number Component type Type of component Component ID Unique identifier of the component Global data field Indicator whether component is valid for all transactions Data element Data element to be used Data type Data type of the date element Length Length of the date element Decimal places Number of decimal places of the data element Group Group name for selection buttons (Radio buttons) For comp. Definition of component for a list box Comp. value The entered value of a component Value list Specification of the value list (see Section Value list) Event Specification of the event (see Section Events) Language Language selection (see Section Multilingual capability)

    Version 2.0, Date: August 10, 2011 Page 54

  • Mobisys Solution Builder Release 3.60 Creating an MSB application Define component

    The following data has to be maintained regardless of the component type:

    Field Value

    Application (set a