The versionnumber() command is used principally to reduce web traffic when scripts are hosted in a SAP web repository, a FTP shared directory or a HTTP web share. In action, the versionnumber() command adds a version number to any scripts cached from SAPWR. If the versionnumber() is updated, then SAP will access SAPWR to re-cache scripts that are stored there. This version number can be assigned as per the user wish and operates by causing both the logon script and the session script to load each time, from the designated script directory.
Note: For the versionnumber command to function correctly, you must have one of the following two files:
- string- name of the directory to cache scripts.
You can use the following options with the versionnumber:
"systemid":"SAP_system_ID" - Add systemid in esession.sjs file.
In the following example, we will demonstrate the versionnumber command in action.
Add the following entry to the guixt.sjs file.
directory1 = "SAPWR:Z.GUIXTSID";
Set the RFC connection parameters in the guixt.sjs file
rfcuser = "XXXX"; rfcpassword = "XXXX";
- Add version number to either elogon or esession files. In this case we will use esession.sjs file and add the following entry:
- Now, when you logon to SAPGUI, WS will check the SAPWR directory and download the latest version of the script file into the specified folder.
- In this example, the script files are downloaded as shown in below format:
- If the user logon to SAPGUI with different system ID other than the specified one from esession.sjs file, then SAPWR will not cache any scripts into that folder by comparing the version number.
Change Version Number
To change the version number in SAPWR, perform the following steps:
Step 1: Open ESESSION.SJS file and add the version number.
Step 2: Logon to SAPGUI and navigate to /nsmw0 transaction.
Step 3: Select Binary data for WebRFC applications option from Web object and hit Enter.
Step 4: Enter object name and hit execute.
For Example: Z.GUIXTSID1.*
Step 5: Click create object.Enter object name and description.
- Object name would be package name followed by file name.
- Description would be file name.
Step 6: Click Import to upload the new version number. Upload the file and add package name.
Step 7: Click Save, then you will see the changes in the below format: