Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ashfaq Ahmed

Pages: [1] 2 3
1
Purpose: Displaying Object Data into Liquid UI Table:

This is useful for displaying object data (e.g., in JSON format) that can be read and shown directly in a Liquid UI table, making it easier to visualize structured data such as event logs, device information, and analytics data.

Please follow the below steps:

Step-1: Open the Script file "SAPLSTMTR_NAVIGATION.E0100.sjs" or Create it if it is not present in the WS Directory as configured in the "guixt.sjs" file.

Step-2: Add the below Code Snippet and Save it.

//Deleting the Screen Controls
//Liquid UI Code:
del("X[IMAGE_CONTAINER]");

//Design Screen
if(z_flag==1){
   title("Event Data  - Screen Modified using Liquid UI");
   text([8,1],"Total Count: &V[totalRows]");

    // Create a new table with the appropriate number of rows based on results length
    table([1, 1], [4, 96], { "name": "event_table", "title": "Event Data", "rows":totalRows,"rowselection":true,"columnselection":true});

    // Add columns to the table
    column("Sl.No", { "size": 5, "name": "slno_column" });
    column("Timestamp", { "size": 25, "name": "timestamp_column" });
    column("Device ID", { "size": 25, "name": "deviceid_column" });
    column("Temperature (Sample)", { "size": 18, "name": "temperature_column" });
    column("Temperature (Alert)", { "size": 15, "name": "alert_column" });

   // Populating the Liquid UI table with the extracted data
    for(var j=0;j<totalRows;j++){
      event_table.slno_column[j] = Eventdata[j][0];
      event_table.timestamp_column[j] = Eventdata[j][1];
      event_table.deviceid_column[j] = Eventdata[j][2];
      event_table.temperature_column[j] = Eventdata[j][3];
      event_table.alert_column[j] = Eventdata[j][4];
   }
}


//Defining the Eventdata Array and Processing Results
function GetEventData(){
   // Task Event Data
   var objTaskEventList = {
    "results": [
        {
            "type": "beacon",
            "event": {
                "id": "a308c3f0-bf50-4180-a315-6f5f91a5decc",
                "timestamp": "2024-10-25T15:39:21Z",
                "deviceId": "59b0e8c2-87c4-4109-9b4c-bead14ed1f97",
                "data": {
                    "format": "beacon",
                    "id": "DLN233301440",
                    "rssi": -46,
                    "value": "17.59"
                }
            },
            "analytics": {
                "tenant": "f9339f76a7f1143dc30f587a46e09a6e",
                "recordedTimestamp": "2024-10-25T15:39:37.618Z",
                "resourceId": "db8597cd-6176-415c-bff4-90583a77f9a6",
                "timestamp": "2024-10-25T15:39:21Z",
                "meta": {
                    "data": {
                        "taskId": "3aabc8ea-00f1-4780-9256-817f024d0bd3",
                        "task_alarm": false,
                        "notes": "",
                        "assetIds": []
                    }
                },
                "coordinates": {
                    "global": {
                        "lat": 37.522003,
                        "lng": -121.953835
                    }
                }
            },
            "decode": {
                "temperature": {
                    "sample": 17.59,
                    "deviation": 0.0,
                    "format": "celsius",
                    "taskId": "3aabc8ea-00f1-4780-9256-817f024d0bd3",
                    "alert": false
                }
            }
        },
        {
            "type": "beacon",
            "event": {
                "id": "b32a6d08-cffc-4fd3-b1bb-06a3218a1c2c",
                "timestamp": "2024-10-25T15:38:51Z",
                "deviceId": "59b0e8c2-87c4-4109-9b4c-bead14ed1f97",
                "data": {
                    "format": "beacon",
                    "id": "DLN233301440",
                    "rssi": -46,
                    "value": "17.59"
                }
            },
            "analytics": {
                "tenant": "f9339f76a7f1143dc30f587a46e09a6e",
                "recordedTimestamp": "2024-10-25T15:39:37.618Z",
                "resourceId": "db8597cd-6176-415c-bff4-90583a77f9a6",
                "timestamp": "2024-10-25T15:38:51Z",
                "meta": {
                    "data": {
                        "taskId": "3aabc8ea-00f1-4780-9256-817f024d0bd3",
                        "task_alarm": false,
                        "notes": "",
                        "assetIds": []
                    }
                },
                "coordinates": {
                    "global": {
                        "lat": 37.522003,
                        "lng": -121.953835
                    }
                }
            },
            "decode": {
                "temperature": {
                    "sample": 17.59,
                    "deviation": 0.0,
                    "format": "celsius",
                    "taskId": "3aabc8ea-00f1-4780-9256-817f024d0bd3",
                    "alert": false
                }
            }
        }
    ]
};
   Eventdata = [];
   totalRows = objTaskEventList.results.length;

   // Values Containing all relevant data for each record
   for (var j=0,idx=1;j<totalRows;j++,idx++) {
      var result = objTaskEventList.results[j];
      var Values = [
         idx,  // Sl.No
         result.event.timestamp, // Timestamp
         result.event.deviceId,   // Device ID
         result.decode.temperature.sample,  // Temperature (Sample)
         result.decode.temperature.alert    // Temperature (Alert)
      ];
      Eventdata.push(Values);
   }
   set("V[z_flag]","1");
}

// Calling the function to display the event data
pushbutton([TOOLBAR],"@6S@Get Event Data","?",{"process":GetEventData});

Refer to the Attachment for clarity....

2
Purpose: Opening Select File Pop-up:

When working with the File Dialog/Select File Pop-up in Liquid UI, errors like "primitive undefined" or "ActiveX Object class not registered" might occur. This article helps resolve these issues and demonstrates a simple, effective way to open the native Windows Select File Pop-up/Dialog in SAP.

Please follow the below steps:

Step-1: Open the Script file "SAPLSTMTR_NAVIGATION.E0100.sjs" or Create it if it is not present in the WS Directory as configured in the "guixt.sjs" file.

Step-2: Add the below Code Snippet and Save it.

//Deleting the Screen Controls
//Liquid UI Code:
del("X[IMAGE_CONTAINER]");

//Loading the Generic Functions
//This can also be placed in ESESSION.sjs file
load("FUNCTIONS_STRING.sjs");
load("FUNCTIONS_SECURITY.sjs"); 

//Function that will trigger the Select File Pop-up/Dialog
function fileopenfunc(){
   var dialog = new system.CommonDialog();
   dialog.ShowOpen();
   var ret = dialog.FileName;
   dialog = void 0;
   if(hasValue(ret)){
      message("S: File Selected = ",ret);
   }
   else{
      message("E: File Not Selected");
   }
}

//Design Screen
box([2,1], [5,33], "");
pushbutton([3,4], "@49@Select File", "?",{ "process":fileopenfunc , "size":[2,26]});


Refer to the Attachment for clarity....

3
Purpose: Reading List Screen Data: Extracting Material Numbers and Generating a Checkbox List of Materials

This article explains how to generate a list of materials from the List screen, which facilitates the display of material details as needed.

Prequisties:
Liquid UI WS

Please follow the below steps:

Step-1 : Open the Script file "SAPLSTMTR_NAVIGATION.E0100.sjs" or Create it if it is not present in the WS Directory as configured in the "guixt.sjs" file.

Step-2 : Add the below Code Snippet and Save it.

//Deleting the Screen Controls
//Liquid UI Code:
del("X[IMAGE_CONTAINER]");
del([/color][/b]"P[User menu]");
del("P[SAP menu]");
del("P[SAP Business Workplace]");
del("P[Display role menu]");
del("P[Add to Favorites");
del("P[Delete Favorites");
del("P[Delete Favorites");
del("P[Delete Favorites");
del("P[Change Favorites");
del("P[Move Favorites down");
del("P[Move Favorites up");
del("P[Create role");

//Function to set the screen layout.
function fn_navigate(param){
    set("V[z_screen]","");
    set("V[z_layout]","");
}

//Design Screen.
if(z_screen==undefined || z_screen==""){
    pushbutton([3,1], "@12@Generate Material List",{ "process":z_readfromlist});
    inputfield([1,1],"Max Entries",[1,12],{"name":"z_max","size":"11"});
}

//Function to read the list screen data
function z_readfromlist(){   
    title("Generating Material List....")
    z_material_array  = []; 
    lfvrow = 1;
    onscreen 'SAPLSMTR_NAVIGATION.0100'
        enter("/NSE16");
    onscreen 'SAPLSETB.0230'
        set('F[table Name]', 'MARA');
        enter();
   
    onscreen '/1BCDWB/DBMARA.1000'
        set("F[MAX_SEL]","&V[z_max]");
        enter("/8");
   
    onscreen 'SAPLSETB.0120'
        SCROLL_NEXT:;
        enter("/scrolltoline=&V[lfvrow]");
    onscreen 'SAPLSETB.0120'
        enter("/hscrollto=0");
    if(z_max=="1"){
        goto START;
    }
    if(lfvrow >= _listlastvisiblerow){
        goto END;
    }
    START:;
    lfvrow = _listfirstvisiblerow;
    llvrow = _listlastvisiblerow;
    z_row = 5;

    LOOP:; 
    set("V[z_matval]","&#["+z_row+",20]");   
    z_material_array.push(z_matval);
    lfvrow = lfvrow+1;   
   
    if(lfvrow <= _listlastvisiblerow){   
        z_row = z_row+1;
        goto LOOP;
    }
    if(z_max==1){
        goto END;
    }
    else{
        goto SCROLL_NEXT;
    }   
    END:;

    for(var col = 0; col < z_material_array.length; col++) {
         var objReeb = <"#["+row+","+col+"]">;
        if (objReeb && objReeb.isValid) {
            var trimmedName = objReeb.name.toString().trim();
            if (trimmedName === '5' || trimmedName === '') {
                retString += value + ' ';
                value = "";
            } else if (trimmedName !== lastReebName) {
                value = trimmedName;
                lastReebName = value;
            }
        }
    }

    set("V[z_layout]","1");
    enter("/3");
    onscreen 'SAPLSETB.0120'
        enter("/3");
    onscreen '/1BCDWB/DBMARA.1000'
        enter("/3");
    onscreen 'SAPLSETB.0230'
        enter("/3");
    onscreen 'SAPLSMTR_NAVIGATION.0100'
        enter("?");
    set("V[z_screen]","home");
}
 
//Function to checks the material(s) selection and navigate to MM02
function checkSelection() {
    selected = [];
    for (k=0; k<z_material_array.length;k++) {
        var chkName = "chk"+ (k+1);
        if (eval(chkName) == 'X') {
            selected.push(z_material_array[k]);
        }
    }
    if (selected.length > 1) {
        return("Execute one Material at a Time ");
    }
    if (selected.length == 0) {
        return("No Materials Selected");
    }
    enter("/nmm03")
    onscreen 'SAPLMGMM.0060'
    set("F[Material]",selected[0]);
    enter();
    onscreen 'SAPLMGMM.0070'
        set("cell[Table,0,1]","X");
        set("cell[Table,0,2]","X");
        set("cell[Table,0,3]","X");
        set("cell[Table,0,4]","X");
        set("cell[Table,0,5]","X");
        set("cell[Table,0,6]","X");
        set("cell[Table,0,7]","X");
        set("cell[Table,0,8]","X");
        set("cell[Table,0,9]","X");
        set("cell[Table,0,10]","X");
        set("cell[Table,0,11]","X");
        enter("/6");
    onscreen 'SAPLMGMM.0080'
        enter();
    onscreen 'SAPLMGMM.0080'
        enter();
    onscreen 'SAPMSDYP.0010'
        enter();
}

//Design Screen.
if(z_layout=="1"){
    box([1,0], [z_material_array.length+5,25], "Material List");
    pushbutton([z_material_array.length+3,2], "@16@Display Material",{"process":checkSelection,"size":[2,21]});
    pushbutton([TOOLBAR], "@H9@Home","?",{"process":fn_navigate , "using":{"l_screen":""}});
    for(l=0,m=3;l<z_material_array.length;l++,m++)
    checkbox([m,2], z_material_array[l],{name: "chk"+(l+1)});
}


Refer to the Attachment for clarity....

4
Purpose: To Calculate the sum of two inputfields using Liquid UI WS

Please follow the below steps:

Step-1: Open the Script file "SAPLSTMTR_NAVIGATION.E0100.sjs" or Create it if it is not present in the WS Directory as configured in the "guixt.sjs" file.

Step-2: Add the below Code Snippet and Save it.

//Deleting the Screen Controls
//Liquid UI Code:
del("X[IMAGE_CONTAINER]");
del("P[User menu]");
del("P[SAP menu]");
del("P[SAP Business Workplace]");
del("P[Display role menu]");
del("P[Add to Favorites]");
del("P[Delete Favorites]");
del("P[Change Favorites]");
del("P[Move Favorites down]");
del("P[Move Favorites up]");
del("P[Create role]");
del("P[Assign users]");
del("P[Documentation]");

//Function to Increment the Total Field from the Quantity Field
function Increment(param){
var total1=parseInt(z_quantity);
var total2=parseInt(z_total);
var output=total1+total2;
set("V[z_total]",output);
}

//Design Screen
inputfield( [12,73], "Total", [12,86],{ "name":"z_total", "size":32});
inputfield( [10,73], "Quantity", [10,86],{ "name":"z_quantity", "size":32});
pushbutton([14,93], "@01@",{ "process":increment, "size":[2,12], "using":{ "quantity":"z_quantity", "total":"z_total" }});

Step-3: Enter the Values in the inputfields and Click on the Pushbutton.

Step-4: It will calculate the Sum and display the result in the inputfield.


Refer to the Attachment for clarity....

5
Purpose: Below Article would help in creating pushbutton inside the Liquid UI Table using Liquid UI WS.

Pre-requisites:
Liquid UI WS

Example:

Following are the steps that needs to be followed:

Step-1:Open the Easy Access Script file "SAPLSMTR_NAVIGATION.E0100.sjs" which can be found in the directory folder as Configured in the ?guixt.sjs? file.
Create the file if it doesn't exists.

Step-2: Add the below code snippet and save it.

//Liquid UI Code:
del("X[IMAGE_CONTAINER]");
table([1,1], [10,20], {"name":"z_luitable", "title":"LIQUID UI TABLE", "rows":10});  // Liquid UI Table Generation
column('Status',{"table":"z_luitable", "name":"doc_push", "position":2, "size":10, "label":"", "pushbutton":true,"fcode":"?","process":Test});

Step-3: Refresh the SAP GUI Screen.


Refer to the Attachment for clarity....

6
Purpose: Below Article would help in changing the F4 help display options.

Following are the Steps that needs to be followed:

Step-1: Connect to the SAP Server from the Liquid UI Client.

Step-2: On the SAP Easy Access Screen at the top right corner of the screen, Tap on the Settings Icon for iOS and More Option for Android.

Step-3: Under the System Menu Tap on Help.

Step-4: Tap on Settings...

Step-5: On the Screen Personal Settings for User, Tap on the F4 Help Tab.

Step-6: Select the Radio button Dialog(Modal) / System defaults and Tap on the Continue tick mark button.

Step-7: It will display the success message.


Refer to the Attachment for Clarity....

7
Purpose: To resolve the issue of SAP web repository not rendering Liquid UI Scripts and also guide in releasing MIME Object

Pre-requisites:
  • Valid RFC Username and Password.
  • RFC Proper Authorization to Execute requested RFC function.
  • Valid RFC Connect Statement.

To Know more about RFC Connect Statement, refer the below Article:
https://www.guixt.com/forum/index.php/topic,427.msg431.html#msg431

Following needs to be verified in-order to resolve the issue:

1. RFC Username and Password,

2. Valid RFC Connect Statement in the guixt.sjs file.

3. Directory path should be correctly specified in the guixt.sjs file.

To Know more about How to Specify the Directory Path for SAP Web Repository, refer the below Article
https://www.guixt.com/forum/index.php/topic,435.0.html

Example:
directory1="SAPWR:Z.LIQUIDUI";

4. Liquid UI Scripts should be Properly Uploaded into the SAP Web Repository.

If the Above Steps doesn't resolved the issue then release the MIME Object by following the below steps:

Step-1: Navigate to 'SMW0' transaction and select second option.

Step-2: Click on 'Internet Release' Menu Item from top of the screen and select 'Function Module'.

Step-3: Put "WWW_GET_MIME_OBJECT" within function module and click on Release TOOLBAR Pushbutton.

-If it has already been released, it will display a message "the function module WWW_GET_MIMIE_OBJECT has already been released for the Internet", or else it will make new release.

Step-4: Restart and Login again to the SAP Server.


Refer to the Attachment for further clarity.....

8
Purpose: To display the Text/Name value associated to a particular Entry/Record of SAP.

  • Generally, the Description of the value entered is not displayed in Liquid UI.
  • Below Article would help in displaying the description of the value entered using Liquid UI WS.

Pre-requisites:
Liquid UI WS
Liquid UI Designer

Example:

Step-1: Open the Script file "SAPLSTMTR_NAVIGATION.E0100.sjs" or Create it if it is not present in the WS Directory as configured in the "guixt.sjs" file.

Step-2:
Add the below Code and save it.

//Liquid UI Code:

//////////////////////////////"SAPLSMTR_NAVIGATION.E0100.sjs"//////////////////////////////
// User Interface / Design Screen
clearscreen();
box([3,0], [8,98], "Organizational Data");
inputfield( [1,2], "Order Type", [1,20],{ "name":"z_ordertype", "size":5});
text([1,27], "&V[z_ordertype]",{ "size":20});
inputfield( [4,2], "Sold-To Party", [4,20],{ "name":"z_soldtoparty", "size":8});
text([4,30], "&V[z_soldtopartyvalue]",{ "size":22});
inputfield( [5,2], "Sales Organization", [5,20],{ "name":"z_salesorganization", "size":8});
text([5,30], "&V[z_salesorg]",{ "size":20});
inputfield( [6,2], "Distribution Channel", [6,20],{ "name":"z_distrchnl", "size":8});
text([6,30], "&V[z_distributionchan]",{ "size":22});
inputfield( [7,2], "Division", [7,20],{ "name":"z_div", "size":8});
text([7,30], "&V[z_division]",{ "size":20});

//Function to Read the Text/Name Value of the Fields
function getvalue(){
   onscreen 'SAPLSMTR_NAVIGATION.0100'
   enter("/nva01");
   onscreen 'SAPMV45A.0101'
   set("F[Order Type]","&V[z_ordertype]");
   set("F[Sales Organization]","&V[z_salesorganization]");
   set("F[Distribution Channel]","&V[z_distrchnl]");
   set("F[Division]","&V[z_div]");
   enter();
        onerror     // Error Handling
        enter("/n");
        message(_message);
        goto End;
   onscreen 'SAPMV45A.4001'
   set("F[Sold-To Party]","&V[z_soldtoparty]");
   enter();
   onscreen 'SAPMV45A.4001'
   enter("/2");
   set("V[z_soldtopartyvalue]","&F[KUAGV-TXTPA]");
   enter("/3");
   onscreen 'SAPMV45A.4001'
   enter("/3");
   onscreen 'SAPLSPO1.0100'
   enter("=NO");
   onscreen 'SAPMV45A.0101'
   set("V[z_salesorg]","&F[TVKOT-VTEXT]");
   set("V[z_distributionchan]","&F[TVTWT-VTEXT]");
   set("V[z_division]","&F[TSPAT-VTEXT]");
   enter("/3");
   End:;
}
onUIEvents["Enter"]={"process":getvalue};

Note: The Above "getvalue" Function is recorded using Liquid UI Designer.

Step-3:
Login to SAPGUI and Navigate to "SAP EASY ACCESS SCREEN", Enter the Order Type, Sales Organization, Distribution Channel, Division and Hit Enter or Click on the Enter Button.

Step-4: It will display the description of the value entered in Liquid UI Invisible Text Elements.


Refer to the Attachment for clarity....


9
Purpose: To Display the Selected SAPGUI Table Rows Details Associated to Particular Columns in a Pop-up Window Liquid UI WS.

-Because accessing the Row Details of the Table which are at the Extreme end is only possible through scrolling which is generally a tedious process.

-We can also display multiple table row details in a Pop-up Window.

Example:
Please follow the Steps below.

Step-1 : Create a script file "SAPMV45A.E4001.sjs" with the following code and save it in your WS scripts directory as configured in "guixt.sjs"  file.

Liquid UI Code

///////////////////////////////////////////////SAPMV45A.E4001.SJS///////////////////////////////////////////////

//Design Script
pushbutton([TOOLBAR], "@0P@Display Row Data..",{"process":DisplayRowData});

//function to fetch the Selected Table Row and store it in the Respective Array.
function DisplayRowData(){
   z_matarray=[];
   z_pricingdatearray=[];
   z_billingdatearray=[];
   z_itemarray=[];
   z_accassigngrparray=[];
   z_quantity=[];
   enter("/o");
   gettableattribute("T[All items]", {"firstvisiblerow":"FVisRow", "lastvisiblerow":"LVisRow", "lastrow":"LastRow","selectedrows":"SelRows"});
   for(i=0;i<LastRow;i++){
   ROW_NUMBER = i;
      if(SelRows[ROW_NUMBER]=="X"){
         // adding 1 as SelRows is array which has index begin from 0
         selected_row_number = ROW_NUMBER+1;
         set("V[z_item]","&cell[All items,Item,"+(selected_row_number)+"]");
         z_itemarray.push(z_item);
         set("V[z_material]","&cell[All items,Material,"+(selected_row_number)+"]");
         z_matarray.push(z_material);
         set("V[z_pricingdate]","&cell[All items,Pricing date,"+(selected_row_number)+"]");
         z_pricingdatearray.push(z_pricingdate);           
         set("V[z_billingdate]","&cell[All items,Billing Date,"+(selected_row_number)+"]");
         z_billingdatearray.push(z_billingdate);
         set("V[z_accassigngroup]","&cell[All items,VBAP-KTGRM,"+(selected_row_number)+"]");
         z_accassigngrparray.push(z_accassigngroup);
       set("V[z_compquantity]","&cell[All items,Component quantity,"+(selected_row_number)+"]");
         z_quantity.push(z_compquantity);
      }       
    }
 }

Step-2 : Create another script file "RSM_ALV_NEW_E2000.sjs" with the following code and save it in your WS scripts directory which is configured in "guixt.sjs" file.

///////////////////////////////////////////////RSM_ALV_NEW_E2000.SJS///////////////////////////////////////////////

//Design Screen
clearscreen();
title('Displaying Selected Row Details', {"size":[1,10]});
del('P[Generate]');
del('P[End Session]');
del('P[Delete Session]');
del('P[Continue]');
text('P[Cancel]',"@2O@");
inputfield([0,0],{ "size":5, "intensified":true, "nolabel":true, "default":"Item", "readonly":true});
inputfield([0,6],{ "size":11, "intensified":true, "nolabel":true, "default":"Material", "readonly":true});
inputfield([0,18],{ "size":11, "intensified":true, "nolabel":true, "default":"PricingDate", "readonly":true});
inputfield([0,30],{ "size":11, "intensified":true, "nolabel":true, "default":"BillDate", "readonly":true});
inputfield([0,42],{ "size":11, "intensified":true, "nolabel":true, "default":"AccountAssignGrp", "readonly":true});
inputfield([0,54],{ "size":5, "intensified":true, "nolabel":true, "default":"Quantity", "readonly":true});

//Creating the Inputfields
for(j=0;j<z_matarray.length;j++){
   inputfield([j+1,0],{"size":5,"name":"z_item_&V[j]","nolabel":true,"readonly":true});
   inputfield([j+1,6],{"size":11,"name":"z_matarray_&V[j]","nolabel":true,"readonly":true});
   inputfield([j+1,18],{"size":11,"name":"z_pricingdate_&V[j]","nolabel":true,"readonly":true});
   inputfield([j+1,30],{"size":11,"name":"z_billingdate_&V[j]","nolabel":true,"readonly":true});
   inputfield([j+1,42],{"size":11,"name":"z_accassigngrp_&V[j]","nolabel":true,"readonly":true});
   inputfield([j+1,54],{"size":5,"name":"z_quantity_&V[j]","nolabel":true,"readonly":true});
}

//Displaying the array values in inputfields
for(j=0;j<z_matarray.length;j++){
   set("V[z_matarray_&V[j]]",z_matarray[j]);
   set("V[z_billingdate_&V[j]]",z_pricingdatearray[j]);
   set("V[z_pricingdate_&V[j]]",z_billingdatearray[j]);
   set("V[z_item_&V[j]]",z_itemarray[j]);
   set("V[z_accassigngrp_&V[j]]",z_accassigngrparray[j]);
   set("V[z_quantity_&V[j]]",z_quantity[j]);
}

Step-3 : Goto the Transaction VA02, Enter the Order Number and Click on the Enter Button.

Step-4 :Select the Rows of the "All items" Table and Click on the "DisplayRowData" TOOLBAR Pushbutton.

Step-5 : It will display the Selected Row Details Row Details Associated to Particular Columns in a Pop-up Window.


Refer to the Attachment for further Reference...

10
Purpose:
To Open the Excel File with a Click of Pushbutton.
-It is helpful in opening the Desired Excel file from within the SAP Screen.

Pre-requisites:
Liquid UI WS
Microsoft Excel

Note:
"wsoffice.dll" file must be present in the Script Directory and it should be Loaded in "ESESSION.SJS" File

Eg:
////ESESSION.sjs////
load("wsoffice");

Example:
Please follow the below Steps:

Step-1: Open the Easy Access Script file "SAPLSMTR_NAVIGATION.E0100.sjs" which can be found in the directory folder as Configured in the "guixt.sjs" file.

//Add the Below LIQUID UI Code to the file

/////////////////////////////SAPLSMTR_NAVIGATION.E0100.SJS/////////////////////////////

// Function to Select the Excel File
function SelectExcelfile(param){                                       
    if(szPrompt==void 0) szPrompt = 'Select the Excel File';
    var dialog = new ActiveXObject('MsComDlg.CommonDialog'); 
    dialog.Filter='Excel Files(*.xlsx*)|*.xlsx*'; 
    dialog.MaxFileSize=32767; 
    dialog.DialogTitle=szPrompt;
    dialog.Flags=0x200|0x80000|0x800|0x4|0x200000;
    dialog.ShowOpen(); 
    var file = dialog.FileName;
    dialog = void 0;
    if(file!=""){
        openExcelfile(file);
    }
    else{
       message("File Not Selected!",{"StatusLine":true,"title":"Information","type":"W"});
    }

}

// Function to Open the Excel File
function openExcelfile(filename){
g_ExcelApp = new ActiveXObject('Excel.Application');
g_ExcelBook=g_ExcelApp.Workbooks.Open(filename);
g_ExcelApp.Visible=true;
g_ExcelApp.ScreenUpdating=true;
message("S: "+filename+" Excel File is Opened Successfully");
}

// Screen Script
pushbutton([TOOLBAR], "@48@Open Excel File",{ "process":SelectExcelfile});


Step-2: Save the File and Refresh the SAP Screen.

Step-3: Click on the "Open Excel file" TOOLBAR Pushbutton.

Step-4: It will bring up the Pop-up Window, Select the Excel file that need's to be open.

Step-5: It will display a Success Message and will open the Selected Excel File.


Refer to the Attachment for Further Reference......

11
Purpose: Setting Set Start Transaction on Liquid UI Client.

To Set Start Transaction on "Liquid UI iOS Client"

Please follow the Steps Below:

Step-1: Launch LIQUIDUI App in the iOS Device.

Step-2: Connect to the SAP Server Connection.

Step-3: On the SAP Easy Access Screen, Tab on the Settings TOOLBAR Pushbutton.

Step-4: System Menu WINDOW will Pop-up Tap on the Extras Option.

Step-5: Tap on the Set Start Transaction option.

Step-5: Set Start Transaction WINDOW will Pop-up, Specify the Transaction in Transaction Code field and Click on the Continue button as Shown.

Step-6: Login again to the SAP Server Connection, it will redirected to the Specified Transaction.


To Set Start Transaction on "Liquid UI Android Client"

Please follow the Steps Below:

Step-1: Launch LIQUIDUI App in the Android Device.

Step-2: Connect to the SAP Server.

Step-3: On the SAP Easy Access Screen Top right Corner, Tap on the More Option Pushbutton.

Step-4: Tap on the Extras Option.

Step-5: Tap on the Set Start Transaction Option.

Step-6: Set Start Transaction WINDOW will Pop-up, Specify the Transaction in Transaction Code field and Click on the Continue button.

Step-7: Login again to the SAP Server, it will redirected to the Specified Transaction.


Refer to the Attachment for Clarity.....

12
Purpose : To Add Other Objects such as Web Address or file on the SAP Easy Access Screen inside the Favourites List Node.

To Add Web Address on Liquid UI iOS Client

Please follow the Steps Below:

Step-1: Launch the LIQUIDUI App in the iOS Device.

Step-2: Connect to the SAP Server.

Step-3: On the SAP Easy Access Screen, Click on the Settings TOOLBAR Pushbutton.

Step-4: System Menu WINDOW will Pop-up, Scroll down and Select the Add Other Objects Options.

Step-5: "Add additonal objects 32 Entries" Window will Pop-up, Select the web address or file and Click on the Continue button.

Step-6: "Add a Web address or file path" WINDOW will Pop-up, Specify the "Text"  as "Company's Website" and the "Web Address or File as "https://www.guixt.com"[/color] fields and Click on the Continue button as Shown.


Step-7: It will show the Success Message and the Node is added to the favourite list.


To Add Web Address on Liquid UI Android Client

Please follow the Steps Below:

Step-1: Launch the LIQUIDUI App in the Android Device.

Step-2: Connect to the SAP Server.

Step-3: On the SAP Easy Access Screen Top right Corner, Tap on the More Option Pushbutton.

Step-4: Tap on the Favorites from the List of options.

Step-5: Tap on Add other objects.

Step-5: "Add additonal objects 32 Entries" Window will Pop-up, Select the web address or file and Click on the Continue button.

Step-6: "Add a Web address or file path" WINDOW will Pop-up, Specify the "Text"  as "Company's Website" and the "Web Address or File as "https://www.guixt.com"[/color] fields and Click on the Continue button as Shown.

Step-7: It will show the Success Message and the Node is added to the favourite list.

Refer to the Attachment for further Reference.....

13
Purpose: To find the List of users connected to the Liquid UI Server.

Please follow the below Steps:
1. Login to the relevant SAP system.
2. Navigate to SM04 transaction.
3. Place a filter with IP Address of the Liquid UI Server machine.

Refer to the Attachment for further Reference.....

14
Purpose : Arrow functions allow us to write simple and shorter function Syntax.

***ES6's Arrow functions are now supported in Liquid UI WS

Pre-requisites :
Liquid UI Desktop with version 1.2.365

Syntax:
Test= () => {
return "Hello World";
}
pushbutton ([1,1],"Click Me!", {"process": Test});


Note:
If the function consists of a single line statement and it is returning a value, then skip the return keyword, as Arrow function returns value by default
Test= () => {
"Hello World";
}
pushbutton ([1,1],"Click Me!", {"process": Test});


If the Function has only one parameters, then skip the brackets ().

Example:
Below Example Illustrate the use of Arrow Function, please follow the below steps.

Step-1: Create a script file "SAPLSMTR_NAVIGATION.E0100.sjs" with the following code and save it in your WS scripts directory as configured in guixt.sjs" file.

Liquid UI Code:
// Screen Script
del("X[IMAGE_CONTAINER]");
inputfield ([1,0],{ "name":"z_username", "size":21, "nolabel":true});
z_date = Date();

pushbutton ([1,23], "@0V@Submit   ",{ "process":Test, "using":{"user":z_username,"day":z_date}});


// Arrow Function
Test=param=>{
   "S: "+"Welcome"+param.user;
   "S: "+"Today's date is "+param.day;
}

Step-2: Login to your SAP Server, On the SAP Easy Access Screen Enter some text in the inputfield and Click on "Submit" Pushbutton it will display a Success Message on the Status Bar.


this Keyword in Arrow Function:

this keyword is different in Arrow functions as compared to regular functions.

this keyword represents the object that define the arrow function.

There is no binding of this with arrow function.

Example

Step -1: Create a script file "SAPLSMTR_NAVIGATION.E0100.sjs with the following code and save it in your WS scripts directory as configured in "guixt.sjs" file.

Liquid UI Code:
// Screen Script
del("X[IMAGE_CONTAINER]");

// New implementation of "this" keyword
Test= ()=>this;
pushbutton ([1,1],"Test Arrow function this keyword ",{"process": Test});

// regular function with "this" keyword
function thiskeyword(){
   return(this);
}
pushbutton ([3,1],"Test regular function this keyword",{"process":thiskeyword});


Step-2: Login to your SAP Server, On the SAP Easy Access Screen Click on "Test regular function this keyword" Pushbutton it will display "[Object Screen]" on the status bar.

Step-3: Login to your SAP Server, On the SAP Easy Access Screen Click on "Test Arrow function this keyword" Pushbutton it will display "[Object global]" on the status bar.


Refer to the Attachment for further Reference.....

15
Purpose: To Encrypt Liquid UI RFC Password.

Please follow the steps below:

Step-1: Enter /wsmessage(encrypt("YOUR PASSWORD"),1) on SAP Screen (in the tcode box) and hit enter.
 
Step-2: "Message" Window will Pop-up, Copy the Encrypted Password from the Message Field.

Step-3: Put the Copied Encrypted Password into the guixt.sjs file as shown below.
               
                rfcuser = "GXTRFC";
                rfcencryptedpassword = "encrypted password";


Refer to the Attachment for Clarity.....

Pages: [1] 2 3