Liquid UI - Documentation - 23.16 Pass values between sessions

23.16 Pass values between sessions


Prerequisites

Purpose

This article guides how to pass the values between sessions as a parameter with the "using" option. To demonstrate this process, we are considering the SAP Easy Access screen as an example, and we’ll guide you through the following steps:

  1. Delete the image container on the SAP Easy Access screen
  2. Add a toolbar push button to execute the process
  3. Add a function to load the script file
  4. Add a function to pass the values

User Interface

//Create the file SAPLSMTR_NAVIGATION.E0100.sjs inside your scripts folder for customizing the SAP Easy Access screen 
//Now, let's add the Liquid UI script to the above file and save it

Customization

  1. Delete the image container on the SAP Easy Access screen using the del command.
     
    //Deletes the image container on the SAP screen
    del("X[IMAGE_CONTAINER]");
    
     
     
  2. Add a toolbar push button labeled Pass Values that executes open_new_session process and opens a new session on click. 
    //Creates a push button that opens a new session
    pushbutton([TOOLBAR], "Pass Values", "/oiw31",{"process":open_new_session, "using":{"z_order_type":"PM01" }});
    
     
     

    //Create esession.sjs file in your scripts folder
    //Now, add the below Liquid UI script to the above file and save it

  3. Load the functions_iw31.sjs file.
     
    //loads the file
    load('functions_iw31.sjs'); 
    
     

    Note: When you are passing values between sessions, the function should be loaded in the esession file since we are opening a new session.

     

    //Create functions_iw31.sjs file in your scripts folder
    //Now, add the below Liquid UI script to the above file, and save it

  4. Add the open_new_session function to pass the values.
     
    //Function to pass the values
    function open_new_session(param){
        onscreen 'SAPLCOIH.0100'
        set('F[Order Type]',param.z_order_type);
        enter('?');
    }
     

SAP Process

  1. Refresh the SAP screen and click the Pass Values toolbar push button. You will observe the values passed to the Order Type input field in a new session, as shown below.
     
     

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