Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: del(), pushbutton(), message(), load()
Purpose
This document addresses the prevalent problem that users experience when attempting to upload invoices into an SAP system. This issue involves errors, such as primitive undefined or ActiveX Object class not registered, which occur when attempting to attach files through the File Dialog or Select File pop-up.
These errors have the potential to disrupt the file upload process and hinder overall productivity. To address this matter, we present a practical solution that circumvents the problematic pop-up by utilizing the native file selection dialog. Furthermore, this solution provides a seamless mechanism for attaching files, ensuring a smoother and more efficient interaction with the SAP system, based on the SAP Easy Access screen. The following actions will be performed:
- Delete the image container on the SAP Easy Access screen
- Add an input field to enter the user name
- Add a push button to execute the process
- Add a function to trigger the popup
- Load the external files
User Interface
//Create the file SAPLSMTR_NAVIGATION.E0100.sjs inside your scripts folder for customizing the SAP Easy Access screen
//Now, add the Liquid UI script to the above file and save it.
Customization
- Delete the image container on the SAP Easy Access screen using del().
//Deletes the image container on the SAP screen del("X[IMAGE_CONTAINER]");
- Add a push button labeled Select File to execute the fileopenfunc process on click.
//Creates a push button to execute the process pushbutton([3,4], "@49@Select File", "?",{ "process":fileopenfunc, "size":[2,26]});
- Add the fileopenfunc function to trigger the popup.
//Function to trigger the popup 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"); } }
//Create the ESESSION.sjs file inside your script folder and save the below script.
- Load the external files FUNCTIONS_GENERIC.sjs and FUNCTIONS_SECURITY.sjs using load() and save it.
//Loads the external files load("FUNCTIONS_GENERIC.sjs"); load("FUNCTIONS_SECURITY.sjs");
SAP Process
- Refresh the SAP screen and click the Select File push button. Then, a file selection dialog will appear; select the desired file and click Open.
- Upon selecting a file, a confirmation message as File selected along with the corresponding file path will be displayed on the SAP system's status bar.
- If no file is selected, you will see an error message stating File not selected.