Recent Posts

Pages: [1] 2 3 ... 10
WS (Web Scripts) / Liquid UI System Variables – _dynpro/_language/_program
« Last post by Sai Siddhartha on January 11, 2018, 07:14:18 AM »
 A dynpro is the actual SAP program name. each SAP program is identified by a dynpro number. Examples of dynpro numbers are the following:
The dynpro is used with the language code and the program name to identify a given SAP screen.
The _dynpro variable is used to find which dynpro is currently being accessed or to perform operations based on a particular dynpro number.
In our example, we will simply find out which dynpro we are accessing and output that information to the console.

The _language variable is used to return the current language code of a given implementations.
If users are operating in different languages, this variables is useful for  specifying the different files or different operations for different users based on language.
To find the current language and output that information to the console, we would write the following:
println(“The language is >>”+_language);

Everyday dynpro has a program name associated with it, as shown in the following examples:
The _Program variable returns the program name for the current screen.
To return the current program number to the console, the following code can be used.
Println(“program is >>”+_program);

Liquid UI Code:
////////////////////////////// SAPLSMTR_NAVIGATION.E0100.sjs //////////////////////////////

println("name of the current screen is  >>"+_program+"."+_language+""+_dynpro); // display output on console window

Name of the .sjs script files is made up of these variables.
you can see output similar to the name of script file currently in process on cornelius output window.
Purpose: To remove the applied license.
1. Navigate to the connection list screen.
2. To the top corner, click on the three horizontal lines (Settings).
3. Click on the option "App Settings".
4(a). For IOS, click "Remove License".
4(b). For Android, long press on the license area and click on "Remove".

See attachments for further reference.
WS (Web Scripts) / LiquidUI – tablewidth Command
« Last post by Sai Siddhartha on December 28, 2017, 04:52:02 AM »
With tablewidth(), you can change the width of a table control in SAP. This command can be used only with native SAP tables.


     Tablename – name of a SAP table.
     X -  specified new width for SAP table

Note: “X” is replaced by the numerical value which specifies the new width for the table. The width specifies the number of characters.

Below example demonstrates the tablewidth command on “All items” table of “VA01” transaction.
Navigate to second screen of “VA01” transaction where we have “All tems” table and below enter below code in script file of this screen.

Liquid UI Code:
//////////////////////////// SAPMV45A.E4001.sjs //////////////////////////////

tablewidth("T[All items]", 50);

See attachment for screenshots
Purpose: Increase or Decrease or Change SAP Screen Font Size in Liquid UI for iOS.

Steps to follow to perform the desired on Liquid UI iOS App:

Step 01: Login to any SAP server or Demo Server.
Step 02: Tap on the right bottom corner of the Liquid UI screen on the iOS device, on SAP Server name.
Step 03: A menu pop's up, which has Font Selection.
Step 04: Tap on Font Selection item, which opens a window.
Step 05: Select the desired Font from the list, and Tap OK.
Step 06: The pop up window closes and the Font on the Screen changes.

See the attached for screenshots
Purpose: To clear the Transaction and Input Field Entry from Liquid UI iOS App cache.

Steps to Clear the Transaction Entry Cache:

Step 01: Start Liquid UI for iOS App on the iOS device.
Step 02: Connect to any SAP Server from the connection list.
Step 03: Tap on the Transaction Entry field, and input a character.
              Eg: "/".
Step 04: A list of entries show up on the screen. (Refer to Image 1 Below)
Step 05: Tap and Swipe left on any desired entry. (Refer to Image 2 Below)
Step 06: There will be an option to delete the entry.
Step 07: Tap on "Delete", and the entry is deleted from the cache.

Check the below screenshots
Image 1                                                                               Image 2

Steps to Clear the InputField Entry Cache:

Step 01: Start Liquid UI for iOS App on the iOS device.
Step 02: Connect to any SAP Server from the connection list.
Step 03: Navigate to desired Transaction.
Step 04: Tap on the InputField, and perform a space or backspace.
Step 05: A list of entries show up on the screen. (Refer to Image 3 Below)
Step 06: Tap and Swipe left on any desired entry. (Refer to Image 4 Below)
Step 07: There will be an option to delete the entry.
Step 08: Tap on "Delete", and the entry is deleted from the cache.

Check the below screenshots
Image 3                                                                               Image 4
     This feature helps the user further validate the report by uploading their signature in key business scenarios as proof of authentication.
1. Navigate to any transaction which has SFO like IW24.
2. To the top right corner on the screen, one will see SFO - symbolically a paper clip, Hence Tap on it to select the option "Create Attachment".
3. Select the option "signature" from the pop-up list.
4. Draw the signature within the empty area and click on "Done".
5. Enter the file name for signature and click on "Done".
6. A success message will appear on the screen.

See attachments for further reference.
WS (Web Scripts) / Data Dependent Views
« Last post by Sai Siddhartha on December 21, 2017, 06:47:35 AM »
Data dependent viewing ability enables user might have a number of files, named with different names.
If a user enters a value in a given inputfield the file linked to that field would be displayed.

This functionality allows you to use variables to specify the file names.
To demonstrate this functionality, please do the following.
1.   Create several files, naming them ‘img0005001’,’img0005002’,’img0005003’.
2.   Enter below code in file ‘'SAPSLMTR_NAVIGATION.E0100.sjs’.

Liquid UI Code
/////////////////////////// 'SAPSLMTR_NAVIGATION.E0100.sjs’ //////////////////////////

del("X[IMAGE_CONTAINER]");  // deletes image
inputfield([1,5], "Material Number", [1, 31], {"name":"z_matno", "size":20});  //field to specify file name to open
pushbutton([TOOLBAR], "View Files", {"process":z_view});  // executes function on click

function z_view() {
     view("img&V[z_matno].txt");  // view command take value field variable

See attachment for more information and screenshots
WS (Web Scripts) / Validate file/folder exists
« Last post by Benjamin Dasari on December 18, 2017, 11:08:58 AM »
Checks if a file or folder exists in the specified location.

system.queryExists("file/folder path");

Liquid UI Code:
Script File Name: SAPLSMTR_NAVIGATION.E0100.sjs       // Easy Access
function isBlank(jvar){
   return(jvar == null || jvar == "" || jvar == void(0));

function fileRead(){
   // Check if the file/folder exists or not and returns boolean
      message("E: Cannot find the file to be read");
      goto SCRIPT_END;

   openfile('file.txt', {"delimiter":","});
      readfile('file.txt', {"z_first_&V[idx]":true, "z_second_&V[idx]":true, "z_third_&V[idx]":true});

   set("V[z_currField]" , "&V[z_first_&V[idx]]");
   if(isBlank(z_currField)) {
      goto FILE_END;

   goto READ;

// User Interface
pidx = 0;

text([0,0],  "Material" , {"size":20});
text([0,22],  "Item" , {"size":20});
text([0,44],  "Description" , {"size":20});

   inputfield([pidx + 1,0], {"size":20, "readonly":true, "name":"z_first_&V[pidx]" ,"nolabel":true});
   inputfield([pidx + 1,22], {"size":20, "readonly":true, "name":"z_second_&V[pidx]" ,"nolabel":true});
   inputfield([pidx + 1,44], {"size":20, "readonly":true, "name":"z_third_&V[pidx]" ,"nolabel":true});

set("V[z_checkfld]", "&V[z_first_&V[pidx]]");
   goto END;

goto CREATE;

See attachments for code samples!
WS (Web Scripts) / System variable - _directoryN
« Last post by Benjamin Dasari on December 14, 2017, 11:44:32 AM »
_directoryN is a system variable used to check the location of the scripts in the specified directory.
"N" should be replaced with the directory number, i.e., either 0 to 4.
This can serve as a quick lookup to find out the scripts location as compared to finding it out by navigating to the guixt.sjs file in SAPgui folder.

_directory1 returns the location specified under directory1 in guixt.sjs (config) file.

You can type the below command in the SAPgui command field(tcode field) and it will return the path on the status bar.
WS (Web Scripts) / Liquid UI system variables "_page.exists" & "_client"
« Last post by Sabir Mohammad on December 14, 2017, 09:07:45 AM »
_page.exists: It is used to verify whether a given tab or page is actually present in a transaction.
_client: It is used to find the SAP client and output it to the console window.

LiquidUI Code:
    Below code demonstrates the usage of above system variables on VA01 transaction.
---------------------------- SAPMV45A.E4001.sjs -------------------------------
if(_page.exists("Sales")){           //verifying whether the sales tab exists
       set("F[Sold-to party]", "1460"); //Assigning the value to the field
println(" SAP system client is:" + _client); //Displaying output on console window
Pages: [1] 2 3 ... 10