Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Files: sample excel values, wsoffice.dll
Purpose
In this article, you will learn how to generate an Excel Spreadsheet using the Excel template in Liquid UI Workbench. Additionally, a script will be generated through which data can be transferred from the spreadsheet to SAP. The error handling capability of the workbench enables you to correct errors before transmitting the data to SAP. To run an Excel script, please do the following.
User Interface
- Find the generated Workbench script. If you are logged into SAP, this script will be in the script directory specified in the guixt configuration file. If you are not logged into SAP, the script will be in the Workbench directory. Usually, the script is named 'TCODE_excel.sjs', so if we used the VA01 transaction, the script will be named 'VA01_excel.sjs'. The name can be found in the Screen Name field in the Workbench Settings tab.
- Rename the generated script to the actual name of the SAP screen in question. In our example, we are using the VA01 transaction, so the new name will be 'SAPMV45A.E0101.sjs'.
Note: If there is an existing script with the same name in the script directory, temporarily rename the existing script to something else. Close all open SAP windows, including the logon pad.
- Go to the script directory and ensure that the ELOGON.sjs file is present and that it contains the command to load the wsoffice extension.
Note: WSOffice is an extension to the WS platform that is bundled with Workbench. It must be loaded for the Excel functionality to work correctly. Please consult the WS Reference Library on the Synactive website for instructions on how to load the necessary files.
- Find the spreadsheet generated by Workbench. It should be in the Workbench directory. Open the spreadsheet and enter the data that you need to upload to the SAP.
Note: You must close the spreadsheet when you are done entering data and you cannot make changes to the spreadsheet during the upload process.
- Re-launch SAP and navigate to the VA01 screen. It should now appear as in the example shown below. You can now enter data as needed.
- Click Import from Excel button. Then, a Windows dialog will appear, asking the user to specify an Excel spreadsheet, as shown below.
- Choose the appropriate spreadsheet. In our example, we will select the spreadsheet named 'VA01_excel_053012.xls' as shown above. Click Open.
- The Excel spreadsheet will open. Both the spreadsheet and the command window will show the progress of the migration and will display any errors that occurred during the process, as shown in the example below.
Note: If you have not entered any data in the spreadsheet, no actions will occur when you click the Import button in SAP. - If you have entered any erroneous data, the spreadsheet will display the errors, as in the example below.
- If any errors occur, you can manually edit the Excel sheet to correct the errors. Once you make your changes, save your changes, close the Excel spreadsheet, and then click the Import button in SAP.
- After the data is uploaded, the spreadsheet will appear, as in the following example.
- After uploading data successfully, you can view data by searching for the newly created records in the corresponding Display transaction in SAP.