Well, this is nice except for two problems: first of all, it is not available in old SAP releases; secondly, it only provides the release level (e.g. 620, 640) and not the compilation and patch levels, which are things we have to know as well.
So, how do we go about getting the GUI release, compilation and patch levels of all computers? We can use the SAPVER program (available as a free download in SAP note 526199 at the SAP Support Portal web site) or a Windows [support tool] utility such as FILEVER.exe.
SAPVER's output looks like this:
Fortunately, SAPVER can be scripted and incorporated into Windows login scripts. The output information can be appended into a flat-file, which we can later examine and even choose to import into a spreadsheet or database table for further analysis.
The following script gets the SAPGUI version, compilation and patch level of a computer and it puts the information into a flat-file called "GUIversion.txt". The locations of the SAPVER tool and the flat-file are controlled in variables "share" and "flatfile" respectively:
@echo off :: GetSAPGUIversion.bat :: Author: Giovanni Davila :: Get SAPGUI version and put it in a flat-file. set share=fileservertools set flatfile=fileservertoolsGUIversion.txt %share%sapver /gui /release set guirel=%errorlevel% %share%sapver /gui /compilation set guicomp=%errorlevel% %share%sapver /gui /patchlevel set guipatch=%errorlevel% echo %computername%,%guirel% %guicomp% %guipatch% >>%flatfile%As said earlier, we can use a Windows utility such as FILEVER. It can be executed on one computer and have it read the file version information of the SAPGUI executable on each computer on the network.
As you may already know, the command "NET VIEW" lists all the computers on the current Windows domain. We can script FILEVER to loop through each computer on the network and output the SAPGUI version information into a flat-file.
See the sample script below:
@echo off :: SAPGUIversion.bat :: Author: Giovanni Davila :: It reports the SAPGUI version in all computers :: on the current network domain. :: Requirement: FILEVER.exe set GUIpath=c$Program FilesSAPFrontEndsapguisapgui.exe set FlatFile=sfc2k007sapssoSAPGUI.txt :: Delete previous flat file if found. if exist %FlatFile% del %FlatFile% for /f %%i in ('net view ^| find /i ""') do ( if exist "%%i%GUIpath%" ( for /f "tokens=1-2 delims= " %%a in ( 'FILEVER /v "%%i%GUIpath%" ^| find /i "FileVersion"') do ( echo %%i%%a%%b >>%FlatFile% echo %%i%%a%%b ) ) if not exist "%%i%GUIpath%" ( echo %%i no SAPGUI found! >>%FlatFile% echo %%i no SAPGUI found! ) ) echo Output file: %FlatFile%The script above filters the output of "NET VIEW" for all entries starting with a double backlash (). The path to the SAPGUI executable is controlled in variable "GUIpath". The output file is a tab-delimited flat file, which can be easily imported into a spreadsheet or database program.
The following is an example of an output file in Microsoft Excel:
Overcoming Basis challenges inside and outside the box
Basis challenge #1: Triggering jobs inside and outside SAP
Basis challenge #2: Reaching outside the application
Basis challenge #3: Obtaining the SAPGUI version of all computers
Review: Conclusion and more resources
This was first published in January 2006