Principle and advantages of the interface

Some features in CIS mobile make use of the SAP GUI scripting functions that can be called directly from VB.NET. Therefore a comfortable interface is provided that can read data, from inputfields for example. Complete tables can also be read relatively quickly. Transactions can be executed and thereby normal user interactions with the SAP GUI can be simulated.

The advantage is that all actions will be checked by the SAP system as usual: Permission checks will be carried out automatically, messages from the SAP GUI will also be displayed at the HTML frontend, etc.

A more detailled description of the interface can be found here: GUI Scripting in VB


Where does cis mobile make use of the interface?

The inteface is mainly used wherever complex data inputs are required as opposed to cases where data only needs to be displayed, as fast as possible. The cases concerned are creating and modifying orders, contacts, visits etc. But of course the interface can also be used to display normal data: The table of partners can be viewed almost as fast as it would take by using the other interfaces.

The following example shows a message from the SAP GUI displayed in CIS mobile on checking an order:

  

What does the code look like?

The following code example shows how transcation VA02 (change orders) is called. The number of the order is put into the field VBELN and enter is initiated.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
    Public Sub start_va02()

        'Logon to SAP-GUI
        If s10cis.sapgui Is Nothing Then
            s10cis.sapgui = New sapguisession(s10cis.sapconnect,
            s10cis.sapconnectclient, s10cis.sapconnectuser, _
            s10cis.sapconnectpassword, ic.Session.Language)
            s10cis.sapgui.Logon()
        End If

        Dim sapgui As sapguisession = s10cis.sapgui

        ' start transaction VA02
        enter("/NVA02")

        sapgui.SetField("VBAK-VBELN", vbeln)

        enter()


    End Sub

The transaction is executed with the user that has logged on to CIS mobile and therefore also to the SAP GUI. As an alternative, any common user can be used by providing logon credentials in the CIS mobile settings.