PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Principle
  • Implementation
  • Serialization
  • Format of strings
  • Deployment
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Accessing SAP data from mobile devices
Overview
WINDEV and WEBDEV include a native access to SAP. The WINDEV applications and the WEBDEV sites directly communicate with the SAP functions, the BAPIs.
You can also allow a WINDEV Mobile application to access the BAPIs.
Principle
A WINDEV Mobile application cannot directly access the BAPIs. However, you can allow the WINDEV Mobile application to access the SAP data via a WINDEV application. This dialog can be performed by a system of sockets. The WINDEV application runs the BAPIs requested by the WINDEV Mobile application.
The communication between the WINDEV Mobile application and SAP is performed in three steps:
  • The WINDEV Mobile application sends requests to the WINDEV application.
  • The WINDEV applications waits for the requests made by the WINDEV Mobile application. Each request is processed and the result is returned to the WINDEV Mobile application. The SAP client layer must be found on the computer that runs the WINDEV application.
  • The WINDEV Mobile application receives and processes the result of BAPI execution (one thread and one SAP connection per mobile device).
Each consulted BAPI must be coded in the WINDEV application.
Implementation
The WINDEV application communicates with SAP via the SAP functions of WLanguage.
Reminder: To use a BAPI in a WINDEV application:
  1. Start the wizard via "Workshop .. SAP .. Use a SAP function".Start the wizard: on the "Project" pane, in the "Project" group, expand "Import" and select "A SAP function".
  2. Enter the parameters for connecting to the SAP server.
  3. Choose the BAPI to import.
WINDEV automatically generates the procedure for calling the BAPI as well as the declarations of variables and structures. See Native SAP Access for more details.
Then, the result of BAPI execution must be communicated to the WINDEV Mobile application via the sockets, by using SocketWrite.

Serialization

When the BAPI result is a complex variable (array or structure), this result must be serialized before it is communicated to the WINDEV Mobile application.
The serialization is performed by Serialize. The WINDEV Mobile application must deserialize the result of reading via Deserialize.

Format of strings

The format of the character strings differs on a PC and on a Mobile device: by default, A Mobile application supports the character strings in Unicode format while a Windows application supports the character strings in Ansi format.
If the test of the Mobile application is run on a Pocket, the strings read must be converted:
No conversion is required if the test of Mobile application is run in simulator mode.
Deployment
To implement the two applications, you must:
  • Start the WINDEV application on a computer that can access a SAP server and that is accessible from the mobile device (via Wi-Fi for example). The WINDEV application is waiting for a communication request.
  • Start the WINDEV Mobile application on the Mobile device and specify the parameters for connecting to the SAP server.
  • Enter the IP address of the server or the URL containing the name of the server and establish the connection.
Once the connection is established, the mobile application can communicate with SAP.
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment