Liquid UI - Documentation - 4.02 WS Development Rules

4.02 WS Development Rules


In this article, you will learn how to develop WS scripts to customize the SAP screens using Liquid UI WS. You can run the WS scripts either using Liquid UI WS or Liquid UI Server.


Prerequisites


SAP screen script file naming convention

WS file name should include the program name and dynpro number of the SAP screen, the scripts is used to link the scripts,to the SAP screen. You can find the dynpro name/program name, dynpro number of an SAP screen in your SAP GUI, as shown below:

 
 
 

Note: You can also use WS system variables to find the SAP screen program name and dynpro number.

 

Script file naming convention of an SAP Easy Access screen is defined as follows: SAPLSMTR_NAVIGATION.E0100.sjs

The elements in the SAP screen script file name are explained in detail:

SAPLSMTR_NAVIGATION: Dynpro name of the SAP screen
E: Language key
0100: 4 digit dynpro number
sjs: file extension


Liquid UI Server script file name for an  App

Script file names indicate the module, package, role, and program for each screen designed. Liquid UI will push screens onto a stack while navigating from one screen to another. Liquid UI, at any point, can draw the screen to the top of the stack on the stopped screen. This is how Liquid UI WS scripts are linked to SAP screens. This also allows Liquid UI to draw different layouts on the same screen based on the scenario and logical reasoning.

screenname_module_package_prog.sjs, where

screenname: Application for which screen is created
module: Module for which screen is created
package: User group or package
prog: Screen description or program


Function script file naming convention

The functions scripts are loaded into the system inside the esession.sjs file and should be loaded before executing the actual processes. For screen processes,  the functions are called from various processes listed in function script files. In any application, The following naming convention is used for naming the typical Liquid UI WS function scripts.proc_app_module_package_prog.sjs

proc_app_module_package_prog.sjs

proc: Indicates a process file, and not a screen file
app: Application for which processes are written
module: Module for which processes are written
package:

User group or package

prog: Generic process (prog) group for all functions in a file


Functions

Functions in WS script facilitates the synchronization of data with SAP Screens. This simplifies multiple screen navigation and screen level data validation.

The naming convention for functions:

Function proc_app_module_package_prog()

{
//code here

}

Variable Naming Convention:

The naming convention for variables:

z_tcode_field  
z Used as a variable prefix
tcode Lower case transaction code
  (Example: ie03 for display equipment)
field Lower Case field name referring to SAP field

(Example: selected quiz for referring to equipment number)

z_ie03_selectedEquip variable is used to save the selected equipment number.

 

Note: Variable names are case sensitive.

 

WS scripts in different SAP languages

In SAP GUI, English is the default language that displays on the SAP screen. You can change the language on your SAP screens and can also customize the screens using WS scripts. These scripts are language-dependent. Therefore,  you need to use either technical names or the label names of the screen elements in the same language.

While saving your script file, you need to verify the language key and update the screen script file name to help the system identify the language that is used in the script file. You can add no language key option in the guixt.sjs file to avoid adding a language key in your script file name.

In this scenario, you will learn how to change the language to Spanish in the SAP GUI, and create a script file for the Spanish language.

  1. Open SAP GUI, enter credentials and edit language code as ES (Spanish) in the SAP Logon screen and click enter.
     

     
  2. You will be navigated to the SAP Easy Access screen and will find all the text in Spanish on the SAP screen.
     

     
  3. Enter VA02 in the command field to navigate to the Change Sales Order screen.
     

     
  4. Delete the three input fields using their label names, namely Entrega, Nº pedido cliente, Solicitante, and Criterios de búsqueda.
     
    //Deletes unnecessary screen elements on the SAP screen.
    del("F[Entrega]"); del("G[Criterios de búsqueda]",{ "box":true}); del("F[Nº pedido cliente]"); del("F[Solicitante]");
     

     
  5. Change the position of the three input fields using their label names, namely Doc.facturación, Material, and Elemento PEP.
     
    //Changes the position of the desired input fields.
    pos("F[Doc.facturación]", [4,1]); pos("F[Material]", [6,1]); pos("F[Elemento PEP]", [5,1]);
     

     
  6. Change the position of the pushbutton using its technical name, as shown below:
     
    //Changes the position of the pushbutton.
    pos("P[BT_SUCH]", [2,59]);
     

     

Can't find the answers you're looking for?