Liquid UI - Documentation - 10.27 Check whether the RFC libraries are in use

10.27 Check whether the RFC libraries are in use


Prerequisites


Purpose

Liquid UI supports the latest RFC libraries such as sapnwrfc.dll deployed by SAP with SAPgui 750. Using the _nwrfcinuse system variable, you can verify whether the RFC library files are being used in the defined SAP process during the Remote Function Calls. This system variable shows true if the RFC library files are used and false in another case.

Based on the machine the SAPgui is installed, SAPNWRFC.DLL is present in different locations:

32-bit Operating System --> C:\Windows\System32
64-bit Operating System --> C:\Windows\SysWOW64

Note: This command works on the system with the following product versions.
Liquid UI for Desktop: 1.2.342.0 and above
Liquid UI for Server: 3.5.589.0 and above

 

We will walk you through the following steps.

  1. Open SAP Easy Access screen
  2. Delete the Image Container of the screen
  3. Add a pushbutton
  4. Add a function to make a function module call
  5. Customized SAP Process

//Create this file inside your script folder for customizing the SAP Easy Access screen: SAPLSMTR_NAVIGATION.E0100.sjs
//Now, let's start adding the content to the above file


Customization

  1. Open SAP Easy Access screen, and use the del command to delete the image container, as shown below:
    // Deletes an image container on SAP Easy Access screen
    del("X[IMAGE_CONTAINER]");
    
     

     
  2. Add a push button to call the function, when clicked.
    // Creates a pushbutton with a label as "Get User Detail" to call a function, when clicked. 
    pushbutton([1,10], 'Get User Detail', '?', {"process":getUserDetail});
    
     

     
  3. Add the following function to make a function module call, and display the required values in the console window.
     
    function getUserDetail(){
    	println("=====>> Executing getUserDetail...");
    	var rfcResult = call("BAPI_USER_GET_DETAIL", {"in.USERNAME":_user, 		"out.DEFAULTS":"z_defaults",	"table.PROFILES":"z_profiles"});	
    	println("=====>> BAPI_USER_GET_DETAIL Exception:"+rfcResult.exception+"<==");
    	
    	println("=====>> RFC Librarys are in use: "+_nwrfcinuse+"<==");
    	println("=====>> DEFAULTS:"+z_defaults+"<==");
    	  println("=====>> PROFILES:");
    	for(var idxI=0; idxI<z_profiles.length; idxI++)
    	println("=====>> Row"+(idxI+1)+":"+z_profiles[idxI]+"<==");
    }
    

     


Process

  1. Now, refresh the SAP Easy Access screen, and you will see the Get User Detail push button.
     

     
  2. Click the Get User Detail push button and you will see the RFC call successful and displays RFC Profile details, parameter values of z_default variable, and also the status of RFC libraries used in the Cornelius window. Here, you will see the _nwrfcinuse value as true because the RFC libraries are used in this scenario.
     

     
  3. If the SAP Library files are not used to make an RFC call, you will see the _nwrfcinuse value as false, as shown below:
     

     

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