Liquid UI Forum

Using Your Liquid UI Products => WS aka Web Scripts (Attended RPA for SAP) => Topic started by: Sai Siddhartha on January 25, 2018, 03:46:04 AM

Title: Dynamic Execution of functions using pushbutton
Post by: Sai Siddhartha on January 25, 2018, 03:46:04 AM
Purpose:
In this scenario, we will use a pushbutton to run the process with dynamic function names.
You can navigate to the function based on the value entered in the module field.
Here the user is navigated to either 'VA01' or 'MM01' transaction based on the module entered.

User Interface:
On the easy access screen, enter the module name as 'SD' in the inputfield and click on 'RFC TEST' toolbar pushbutton then you are navigated to VA01 transaction.
Enter the module name as 'MM' in the inputfield and click on 'RFC TEST' toolbar pushbutton then you are navigated to MM01 transaction.

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

del('X[IMAGE_CONTAINER]');
// Create an inputfield to retrieve the Module value
inputfield([1,1],"Module:",[1,10],{"size":2,"name":"z_name"});
// a button to run the function to navigate to transaction
pushbutton([TOOLBAR],"RFC Test",{"process":['RFCTestFunc&V[z_name]']});

// function navigates to VA01 screen
 function RFCTestFuncSD(){
   enter('/nva01');
}

// function navigates to MM01 screen
 function RFCTestFuncMM(){
    enter('/nmm01');
}