SAP details: Events News - Training - World wide sites  - Sap Labs SAP Magazine  - SAP Screen saver - Stock Price
BASIS Tips  by Giovanni Davila

  1. Check if your SAP servers are alive from the command prompt....Click here.
  2. Getting techncial info at the OS level....Click here.
  3. Controlling the SAPGUI New Visual Design....Click here.   
  4. Locking/Unlocking accounts - Behind the scenes....Click here.
  5. SAP Table with Version & Instance name....Click here.
  6. You can logon to SAPNet -R/3 frontEnd without using transaction OSS1....Click here.

Getting technical info at the OS level      

=======================================
Getting technical info at the OS level
=======================================  

It is very easy to obtain the patch level of some core R/3 executables such as: disp+work, tp and r3trans. Many people would like to know how to do this. Here, I will show you how to do it for R/3 systems running on Windows and SQL Server environments. 

  • 1. Go to the command prompt. 
  • 2. Change to the "run" directory of your SAP instance (cd \usr\sap\<SID>\sys\exe\run). 
  • 3. Run the following three commands: 

         dsp+work -V | find "patch number"  

         tp -V | find "patch number"      

         r3trans -V | find "patch number" 

If you want to see all the release information, then do not filter for the patch number. 

Now that you know how to do this, you can get creative and write a little script that reads the names of all your SAP servers from a text file and then it runs the three commands listed above. This way, you can get the patch level of all your systems by just running a script. This becomes in handy when you're consulting or putting reports together. 

___________________________________________________________________________

Controlling the SAPGUI New Visual Design:                     

SAPGUI 4.6x introduced the "new visual design" or "enjoySAP" look and feel.

As you know, users can switch back and forth the new visual design or the "light" look and feel. They simply use the "SAP Configuration" applet in Control Panel. However, you the administrator might need to control what they set up on their PCs in order to have a uniform platform.

The Windows registry controls this setting:

HKEY_LOCAL_MACHINE\Software\SAP\General\Enjoy\Active

By the default, it is set to "On". When the user changes it to the light version using the SAP Configuration icon that is on the desktop or Control Panel, then the registry value changes to "Off".

You can hide the SAP Configuration applet. You can even do this when setting up SAPGUI. You can edit the file SAPSETUP.NID and comment out these two lines:

!InstallFileList('%WINSYSDIR%')
 %SAPsourceDir%\sapgui\sapfcpl.cpl
EndProc/U/TS

In SAPGUI 4.6D the line above is number 1,459.

!CreateIconOrLink('SAP Configuration','%WINSYSDIR%\sapfcpl.cpl
','%SAPworkDir%','sapfcpl.cpl,0','Desktop\',' ',cgAsCommon)/TS

In SAPGUI 4.6D the line above is number 1,645.

This information is on my book "SAP Basis Administration ... A Step-by-Step Guide to Practical Daily Tasks and Activites", chapter 3, page 40.

___________________________________________________________________________

Locking/Unlocking accounts - Behind the scenes:                       

User accounts can be locked/unlocked via SU01 (User Maintenance.) But, what goes on behind the scenes? What does the system do to actually set this?

The table USR02 gets updated. The field UFLAG determines if the user account is locked or unlocked. The value "64" indicates that the user account is locked. The value "0" that the user account is unlocked.

Knowing this, you can then issue an update statement at the database level that locks all users in mass.

Don't lock yourself out, though! Use exceptions for super user accounts in your update statement.

Notice that 4.6b and above have made improvements to this kind of task, making the locking/unlocking a bit easier. However, changing at the database level is much faster and it is just one simple query.

___________________________________________________________________________

SAP table with Version and Instance name:                       

USAP R/3 stores its version, instance name and OS platform in tables! This is excellent as you can then query the <SID> database to get the R/3 version, Instance Name and OS platform as follows: select * from SVERS select * from TSLE4 You don't even have to log on to the application to get this info. The above query gives it to you in less than 1 second.

This and many other tips are found in my new book "SAP Basis Administration ... A Step-by-Step Guide to Practical Daily Tasks and Activities". 

___________________________________________________________________________

You can logon to SAPNet -R/3 FrontEnd without using transaction OSS1: 

You can logon to SAPNet -R/3 FrontEnd without using transaction OSS1. This way you don't have to open an SAP session just to log on to SAPNet.

Here is how to do it:

1. Create the file "saproute.ini" under the %winnt% directory and  add the following two entries:

[Router]
sapservX=/H/your-SAProuter-internal-IP-address/H/SAPServX-IP-address/H/

Example:
sapserv4=/H/200.10.10.24/H/204.79.199.2/H/

200.10.10.24 is my SAP router's IP address.
204.79.199.2 is SAPServ4's IP address.

2. Create the file "sapmsg.ini" under the %winnt% directory and add the following two entries:

[Message Server]
O01=oss001.wdf.sap-ag.de

3. Open the SAPLogon program (it is part of the SAP FrontEnd software -SAPGUI, on your PC).

4. Click on the "Groups" button.

5. Click on the down arrow for "SAP Router for" and select your  SAPServX from the list.

6. Click on the "Generate list" button.

7. Select "1_PUBLIC" from the list of groups.

8. Click on the "Add and Logon" button.

You're done! You can change the name of the SAPNet session in SAPLogon if you want to. No more typing OSS1!. 

___________________________________________________________________________

 

This is a very useful tip that can help you check if an SAP R/3 server is up and running.
This way, you don't have to log on to the system just to find out.
Additionally, you can create another script that uses the FOR command to check ALL
your servers so you don't have to check one by one. Have the script do the job for you.
 
The key to this script is the command SAPINFO.exe, which comes on the SAPFrontEnd
CD (SAPGUI). It's part of the SDK. If you don't have the file, e-mail me and I'll send it to you.
 
The syntax of SAPINFO is:
sapinfo ashost=host sysnr=nn
 
When used in a batch file (.bat or .cmd) you can check the errorlevel returned by the program.
If it is 1 then the system is not up and running.
 
My script below first checks if the system is on the network by 'pinging' it and expecting a reply.
 
If you want to check all your systems, then create another script (example: checkallrfcs.bat)
and use this command:
 
FOR /F %%i in (SAPsystems.txt) do call checkrfc %%i
 
The command above reads the file SAPsystems.txt, which should have a list of all the servers (one server name per line) and then it invokes the script 'checkrfc' passing the server name as a parameter.
 
I believe you will find it extremely useful and it will save you tons of time.
Now, you can just run the script, sit back and watch it report the status of the systems.
 
Script code:
 
@echo off
rem ======================================================================
rem Script: CheckRFC.BAT
rem It uses SAPINFO from the RFC-SDK (SAPGUI) to check an RFC destination.
rem It needs two parameters: 1. Hostname 2. Instance Number
rem A ping is sent to the host. If successful an RFC check is carried out.
rem By: Giovanni Davila
rem ======================================================================

if "%2"=="" goto NoParameter
echo Pinging %1 ...
ping %1 -n 2 | find /i "reply" >nul && goto CheckRFC
echo System does not exist on the network! & goto Bye

:CheckRFC
sapinfo ashost=%1 sysnr=%2 & if errorlevel 1 goto System_Down
echo ----------------------------
echo System is up. RFC checks OK!
echo ----------------------------
goto Bye

:System_Down
echo ---------------
echo System is down!
echo ---------------
goto Bye

:NoParameter
echo ----------------------------------------------
echo You did not specify at least one parameter!
echo Syntax: checkrfc "hostname" "instance number"
echo Example: checkrfc mydev 00
echo ---------
-------------------------------------

 













 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Planetsap.com
 
Home     Post an article    Suggestion   Contact
 
Disclaimer    Copyright; 1998-2002 Softron Systems, Inc. All rights reserved.
 
Home Discussion Forum Services Advertise Contact About Us Sign Up