Recent Posts

Pages: 1 [2] 3 4 ... 10
11
User Count and Details based on specific user role

For role based customization using Liquid UI, Liquid UI needs to be enabled for a pre-determined role
Example: Z_LIQUIDUI

Use Transaction SE16
Table: AGR_USERS
Role: Z_LIQUIDUI  (in this example)
Click 'Execute'

This will give all the users who has Z_LIQUIDUI role assigned.

This can be used to determine the user count for Liquid UI usage.

12
WS aka Web Scripts (Attended RPA for SAP) / RFC CALL: /GUIXT/SELECT
« Last post by umang@guixt.com on January 17, 2024, 03:52:03 PM »
This article describes the details on how to call /GUIXT/SELECT , RFC enabled function module in SAP using Liquid UI

Calling /GUIXT/SELECT Function Module

Things to pay attention to:

1. FUNCTION NAME SHOULD BE UPPERCASE IN CALL STATEMENT
2. PARAMETER NAMES SHOULD BE UPPERCASE IN CALL STATEMENT
3. WIDTH FOR OUTPUT IS 2X THE TOTAL CHAR COUNT (DOUBLE BYTE UNICODE)
4. IF TABLE OUTPUT IS CHAR (EXAMPLE: CHAR8000), THEN PASS DEFINED STRUCTURE TO RETRIEVE DATA. 
5. STRUCTURE DETAILS TO BE DETERMINED BASED ON WHAT THE OUTPUT IS DERIVED FROM
(EXAMPLE: TABLE, CHECK SE11 FOR TABLE STRUCTURE)
6. THE STRUCTURE NEEDS TO BE DEFINED TILL THE LAST FIELD DATA THAT NEEDS TO BE RETRIEVED

// Sample script: Easy Access Screen


// SAPLSMTR_NAVIGATION.E0100.sjs

del("X[IMAGE_CONTAINER]");

pushbutton([1,1],"RFC Test","?",{"size":[1,20], "process":fnTestRFC});

function fnTestRFC() {
   var r = [];

   var z_KNA_DETAILS_E = {
      name:'CHAR8000_D',
      components:[
            { name:'MANDT',      length:3,      decimalpl:0,    type:'C' },                                 //Order Number
            { name:'KUNNR',      length:10,      decimalpl:0,    type:'C' },                                 //Order Type
            { name:'LAND1',      length:3,      decimalpl:0,    type:'C' },                                 //Maintenance Planning Plant
            { name:'NAME1',      length:35,      decimalpl:0,    type:'C' }                                 //Business Area
      ]
   }

   //set("V[z_flds]","MANDT,KUNNR,LAND1,NAME1");
   set("V[z_flds]","KUNNR,NAME1");

   println("Calling RFC.......");

   var rfcResult = call("/GUIXT/SELECT",{"in.TABLE":"KNA1","in.FIELDS":"&V[z_flds]", "in.CONDITION":"ORT01 = 'HEIDELBERG'", "table.RESULTTABLE(width:16000,type:z_KNA_DETAILS_E)":"r","verbose":true});

   println("rfcResult.rc:"+rfcResult.rfc_rc+":");
   println("rfcResult.key:"+rfcResult.key+":");
   println("rfcResult.exception:"+rfcResult.exception+":");
   println("Total Records:"+r.length+":");

   for(i=0;i<r.length;i++) {
      println("i:"+i+":"+r["KUNNR"]+":"+r["NAME1"]+":");
   }
}

13
Purpose:
Opening a URL link is different via direct connect and Liquid UI Server.
This article explains how to open links when connecting through a Liquid UI server.


Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPLSMTR_NAVIGATION.E0100.sjs       // SAP Easy Access
----------------------------------------------------------------------------------------------------------------------------------------------
//================================================
// User Interface
//================================================
del("X[IMAGE_CONTAINER]");
pushbutton([4,1],"Open URL/Link via LUI Server","?",{"process":openURLviaServer});



//================================================
//Function Scripts
//================================================
// Function prototype to trim blank characters from a string
String.prototype.trim = function () {
   return this.replace(/^\s+|\s+$/g, "");
}

// Function to return trimmed string
function getString(strInput) {
   return (typeof(strInput) == 'undefined' || strInput == 'undefined') ? "" : strInput.toString().trim();
}

// Function to check for blank string
// Specifically used to determine if input exist in the edit field
function isBlank(strInput) {
   var strVal = getString(strInput);
   var blank = strVal == "";
   return blank;
}

//Function to delete toolbar buttons on popup
function delButtonsRSM0400() {
   del('P[Continue]');
   del('P[Generate]');
   del('P[End Session]');
   del('P[Cancel]');
   if(<'P[Delete Session]'>.isValid)      del("P[Delete Session]");
}

//Function to display Liquid UI message popup
function procLUIMessageBox(param){
   var intHeight = 5 + 4 + param.l_message.length;
   var intPaintRow = 1;
   var intPaintCol = 3;
   enter("/o");
               
   onscreen 'RSM04000_ALV_NEW.2000'
      goto RESIZE_REPAINT;
      
   onscreen 'RSM04000_ALV.2000'
      RESIZE_REPAINT:;
      clearscreen();
      delButtonsRSM0400();
   
      title(param.l_title);
      
      if(isBlank(param.l_viewtext))   var viewTextContent='';
      else var viewTextContent = param.l_viewtext;
      if(isBlank(param.l_viewhtml))   var viewHTMLContent='';
      else var viewHTMLContent = param.l_viewhtml;
      if(isBlank(param.l_viewheight))   var viewHeight=0;
      else var viewHeight = param.l_viewheight;
      
      //Logic to render message
      for(var idxI=0; idxI<param.l_message.length; idxI++){
         var intWidth = (intWidth>param.l_message[idxI].length)?intWidth:param.l_message[idxI].length;
         if(param.l_message[idxI].indexOf("\t")==0)      //When message needs to be indented
            text([intPaintRow+idxI,intPaintCol+4], param.l_message[idxI]);
         else
            text([intPaintRow+idxI,intPaintCol], param.l_message[idxI]);
      }
      intWidth = intWidth+20;
      if(intWidth<51) intWidth=52;
      
      intPaintRow = 2 + param.l_message.length;
      if(!isBlank(fileURL)) {
         windowsize([5,5,90,intHeight+viewHeight]);
         view([intPaintRow-1,5],[intPaintRow+viewHeight,60],fileURL,{'name':fileURLName});
         intPaintRow = intPaintRow+1;
      } else if(viewTextContent.length>0) {
         textbox([intPaintRow,1],[intPaintRow+14,148],{'name':'viewTextContent','readonly':true});
         intPaintRow = intPaintRow+15;
         windowsize([5,5,150,intHeight+15]);
      } else if(viewHTMLContent.length>0) {
         var viewingFile = generatePrintableView(viewHTMLContent);
         var viewHNDL = getTodayDateTimeStr('HMS');
         //var viewingFile = viewHNDL+GP_Path_User+'PRINTCONTENT.htm';
         //view([intPaintRow,1],[intPaintRow+14,146],'&V[GP_Path_User]PRINTCONTENT.htm',{'name':viewHNDL});
         view([intPaintRow,1],[intPaintRow+14,146],viewingFile,{'name':viewHNDL});
         intPaintRow = intPaintRow+15;
         windowsize([5,5,150,intHeight+15]);
      } else {
         windowsize([5,5,intWidth,intHeight+1]);
      }
      fileURL = '';
      
      //Draw buttons according to type
      switch(param.l_type) {
         case "MB_YESNO":
            pushbutton([intPaintRow,intPaintCol], "@01@Yes", "/12",{"eventid":"YES", "size":[2,20]});
            pushbutton([intPaintRow,25], "@02@No", "/12",{"eventid":"NO", "size":[2,20]});
            break;
            
         case "MB_OKCANCEL":
            pushbutton([intPaintRow,intPaintCol], "@01@OK", "/12",{"eventid":"OK", "size":[2,20]});
            pushbutton([intPaintRow,25], "@02@Cancel", "/12",{"eventid":"CANCEL", "size":[2,20]});
            break;
            
         case "MB_OK":
            pushbutton([intPaintRow+viewHeight,intPaintCol], "@01@OK", "/12",{"eventid":"OK", "size":[2,20]});
            break;
            
         default:
            pushbutton([intPaintRow,intPaintCol], "OK", "/12",{"eventid":"OK", "size":[2,20]});
            break;
      }
}


function openURLviaServer(){
   //Set the path to where the html file can be created
   Z_PATH_LINK = "C:\\LiquidUI\\Scripts\\";
   
   onscreen "SAPLSMTR_NAVIGATION.0100"
      lFile = [];
      lLink = 'X';
      lName = 'LiquidUI_Web_Link_';
      set("V[tmpLink]","https://www.liquid-ui.com/");      //Set the link (URL) you want to open
      lFile.push([tmpLink,'LiquidUI_Web_Link']);
      reenter({'process':I_INITIAL_SCREEN_INFORMATION,'using':{'l_filename':lFile,'l_name':lName,'l_link':lLink}});
}


function I_INITIAL_SCREEN_INFORMATION(param){
   // SAP Easy Access
   enter('?');
   onscreen '*'
      var arrFiles = param.l_filename;
      var arrf1N = [];
      set('V[t1]',param.l_filename);
      
      set("V[t2]", 'Link');
      set("V[f1N]", '&V[Z_PATH_LINK]&V[t1]');
      for(var i=0;i<arrFiles.length;i++) {
         if(param.l_link == 'X') {
            set("V[f1N]", arrFiles[0]);
         } else {
            if(isBlank(param.l_type)) {
               set("V[f1N]", '&V[Z_PATH_LINK]'+arrFiles[0]);
            } else if(param.l_type == 'MACRO') {
               set("V[f1N]", '&V[Z_PATH_MACRO]'+arrFiles[0]);
            }
         }
         arrf1N.push([f1N,arrFiles[1]]);
      }
      fileURLName = param.l_name;
      fileURL = generateDynamicViewFileLinkV2(arrf1N,fileURLName+'VIEW.htm',param.l_link);
      
      title('Opening &V[t2] Please Wait...');
      strType = "MB_OK";
      strTitle = "View Link";
      aryMessage = [];
      aryMessage.push("Click to Open Link");
      reenter({"process":procLUIMessageBox, "using":{"l_type":strType, "l_title":strTitle, "l_message":aryMessage,'l_viewheight':arrFiles.length}});   
}


function generateDynamicViewFileLinkV2(arrInpFile,viewSuffix,strLink) {
   var fileName = Z_PATH_LINK+viewSuffix;
   removefile(fileName);
   var textString = "<html><head><body bgcolor='#FFFFFF'>";
   copytext({'tofile':'&V[fileName]','fromstring':'textString','appendline':true});

   for(var i=0;i<arrInpFile.length;i++) {
      if(strLink == 'X') {
         var textString1 = "<a href=\"";
      } else {
         var textString1 = "<a href=\"file:///";
      }
      var textString2 = arrInpFile[0];
      if(strLink == 'X') {
         var textString3 = "\" target=\"_blank\"><B><I><U>"+arrInpFile[1]+"</U></I></B>[/url]</BR>";
      } else {
         if(arrInpFile[0].toString().indexOf('.')>-1) {
            var textString3 = "\"><B><I><U>"+arrInpFile[1]+"</U></I></B>[/url]</BR>";
         } else {
            var textString3 = "\" target=\"_explorer.exe\"><B><I><U>"+arrInpFile[1]+"</U></I></B>[/url]</BR>";
         }
      }
      var textString = textString1+textString2+textString3;
      copytext({'tofile':'&V[fileName]','fromstring':'textString','appendline':true});
   }
   var textString = "</body></head></html>";
   copytext({'tofile':'&V[fileName]','fromstring':'textString','appendline':true});
   closefile(fileName)
   return fileName;
}


See attachments for code samples!
14
Pre-Requisites
+++++++++++++++++++++++++++++++++++++++++++++++++
SAP Secure Login Client must be installed on the Liquid UI Server
Liquid UI Server must run under a AD Domain Admin account
SAP PSE certificate must be exported and installed on Liquid UI Server

sapproxy.ini  Proxy configuration as per below
+++++++++++++++++++++++++++++++++++++++++++++++++
[Proxy1]
ListenPort = 3297
TargetServer = HELIOS
TargetServerPort = 3200
GuiXT = 10
snc_lib=C:\Program Files\SAP\FrontEnd\SecureLogin\lib\sapcrypto.dll
sncname = CN=SAPSNCID7, OU=IT, OU=SYNACTIVE, O=SYNACTIVE C=US
SNCMode=3
SNCSSO=0

Connectivity Details
1. SAPGUI to Liquid UI Server will be SAP username and password based logon - without encryption
2. iOS/Android Liquid UI Clients can be connected to Liquid UI Server via TLS1.3 and can be encrypted

15
Download TSC SAP Device Types from below link
https://usca.tscprinters.com/en/downloads
Use Filter: Desktop
Printer Serices: TE Series ....

SAP Device Types Download from above link attached including Documentation

Use SPAD transaction in configuration client to import these .pri files
Menu: Utilities->For Device types->Import

Once these are installed, using SPAD, specify Output Device: TSC and click on Display
Click on Change Icon on toolbar
Select YTSC200 as Device Type from the dropdown
Save

*Once the above setup is completed, go to the transaction and print by selecting TSC as Output Device and Selecting Print Now checkbox.
These should generate a front end data print stream that the TSC printer would understand and print appropriate content. *

Additional refer to
SAP Note 1540910
16
Operation System: Windows *ONLY*
Pre-Requisites - Liquid UI Server must be installed, licensed and running

After downloading the zip file, and the attached document please execute admin.exe to launch the Admin Console for Liquid UI Server

17
Purpose:
Required RFC authorizations for 'RFC_READ_TABLE' function module.

1. S_RFC: RFC_TYPE=FUGR, RFC_NAME=SYST, ACTVT=16
Note: Needed for sapnwrfc which is the newer RFC library from SAP


2. S_TABU_NAM: ACTVT=03, TABLE=SRGBTBREL
Note: Needed to check if attachment exists for work order or not (Table name will change as needed)




Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPLCORU.E3200.sjs       // IW41 Actual Data
----------------------------------------------------------------------------------------------------------------------------------------------
// Load the generic functions
load("stringFunctions.sjs");

// User Interface
pushbutton([TOOLBAR], "@4P@Attachments", '?', {'size':[2,32], 'process':iw41_viewAttachments});


// Related functions
// Function to open attachment list if it exists

function iw41_viewAttachments(){
   println("\n ==== Entered function iw41_viewAttachments ===\n");
   
   set("V[z_iw37n_order]","&F[Order]");
   var result = attachmentListExists(z_iw37n_order,12);
   if(!result){
      return("E: No attachments exists");
   } else {
      setcursor("F[Order]");
      enter('/2');
   }
   
   onscreen 'SAPLCOIH.3000'
      enter({'control':'GOSCONTAINERCTRL.Toolbar','item':'%GOS_TOOLBOX;75;89','event':2});      //Object for services
      
   onscreen 'SAPLSWUG.0100'   
      set("cell[TABLE,0,1]","X")
      enter();
      
   onscreen 'SAPLCOIH.3000'
      enter({'control':'GOSCONTAINERCTRL.Toolbar','item':'%GOS_VIEW_ATTA','event':1});              //Attachment List
   
}


// Function uses RFC call to check if attachment list exists for order
function attachmentListExists(strDocNum, nPadding, strYear){         
   println("\n ==== Entered function attachmentListExists ===\n");
   
   var z_in_query_table = "SRGBTBREL";
   if(hasValue(strYear)){
      var z_options = ["INSTID_A = '" + (padString(strDocNum,nPadding,PADDING_LEFT,"0")) + strYear + "'"];
   } else {
      var z_options = ["INSTID_A = '" + (padString(strDocNum,nPadding,PADDING_LEFT,"0")) + "'"];
   }
   var z_fields = ["INSTID_B"];
   var z_InstanceID = [];
   var bResult = false;

   rfcResult = call("RFC_READ_TABLE", {"in.QUERY_TABLE":"z_in_query_table",
                              "table.OPTIONS":"z_options",
                              "table.FIELDS":"z_fields",
                              "table.DATA(width:3000)":"z_InstanceID"});
   println("=====>> Check RFC_READ_TABLE Exception="+rfcResult.exception+"<==");
   println("=====>> Check z_InstanceID.length="+z_InstanceID.length+"<==");
   //FOL18          4 EXT44000000000134
   
   if(z_InstanceID.length>0){
      bResult = true;
   }
   return bResult;
}


See attachments for code samples!

18
Symptoms
When you use Liquid UI to open a dialog window with certain Windows OS[19042.1083, 19042.1165] to select a file, you receive Javascript runtime error related to insufficient memory.
"CommonDialog: The common dialog function failed during initialization. This error often occurs when insufficient memory is available".

This article provides work around to the issue.


Resolution/Work around(a classic select file window shows up):
Change the flags as specified below in getFilesToUpload() function:

function getFilesToUpload(szPrompt)

    if(szPrompt==void 0) szPrompt = 'Select File';
    var dialog = new ActiveXObject('MsComDlg.CommonDialog');
    dialog.Filter='All Files(*.*)|*.*'; 
    dialog.MaxFileSize=32767; 
    dialog.DialogTitle=szPrompt;
    //dialog.Flags=0x200|0x80000|0x800|0x4|0x200000; // FAILS because of 0x80000
    dialog.Flags=0x200|0x800|0x4|0x200000;  // WORKS, but fails if there is no 0x200
    dialog.ShowOpen(); 
    //var ret = dialog.FileTitle;
    var ret = dialog.FileName;
    dialog = void 0;
    return ret;



Findings 1: dialog.Flags=0x200|0x80000|0x800|0x4|0x200000; // FAILS because of 0x80000
Findings 2: dialog.Flags=0x200|0x80000|0x800|0x4|0x200000; // WORKS if high contrast mode of windows is turned on, Search for high contrast using windows search at bottom of the screen, and 'Turn on high contrast'
Findings 3: dialog.Flags=0x200|0x800|0x4|0x200000;  // WORKS
Findings 4: dialog.Flags=0x800|0x4|0x200000;  // Fails if there is no 0x200


19
For generating logs and bins for any execution related issues when using Liquid UI Server or Liquid UI Desktop
please follow below steps

Log in to SAP, and to generate logs type in transaction code box


1.   /ws_blackbox=1
2.   /ws_log=1
3.   Perform the action that needs to be recorded, typically the issue that is been identified by the user on execution of a transaction/process.
4.   /ws_log=0
5.   /ws_backbox=0

This will generate the log files and associated txt/bin files.

Provide this to support@guixt.com with detailed description of the issue along with the generated log and txt/bin files
for investigation

20
Requirements:
Managing software installation and scripts for user's across multiple locations

Pre-Requisites:
Liquid UI Desktop (Local user software deployment), or Liquid UI Server (Central Software Deployment)

Scenario 1: 
The scripts are common across all locations from where user is required to access the solution.
[One set of scripts for all locations]

Preferred Solution:
- Deploy software centrally using Liquid UI Server
- One Configuration file for all users across location
- Depending on the number of users, install single Liquid UI Server or multiple Liquid UI Servers and load balance them using a 3rd party hardware load balancer.
  Refer to Server Sizing Requirements: https://www.guixt.com/knowledge_base/content/18/310/en/32-server-sizing-requirements.html
- Deploy the scripts either locally on the Liquid UI Server or SAP Web Repository
  Refer to Script Deployment Options: http://www.guixt.com/forum/index.php/topic,317.msg321.html#msg321
- Set up SAPGUI Connection to Liquid UI Server for all users.  ** No Need to Activate GuiXT" on end user's machine

Scenario 2: 
The scripts are different for individual locations from where user is required to access the solution.
[Multiple et of scripts for all locations]

Preferred Solution:
- Deploy software centrally using Liquid UI Server for each location
- Separate Liquid UI Configuration file or each location identifying the script location
- Depending on the number of users at each location, install single Liquid UI Server or multiple Liquid UI Servers and load balance them using a 3rd party hardware load balancer.
  Refer to Server Sizing Requirements: https://www.guixt.com/knowledge_base/content/18/310/en/32-server-sizing-requirements.html
- Deploy the scripts either locally on the Liquid UI Server or SAP Web Repository
  Refer to Script Deployment Options: http://www.guixt.com/forum/index.php/topic,317.msg321.html#msg321
- Set up separate SAPGUI Connection to Liquid UI Server for users specific to their location .  ** No Need to Activate GuiXT" on end user's machine
  This will require different SAPGUI connection details based on where the user is located.

Alternatively:
- User's can be assigned different role based on their location, and a usercatalog can be setup which is role specific
- The usercatalog allows specification of groups and directories based on groups
- This way solution can be deployed using Scenario 1.
- Refer to article for using usercatalog: http://www.guixt.com/forum/index.php/topic,152.msg156.html#msg156


With Liquid UI Server deployment approach 
  a. Both software and configuration can be maintained centrally, and no software files and associated configuration files needs to be
      deployed to each individual users.
  b. Scripts can stay either centrally on Liquid UI Server folder or in SAP Web Repository depending on customer's preference.
  c. Mobile ready, to leverage the solution on iOS, Android and Windows CE based devices



With Liquid UI Desktop Deployment Approach
  a. Software needs to be installed on each individual user's machine.
  b. Software configuration files needs to be installed on each individual user's machine.
  c. Software upgrade will require each user's machine to be updated.
  d. If scripts are stored using network share location, then their is additional dependency on the network share, if the share is not accessible, the Liquid UI Solution is not accessible

Note:
With both Desktop and Server Deployment, there are multiple options to deploy the scripts.
Refer to article: http://www.guixt.com/forum/index.php/topic,317.msg321.html#msg321




Pages: 1 [2] 3 4 ... 10