Powered By

Free XML Skins for Blogger

Powered by Blogger

Friday, January 16, 2009

SAP Mass Lock All Printers with SPAD

If you have lots of printers (50 or more) and need to lock them for maintenance, you can used this mass locked printers tips to locked or unlocked all the SAP printers at one go.

To mass Lock all the printer in SAP:

Go to transaction code SPAD

On top of the screen menu click Utilities -> For output devices -> Export devices

On the screen Import and Export of Device Descriptions:

Export/Import file name: c:\temp\printer.txt

Frontend computer: Tick

Export: Tick

Export Export: Tick

Output device: Choose the Selection options Pattern and type a *
(* for all or a* for all printers starting with a)

Click the Execute button

Open the text file do a replace all of PADISABLED = "" to PADISABLED = "X"

Then import the same file.

or

Another way is to go through each output device in SPAD and click on 'Lock Printer in SAP System' which is in the DeviceAttributes tab

SAP Print to an USB printer from SAP

Is printing to a USB-printer using LOCL from SAP possible?

Yes, as long as this printer is defined on local workstation, it will work.

SAPLPD doesn't care on how the printer is connected, as long as Windows can print to it, SAPLPD will do its work.

Define one new device, also consider giving :

Device type as SAPWIN

Host Printer __default (yes, two underscores default)

Access Method : F

Make sure your desktop/PC Windows default printer is set to this USB printer.

Parallel printing to all the SAP device printers

If you have a situation where reports need to be send to multiple printers, you can configure a pool device type. A pool device type contain a list of SAP printers which the reports will be directed to.

Do this in transaction code SPAD for spool administration.

For example, in SPAD, type ZXXX next to the field 'Output devices',

Click the button Output devices.

In change mode, click the Create button.

Specify the Device type of your printer.

Click the tabstrips 'HostSpoolAccMethod'.

In the field "Host spool access method" set to "P: Device Pool".

Click the tabstrips 'DevicePool'

Click the options "Send to all devices in pool".

Type in the list of the SAP printers device you want the report to go to in this pool under the section 'Pool Device List'.

Now, when the users send a print to the new device for e.g. ZXXX, it will print to all the spool device you have specify.

SAP How can I print A3 format

My printer is HP LaserJet 5100

Note I can print ms word document in A3 format but I can't print A3 format in SAP

My output device setting are:

DeviceAttributes:
Device Type = THSAPWIN: MS-Windows-Printer via SAPLPD
Device Class = Standard printer
Access Method:
Host Spool Access Method = S: Print Using SAP Protocol

When I print SM50 output and select format X_65_255, it can print successfully but its format is A4.

What may I do wrong? Please help me how to set up for A3 printing in SAP.

Ps. Do I need to assign A3 format to be default format in that printer?

Is this task for BASIS or ABAP?

Bankly

In printer settings - SPAD - tray info - you can give the Page format for that tray .
did you try setting that ? Try setting DINA3.

Liju

Go to START --> SETTINGS ---> Printers

Right click on HP LaserJet 5100 ... Properties..
General Tab --> Printing Preferences --> Advanced --> Paper Size -->
Change it to 14x11 or A3

and

hplaserjet 5100 --> Properties --> Advanced Tab
Printing Defaults --> Advanced --> Paper Size -> change it to 14x11
or A3

hplaserjet 5100 --> Properties --> Device Settings tab -> Autoselect -
-> A3 or 14x11...

PrakashP

Our ABAPer already changed some attributes(ex. font name & size) in print control of SPAD followed by SAP Notes 21738.

Like this ->
# THSAPWIN Z_65_255

# SAPWIN indicatior makes it possible to send via berkeley protocol
\e%SAPWIN%
# change WinCharSet to 222 (Thai)
\eW222;
# set orientation(LANDSCAPE)
#\ePL
# set font name
\eFAngsana New;
# set font size(5.5ponits)->8p->5.5
\eS220
# set vertical spacing(8.7LPI)
#\el3.0;
# set horizontal spacing(24.0CPI)->20->18 (255/11) ->23
#\ec5.0;
# set top/left margin(1.0cm=568.5)
#\eMT567;
#\eML567;

However, it take moderately time to change font size and test report printing for A3 format.

Thank you for your recommend.

Bankly

I follow by your instruction. It's work well.

Note It doesn't need to setup these config at all.

Tab "Output Attributes"
Paper tray = "Paper tray 3"

Tab "Tray Info"
Tray 3 = "DINA3"

Key points of this solution, If the SAP spool server and the Microsoft Windows spool system are not on the same host, you must create a remote PC connection to the printer and force paper size to be A3 (Prakash's instruction)

By the way, I also adjust HP Laserjet 5100 from "EXEC" to "A3" in Tray 3 physically too. After that I can print ABAP List in A3 Format successfully.

Thank you again for the solution.

SAP Delete multiple spool request

The program are RSPO0041 or RSPO1041.

This is handy whenever you encounter a user who managed to create a lot of spool requests which are choking your system.

Deleting them with SP01 will be too slow and you will get time out if it exceed the online time limit specify by your basis people.

SAP Auto convert SAP spool output to PDF file

As of Release 4.6D, PDF format (Adobe Acrobat data format) can be created via the SAP spooler by using the device type "PDF1".

As a workaround, a report (RSTXPDFT4) is made available for the missing "direct PDF printing", which can read spool requests, convert to PDF and perform a frontend download.

Read OSS Note 317851 - Printing PDF files in 4.6C/4.6B/4.5B

Note the restrictions specified in Note 323736 with the print output with PDF.

Caution when modifying device type ZPDF1, see Note 437696.

Version <>

If you are in version less than 4.6D, you can configure an output type to convert the spool automatically into a PDF format into your local harddisk but not do a "direct PDF printing".

When you print to this PDF output type, it will prompt you to enter the file name of your PDF file to be stored into your local harddisk.

First you have to add a printer using

Windows -> Start -> Settings -> Printers -> Generic / Text Only -> Port : Print to File

Next create a new device type e.g. ZPDF -> Select device type ZPDF1

Options for HostSpoolAccMethod -> Host spool access method : F : Printing on Frontend Computer
Host Printer : __DEFAULT or Generic / Text Only

Save your entries.

When you print to the device type ZPDF, choose Generic / Text Only for the Frontend Computer if it is not the default type.

A user prompt Print to File will appear to let you specify the Output File Name.

SAP Printing ABAP Report over LAN and WAN

For the LAN setup for local printer you can defined it as device LOCL

Device type: SAPWIN
Host printer: __DEFAULT
Host spool access method: F (Printing on front end computer)

This printer will works fine on your LAN.

For the WAN, assuming that you have 2 office connected over the internet and they work fine with the printer LOCL.

Now, you need to have a Print Server where you have installed many of the printer, some of them over WAN and they will work fine if you do this :-

The server must have SAPLPD installed.

Output device: LPFP
Device type: SAPWIN
Destination host: sapdev
Host printer: HP_HP1 (printer name on the Printer Server)
Host spool access method: S (Print on LPDHOST via SAP protocol)

SAP Sending faxes from SAP

Some guidelines how to you can setup faxing from SAP :-

You will need an additional software to be installed.

The best way to do this is to get a standard desktop PC with a modem attached. Buy a copy of Winfax 10 (its only about $100 to buy.)

When you have Winfax setup and working locally, install SAPLPD (put it in the startup group so its loads on startup).

WinFax will create a shared fax on the PC (For e.g. IFAX).

When this is done create a printer/Fax in transaction SPAD.
Device type = SAPWIN Rel.4.x/SAPlpd
Device class = Fax
Host Spool access method = S;print using SAP protocol
Dest. host = PC IP address
Host printer = Shared fax name on PC(i.e IFAX)

Make sure you have all the lasted SAPLPD + dll's

After that is done create the locations in transaction SCOM, they are self explainitory from there.

Mass Lock All Printers with SPAD

Mass Lock All Printers with SPAD

If you have lots of printers (50 or more) and need to lock them for maintenance, you can used this mass locked printers tips to locked or unlocked all the SAP printers at one go.

To mass Lock all the printer in SAP:

Go to transaction code SPAD

On top of the screen menu click Utilities -> For output devices -> Export devices

On the screen Import and Export of Device Descriptions:

Export/Import file name: c:\temp\printer.txt

Frontend computer: Tick

Export: Tick

Export Export: Tick

Output device: Choose the Selection options Pattern and type a *
(* for all or a* for all printers starting with a)

Click the Execute button

Open the text file do a replace all of PADISABLED = "" to PADISABLED = "X"

Then import the same file.

or

Another way is to go through each output device in SPAD and click on 'Lock Printer in SAP System' which is in the DeviceAttributes tab

Print to an USB printer from SAP

Print to an USB printer from SAP

Is printing to a USB-printer using LOCL from SAP possible?

Yes, as long as this printer is defined on local workstation, it will work.

SAPLPD doesn't care on how the printer is connected, as long as Windows can print to it, SAPLPD will do its work.

Define one new device, also consider giving :

Device type as SAPWIN

Host Printer __default (yes, two underscores default)

Access Method : F

Make sure your desktop/PC Windows default printer is set to this USB printer.

SAP Parallel printing to all device printers

Parallel printing to all the SAP device printers

If you have a situation where reports need to be send to multiple printers, you can configure a pool device type. A pool device type contain a list of SAP printers which the reports will be directed to.

Do this in transaction code SPAD for spool administration.

For example, in SPAD, type ZXXX next to the field 'Output devices',

Click the button Output devices.

In change mode, click the Create button.

Specify the Device type of your printer.

Click the tabstrips 'HostSpoolAccMethod'.

In the field "Host spool access method" set to "P: Device Pool".

Click the tabstrips 'DevicePool'

Click the options "Send to all devices in pool".

Type in the list of the SAP printers device you want the report to go to in this pool under the section 'Pool Device List'.

Now, when the users send a print to the new device for e.g. ZXXX, it will print to all the spool device you have specify.

The above step is done using SAP 4.6c

SAP How can I print A3 format

How can I print A3 format in SAP

My printer is HP LaserJet 5100

Note I can print ms word document in A3 format but I can't print A3 format in SAP

My output device setting are:

DeviceAttributes:
Device Type = THSAPWIN: MS-Windows-Printer via SAPLPD
Device Class = Standard printer
Access Method:
Host Spool Access Method = S: Print Using SAP Protocol

When I print SM50 output and select format X_65_255, it can print successfully but its format is A4.

What may I do wrong? Please help me how to set up for A3 printing in SAP.

Ps. Do I need to assign A3 format to be default format in that printer?

Is this task for BASIS or ABAP?

Bankly

In printer settings - SPAD - tray info - you can give the Page format for that tray .
did you try setting that ? Try setting DINA3.

Liju

Go to START --> SETTINGS ---> Printers

Right click on HP LaserJet 5100 ... Properties..
General Tab --> Printing Preferences --> Advanced --> Paper Size -->
Change it to 14x11 or A3

and

hplaserjet 5100 --> Properties --> Advanced Tab
Printing Defaults --> Advanced --> Paper Size -> change it to 14x11
or A3

hplaserjet 5100 --> Properties --> Device Settings tab -> Autoselect -
-> A3 or 14x11...

PrakashP

Our ABAPer already changed some attributes(ex. font name & size) in print control of SPAD followed by SAP Notes 21738.

Like this ->
# THSAPWIN Z_65_255

# SAPWIN indicatior makes it possible to send via berkeley protocol
\e%SAPWIN%
# change WinCharSet to 222 (Thai)
\eW222;
# set orientation(LANDSCAPE)
#\ePL
# set font name
\eFAngsana New;
# set font size(5.5ponits)->8p->5.5
\eS220
# set vertical spacing(8.7LPI)
#\el3.0;
# set horizontal spacing(24.0CPI)->20->18 (255/11) ->23
#\ec5.0;
# set top/left margin(1.0cm=568.5)
#\eMT567;
#\eML567;

However, it take moderately time to change font size and test report printing for A3 format.

Thank you for your recommend.

Bankly

I follow by your instruction. It's work well.

Note It doesn't need to setup these config at all.

Tab "Output Attributes"
Paper tray = "Paper tray 3"

Tab "Tray Info"
Tray 3 = "DINA3"

Key points of this solution, If the SAP spool server and the Microsoft Windows spool system are not on the same host, you must create a remote PC connection to the printer and force paper size to be A3 (Prakash's instruction)

By the way, I also adjust HP Laserjet 5100 from "EXEC" to "A3" in Tray 3 physically too. After that I can print ABAP List in A3 Format successfully.

Thank you again for the solution.

SAP Delete multiple spool request

Delete multiple spool request

The program are RSPO0041 or RSPO1041.

This is handy whenever you encounter a user who managed to create a lot of spool requests which are choking your system.

Deleting them with SP01 will be too slow and you will get time out if it exceed the online time limit specify by your basis people.

SAP Auto convert SAP spool output to PDF file

Auto convert SAP spool output to PDF file

As of Release 4.6D, PDF format (Adobe Acrobat data format) can be created via the SAP spooler by using the device type "PDF1".

As a workaround, a report (RSTXPDFT4) is made available for the missing "direct PDF printing", which can read spool requests, convert to PDF and perform a frontend download.

Read OSS Note 317851 - Printing PDF files in 4.6C/4.6B/4.5B

Note the restrictions specified in Note 323736 with the print output with PDF.

Caution when modifying device type ZPDF1, see Note 437696.

Version <>

If you are in version less than 4.6D, you can configure an output type to convert the spool automatically into a PDF format into your local harddisk but not do a "direct PDF printing".

When you print to this PDF output type, it will prompt you to enter the file name of your PDF file to be stored into your local harddisk.

First you have to add a printer using

Windows -> Start -> Settings -> Printers -> Generic / Text Only -> Port : Print to File

Next create a new device type e.g. ZPDF -> Select device type ZPDF1

Options for HostSpoolAccMethod -> Host spool access method : F : Printing on Frontend Computer
Host Printer : __DEFAULT or Generic / Text Only

Save your entries.

When you print to the device type ZPDF, choose Generic / Text Only for the Frontend Computer if it is not the default type.

A user prompt Print to File will appear to let you specify the Output File Name.

SAP Printing ABAP Report over LAN and WAN

Printing ABAP Report over LAN and WAN

For the LAN setup for local printer you can defined it as device LOCL

Device type: SAPWIN
Host printer: __DEFAULT
Host spool access method: F (Printing on front end computer)

This printer will works fine on your LAN.

For the WAN, assuming that you have 2 office connected over the internet and they work fine with the printer LOCL.

Now, you need to have a Print Server where you have installed many of the printer, some of them over WAN and they will work fine if you do this :-

The server must have SAPLPD installed.

Output device: LPFP
Device type: SAPWIN
Destination host: sapdev
Host printer: HP_HP1 (printer name on the Printer Server)
Host spool access method: S (Print on LPDHOST via SAP protocol)

Sending faxes

Sending faxes from SAP

Some guidelines how to you can setup faxing from SAP :-

You will need an additional software to be installed.

The best way to do this is to get a standard desktop PC with a modem attached. Buy a copy of Winfax 10 (its only about $100 to buy.)

When you have Winfax setup and working locally, install SAPLPD (put it in the startup group so its loads on startup).

WinFax will create a shared fax on the PC (For e.g. IFAX).

When this is done create a printer/Fax in transaction SPAD.
Device type = SAPWIN Rel.4.x/SAPlpd
Device class = Fax
Host Spool access method = S;print using SAP protocol
Dest. host = PC IP address
Host printer = Shared fax name on PC(i.e IFAX)

Make sure you have all the lasted SAPLPD + dll's

After that is done create the locations in transaction SCOM, they are self explainitory from there.

SAP Basic Understanding Regarding to Spool

Basic Understanding Regarding to Spool

Explain on Local Printing, Remote Printing, Front End Printing.
Concept of logical server and SAPLPD.

Tcode : SPAD

SPAD - Spool Administration

Local Printing means that your spool server (R/3) and print manager (OS) are running on the same machine and the printer is connected locally or via network connection to the Print manager (OS).
Access Method for local printing :
C : Direct operating system call - for windows
L : connect locally via lp/lpr with signal - for unix

Remote Printing means that your spool server (R/3) and print manager (OS) are running on different machine and the printer may be connected locally or via network connection to the print manager (OS).
Access Method for Remote printing :
U : Print on LPDHOST via berkeley protocol - for windows and unix
S : Print on LPDHOST via SAP protocol - for windows

Front end printing means that printer is connected to the front end system. there is no need to define the printer on the SAP system.
Access method for front end printing :
F : Print on front end (locally) via SAPLPD

Logical Server are mapped to the physical server or another logical server. These servers are used for load balancing purpose.

SAPLPD daemon is an interface between Spool server (R/3) and Print Manager (OS). when using the access method U,S and F this daemon program should be running on the print manager (OS) (in case of U,S) and on the front end system (in case of F).

SAP How to send popup message to a specific user

How do you do that? By running a function module!!
SM02 sends messages to all users, not a specific one
So use function module TH_POPUP
goto Transaction code SE37 enter the function module name & test run it
the the resulting screen is shown below, type the details and execute
The the user will see message like this ( System name is blurred for privacy reasons)


The user must be logged into the system to receive the message

Monday, January 12, 2009

SAP Apply OSS Notes On My SAP R/3 System

How to apply OSS notes to my R/3 system?

In order to fix one of the problem in R/3 system, SAP will asked you to download an OSS notes which is a ".car" file.

To work with a CAR File do the following at OS Level:

Get into OS as adm

Copy the .CAR file to a Temporary Directory.

Uncompress the file with SAPCAR

Copy the the data file generated in the data transport directory
( ej: = /usr/Sap/trans/data).

Copy the the cofile file generated in the cofiles transport directory
( = ej: /usr/Sap/trans/cofiles).

Run transaction STMS

Upload the support package with SPAM transaction and the support package will show "New support packages".

**********

Examples of CAR command :-

1) UNIX only:

Log on as user adm.
cd /usr/sap/trans
CAR -xvf tmp/.CAR -V

2) Windows NT only:

Log on as user ADM.
cd \USR\SAP\TRANS
CAR -xvf TMP\.CAR

This Will create two(2) FILES

After you run SPAM you MUST run STMS and check the transport queues

**********

As per 315963 note you can direct made the changes in the program or you can apply the support pack.

a) If you want to apply correction then first you need to register the object in SAP, so that you will get the Access key and then you can make the changes.

b) If you want to import the support pack then you need to down load from SAP market-place. and this is in CAR file. and then you need extract the same using CAR utility.
ex: CAR -xvf abc.car

or

you can directly apply the patch from SAPGUI, login to 000 client and then you can load the patch from Presentation server.

Also check what is your current basis patch level?

For example if you want to apply patch 07 and you are having 05 then you need to apply 06 and then apply 07.

**********

Things to take note of:-

It would definitely be better to apply the latest spam/saint spam manager, tp, R3trans and possibly a new kernel patch.

This is not a simple task to complete on the fly. By applying SAP support packs, you may run into problems with SPDD and SPAU adjustments. Also include the fact that the support packages may break one of your transactions. You may want to test this in your sandbox environment, if you have one, before tackling it.

In most situation when you apply support packages, it can takes about 3 weeks to fully test the support packages before you can apply them to the production system.

Do test your "golden" transactions to make sure that they are not broken. If you are not familiar with SPDD and/or SPAU adjustments than do not attempt to load support packages.

You may be better off just to modify the SAP object in question via OSS note.

Manually Applying OSS note on SAP Standard Program

What is mean by OSS how to work on that?

OSS are online sap support notes. These notes are available online for solving critical problems in sap system.We may use the already existing notes or may add our own quaries.

In order to apply any OSS note, you have to be authorized by your company and be assigned an OSS ID and password.

For any SAP standard program modification, you are required to login to OSS and request for a repair program Access key.

Access the SAP Support Portal:

http://service.sap.com/

- Keys and Requests

-- Request license key

--- Follow the Steps 1 to 5 of the License keys for SAP Business Suite

--------------

Follow this step to obtain the Program Access key:

Menu Path: System -> Services -> SAP Service (Transaction code OSS1)

Login in with your OSS ID and Password

Click the Registration button

Click Register Object

Double click R/3 Value Contract

Fill in the Object Registration for Installation:

For e.g.
PGMID/Object/Name: R3TR FUGR MIGO
SAP release: 46C

Finished, click the Register button

Select the Key number and use the Copy and Paste short key to copy the Access key

You are now able to modify the SAP standard program.

Finished the modification, do remember to transport it to the production system after all the necessary testing.

Upgrading SAP Kernel, Hotpatches and Database Startup

Kernel upgrade is an easy process.

Go to the SAP OSS Site :-

http://service.sap.com/SWCenter-Main
SAP R/3
SAP R/3 4.6C
Binary Patches
SAP KERNEL 4.6D

Download the kernel programs in a temporary folder.

Create a folder and copy the executables /exe/run/ then uncar the downloaded files and replace the executables.

It is recommended to shutdown the R/3 database and all services including saposcol.

Then restart your system.

A couple of important points to remember are :-.

a) Always make a copy of the files you're going to replace. For e.g. Create a directory (oldkern) and copy all the old files
before replacing them (this helps when sometimes the new Kernel has problems, and you can revert it)

b) You have to shutdown SAP and the Database using the OLD kernel file. Again it is good practice to shutdown everything
first.

Refer to this OSS note which is pretty useful :-

102461 - Installation of 4.0B/40B_COM kernel with 4.0A/40B

How do I find out the current patch level in SAP R/3 4.7

You can use either of these two methods:

1: Follow the path

System --> Status --> Component Information (The Magnifying glass button in the SAP System Data section)

2: Use the Transaction code ---- spam

spam(Support package manager) --> package level

Steps to Start Your Database After Kernel Upgrade

Do these steps to start your database:

1. Open command prompt

2. Give command: SQLPLUS "/as sysdba"
If its giving message connected to idle instance then proceed:

3. Give command: startup open
If its giving error that database is already open, shut it down first. Then first check what database process is up and running.

4. Try stopping the database: shutdown immediate.

5. Follow step 3 again after shut down the database.

6. Exit from SQLPLUS

7. Run command on command prompt: R3trans -d
Check the results whether its still giving error or if it completed with 000 return code, then try starting SAP.

Follow the above steps.

Applying SP4 to Windows 2000 Server

You need to download a newer SAP kernel. You will need an OSS ID and password to access http://service.sap.com/patches. And you will need to know what R/3 version, database, and OS you currently use.

Once you are at the patches website, you will need to click in the navigation tree:
R/3 -> R/3 + ?Release number? -> Binary patches ->
SAP Kernel + ?Release number? + 32-Bit -> NT/I386.

Download everything from the database section and everything from the database independent section.

One of the files you downloaded should start with SAPCAR and end with a *.exe.
Rename this file to SAPCAR.EXE and place it in the c:\winnt\system32 directory.
Go to \usr\sap\\SYS\exe\run and backup the entire directory to some other directory -
I usually create a \usr\sap\\SYS\exe\backup_run directory. Make sure SAP is down, the database is down, the TNS listener is down, and the SAPOSCOL is down before you do this.

Uncompress all the files you downloaded by opening a DOS box and typing:

SAPCAR -xvf .CAR

All files ending with .SAR or .CAR must be uncompressed. All the extracted files need to be moved to the \usr\sap\\SYS\exe\run AFTER that directory has been completely backed up.

Once everything has been downloaded, uncompressed, and moved into the exe\run directory, you can start the SAPOSCOL, the listener and the database services again. And then you should be able to start SAP. If there are any application servers for this database instance, the SAP software will update those kernels on startup.

If the SAP instance STILL does not come back up, you can take down everything again and restore the exe\run directory with your backup copy. Nothing will have been damaged.

SPAU and SPDD OSS

When you apply a package, a large number of objects are changed.

If you have applied any OSS notes to objects in your system, the hot package may overwrite these objects.

SPDD is used to identify dictionary objects

and

SPAU (repository objects), will identify any objects where the hot package is overwriting changes you have made through OSS notes.

You must check all objects identified in SPAU and decide whether you need to reapply the OSS note or reset the code to the original SAP Code.

If, for instance, you are applying hot package 34, SPAU identifies an object where you have applied an OSS note. You must check the OSSs note and see if SAP have fixed that note in a hot package.

If the OSS note has been fixed in hot package 34, then you should reset the object to its original source code. This means that there is no repair flag set against this object again and it is now SAP standard code.

If, however, the object is not fixed until hot package 38, or there is no fix available you have to reapply the OSS note, otherwise users will encounter the problems they had before the note was applied.

You must transport all reapplied notes and Reset to SAP Standard objects after you apply your hot package to your QAS and PRD systems.

How to know the kernel version of a SAP R3 system?

Subject: How to know the kernel version of a SAP R3 system

Hi all

Could someone tell me how can I find the Kernel version of a SAP R3 system ?
example, for those releases
SAP R3 4.0B, 4.5B, 4.6B, 4.6D and so on ....

Thanks for your help


Subject: RE: How to know the kernel version of a SAP R3 system

From any screen choose System-->Status then click the 'other kernel info' icon (between Navigate and Cancel).
The same information can be found at OS level in the dispatcher trace file: /usr/sap///work/dev_disp.
Regards,


Subject: RE: How to know the kernel version of a SAP R3 system

Hi,

Goto transaction sm51, and click (not double click) on the the Database
server and then click on release notes. there you will see the SAP R/3
kernel and patch level etc.

Regards


Subject: RE: How to know the kernel version of a SAP R3 system

You can use the System ==> Status and then Other
Kernel Info button to get the details about the Kernel
Release, Patch levels etc.

Regards,


Subject: RE: How to know the kernel version of a SAP R3 system

I think an even more convenient way to do this is to use SM51. Highlight
the server you are interested in and click on "Release Information". This
provides you a location to view all servers with out logging on to each
one. The answer below will give you information about the server you are
connected to only.


Subject: RE: How to know the kernel version of a SAP R3 system

Also try "disp+work -v" on server.


Subject: RE: How to know the kernel version of a SAP R3 system

go to transaction SM51 -->release information

Transaction code to pre-compile all system program OSS

If I have to run SGEN and have to recycle the server as well for clearing out memory, does it make sense to run SGEN first and recycle afterwards, because SGEN will sort of litter the memory or is it inconsequential what runs first.

SGEN is ued to "compile" ABAP programs. Results are put in database.

So, if you restart SAP, compiled results will still be in the database, so, no need to run SGEN again.

Make use of the transaction 'SGEN' to re-generate all the SAP programs after you change version of your SAP kernel, upgrade SAP system or apply support packages.

Do take care of the table spaces and use SAPDBA to observe them.

Do it during a weekend which is the best or a period of time with very very low users activity.

It will takes about 5 to 8 hours depending on the type of hardware configuration you are using.



Reporting a Problem to SAP BASIS

When I tried to report a problem to SAP using
http://service.sap.com/message url it provided 4 steps to follow:

1) Choose system
2) Prepare Solution Search
3) Find Solution
4) Enter Message

I could do the step 1 but dont know what to do at steps 2, 3 and 4.

SAP changed the customer message screens so you now have to navigate through a search of the SAP Notes before being able to create a message.

We usually search the Notes extensively before we create a message, so we just enter a blank search and then go on to create the message.

Follow the steps, It may solve your problem:

1. Copy following url into web browser : http://service.sap.com/message

It will ask you for your OSS ID and password .
A Screen which contain a push Button Select System displayed .

2. Push the Button Select System .
It will open a sub screen in which there will be a hierarchical structue which looks like

-
-

+
+

Here + indicate that you have a sub tree .
Specific product like SAP R/3 T for Services , SCM , CRM , ERP etc

3. Select the system for which you need to log a message
It will take you to message screen screen.

4. Select you domain for problem for example Basis problem with Database where dataBASE IS oracle then Message type will be BC-DB-ORA
* .
5 Select priority of Message

6 . Write Message and send it to SAP

Apply Support Packs To My SAP SYSTEM OSS

How can I apply support packs to my 4.7 IDES SYSTEM?
SAP"- SAP R3 4.7EE,
DATABASE : ORACLE 8.1.7
OS : WINDOWS 2003 SERVER
What is the step by step procedure and how to apply in r/3?

You have various issues with your setup:

- Oracle 8.1.7 is not supported under Windows 2003
- Oracle 8.1.7 is out of maintenance since three years

During SP application you will maybe run into problems that can't be
fixed since your installation is just too old and unsupported. *-- Markus

As mentioned, it's true that it won't get supported on Oracle 8. The best combination would be with 9i

Any How I have mentioned the steps below to apply for patches.

To Apply Support packs first up all you need to download the patches. When you have the downloaded the file i.e.. (*.car ) patch file then you can extract and apply it in two ways.

1. Go to command prompt through cmd (if you are using windows) and go to the folder where you have download these files ( could be in \downloaded folder\ ) type this command on command prompt without quotes "sapcar -xvf .sar". Now it will create a folder called EPS and a folder called IN inside EPS. Go to this folder and it will show two extracted files with extension " .att " and " .pat ". Copy this two files into yours trans\eps\in folder which could be something like \usr\sap\trans\eps\in folder.Then type spam on your session and navigate to Support Package\Load Package\From Application Server and it will ask for Path confirm it Say " YES"Select the patch imported and double click on it and then click on small truck Icon and it start Import.

2. Type Spam on session then navigate to Support Package\Load Package\From FrontEnd \ and Navigate to path where you have downloaded the *.SAR file of Support Pack.Now it will open a popup window and then click on decompress button ( It is front-End process for extracting or decompressing .sar file in .pat and .att extension ) After that click on Display-Define button on right hand side.) Select the BASIS or ABAP patch ( whichever you are applying *) what ever you are after and import it in queue. After that click on Small truck Icon in menu i.e.. (import Queue) and it Starts importing.
*-- Deepanshu Sharma
* Note :- Basis patch starts with KBxxxx.sar and Abap Patch start with KAxxxx.sar likewise.
* Note :- If you are applying all support pack it may ask you to increase your spam level (SUPPORT PACK MANAGER).

Apply OSS Notes On My SAP R/3 System

Apply OSS Notes On My SAP R/3 System

How to apply OSS notes to my R/3 system?

In order to fix one of the problem in R/3 system, SAP will asked you to download an OSS notes which is a ".car" file.

To work with a CAR File do the following at OS Level:

Get into OS as adm

Copy the .CAR file to a Temporary Directory.

Uncompress the file with SAPCAR

Copy the the data file generated in the data transport directory
( ej: = /usr/Sap/trans/data).

Copy the the cofile file generated in the cofiles transport directory
( = ej: /usr/Sap/trans/cofiles).

Run transaction STMS

Upload the support package with SPAM transaction and the support package will show "New support packages".

**********

Examples of CAR command :-

1) UNIX only:

Log on as user adm.
cd /usr/sap/trans
CAR -xvf tmp/.CAR -V

2) Windows NT only:

Log on as user ADM.
cd \USR\SAP\TRANS
CAR -xvf TMP\.CAR

This Will create two(2) FILES

After you run SPAM you MUST run STMS and check the transport queues

**********

As per 315963 note you can direct made the changes in the program or you can apply the support pack.

a) If you want to apply correction then first you need to register the object in SAP, so that you will get the Access key and then you can make the changes.

b) If you want to import the support pack then you need to down load from SAP market-place. and this is in CAR file. and then you need extract the same using CAR utility.
ex: CAR -xvf abc.car

or

you can directly apply the patch from SAPGUI, login to 000 client and then you can load the patch from Presentation server.

Also check what is your current basis patch level?

For example if you want to apply patch 07 and you are having 05 then you need to apply 06 and then apply 07.

**********

Things to take note of:-

It would definitely be better to apply the latest spam/saint spam manager, tp, R3trans and possibly a new kernel patch.

This is not a simple task to complete on the fly. By applying SAP support packs, you may run into problems with SPDD and SPAU adjustments. Also include the fact that the support packages may break one of your transactions. You may want to test this in your sandbox environment, if you have one, before tackling it.

In most situation when you apply support packages, it can takes about 3 weeks to fully test the support packages before you can apply them to the production system.

Do test your "golden" transactions to make sure that they are not broken. If you are not familiar with SPDD and/or SPAU adjustments than do not attempt to load support packages.

You may be better off just to modify the SAP object in question via OSS note.

Manually Applying OSS note on SAP Standard Program

Manually Applying OSS note on SAP Standard Program

What is mean by OSS how to work on that?

OSS are online sap support notes. These notes are available online for solving critical problems in sap system.We may use the already existing notes or may add our own quaries.

In order to apply any OSS note, you have to be authorized by your company and be assigned an OSS ID and password.

For any SAP standard program modification, you are required to login to OSS and request for a repair program Access key.

Access the SAP Support Portal:

http://service.sap.com/

- Keys and Requests

-- Request license key

--- Follow the Steps 1 to 5 of the License keys for SAP Business Suite

--------------

Follow this step to obtain the Program Access key:

Menu Path: System -> Services -> SAP Service (Transaction code OSS1)

Login in with your OSS ID and Password

Click the Registration button

Click Register Object

Double click R/3 Value Contract

Fill in the Object Registration for Installation:

For e.g.
PGMID/Object/Name: R3TR FUGR MIGO
SAP release: 46C

Finished, click the Register button

Select the Key number and use the Copy and Paste short key to copy the Access key

You are now able to modify the SAP standard program.

Finished the modification, do remember to transport it to the production system after all the necessary testing.

Upgrading SAP Kernel, Hotpatches and Database Startup

Upgrading SAP Kernel, Hotpatches and Database Startup

Kernel upgrade is an easy process.

Go to the SAP OSS Site :-

http://service.sap.com/SWCenter-Main
SAP R/3
SAP R/3 4.6C
Binary Patches
SAP KERNEL 4.6D

Download the kernel programs in a temporary folder.

Create a folder and copy the executables /exe/run/ then uncar the downloaded files and replace the executables.

It is recommended to shutdown the R/3 database and all services including saposcol.

Then restart your system.


A couple of important points to remember are :-.

a) Always make a copy of the files you're going to replace. For e.g. Create a directory (oldkern) and copy all the old files
before replacing them (this helps when sometimes the new Kernel has problems, and you can revert it)

b) You have to shutdown SAP and the Database using the OLD kernel file. Again it is good practice to shutdown everything
first.


Refer to this OSS note which is pretty useful :-

102461 - Installation of 4.0B/40B_COM kernel with 4.0A/40B


How do I find out the current patch level in SAP R/3 4.7

You can use either of these two methods:

1: Follow the path

System --> Status --> Component Information (The Magnifying glass button in the SAP System Data section)

2: Use the Transaction code ---- spam

spam(Support package manager) --> package level


Steps to Start Your Database After Kernel Upgrade

Do these steps to start your database:

1. Open command prompt

2. Give command: SQLPLUS "/as sysdba"
If its giving message connected to idle instance then proceed:

3. Give command: startup open
If its giving error that database is already open, shut it down first. Then first check what database process is up and running.

4. Try stopping the database: shutdown immediate.

5. Follow step 3 again after shut down the database.

6. Exit from SQLPLUS

7. Run command on command prompt: R3trans -d
Check the results whether its still giving error or if it completed with 000 return code, then try starting SAP.

Follow the above steps.

SAP - Applying SP4 to Windows 2000 Server

Applying SP4 to Windows 2000 Server

You need to download a newer SAP kernel. You will need an OSS ID and password to access http://service.sap.com/patches. And you will need to know what R/3 version, database, and OS you currently use.

Once you are at the patches website, you will need to click in the navigation tree:
R/3 -> R/3 + ?Release number? -> Binary patches ->
SAP Kernel + ?Release number? + 32-Bit -> NT/I386.

Download everything from the database section and everything from the database independent section.

One of the files you downloaded should start with SAPCAR and end with a *.exe.
Rename this file to SAPCAR.EXE and place it in the c:\winnt\system32 directory.
Go to \usr\sap\\SYS\exe\run and backup the entire directory to some other directory -
I usually create a \usr\sap\\SYS\exe\backup_run directory. Make sure SAP is down, the database is down, the TNS listener is down, and the SAPOSCOL is down before you do this.

Uncompress all the files you downloaded by opening a DOS box and typing:

SAPCAR -xvf .CAR

All files ending with .SAR or .CAR must be uncompressed. All the extracted files need to be moved to the \usr\sap\\SYS\exe\run AFTER that directory has been completely backed up.

Once everything has been downloaded, uncompressed, and moved into the exe\run directory, you can start the SAPOSCOL, the listener and the database services again. And then you should be able to start SAP. If there are any application servers for this database instance, the SAP software will update those kernels on startup.

If the SAP instance STILL does not come back up, you can take down everything again and restore the exe\run directory with your backup copy. Nothing will have been damaged.

SPAU and SPDD

SPAU and SPDD

When you apply a package, a large number of objects are changed.

If you have applied any OSS notes to objects in your system, the hot package may overwrite these objects.

SPDD is used to identify dictionary objects

and

SPAU (repository objects), will identify any objects where the hot package is overwriting changes you have made through OSS notes.

You must check all objects identified in SPAU and decide whether you need to reapply the OSS note or reset the code to the original SAP Code.

If, for instance, you are applying hot package 34, SPAU identifies an object where you have applied an OSS note. You must check the OSSs note and see if SAP have fixed that note in a hot package.

If the OSS note has been fixed in hot package 34, then you should reset the object to its original source code. This means that there is no repair flag set against this object again and it is now SAP standard code.

If, however, the object is not fixed until hot package 38, or there is no fix available you have to reapply the OSS note, otherwise users will encounter the problems they had before the note was applied.

You must transport all reapplied notes and Reset to SAP Standard objects after you apply your hot package to your QAS and PRD systems.

How to know the kernel version of a SAP R3 system?

How to know the kernel version of a SAP R3 system?

-----Original Message-----
Subject: How to know the kernel version of a SAP R3 system

Hi all

Could someone tell me how can I find the Kernel version of a SAP R3 system ?
example, for those releases
SAP R3 4.0B, 4.5B, 4.6B, 4.6D and so on ....

Thanks for your help

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

From any screen choose System-->Status then click the 'other kernel info' icon (between Navigate and Cancel).
The same information can be found at OS level in the dispatcher trace file: /usr/sap///work/dev_disp.
Regards,

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

Hi,

Goto transaction sm51, and click (not double click) on the the Database
server and then click on release notes. there you will see the SAP R/3
kernel and patch level etc.

Regards

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

You can use the System ==> Status and then Other
Kernel Info button to get the details about the Kernel
Release, Patch levels etc.

Regards,

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

I think an even more convenient way to do this is to use SM51. Highlight
the server you are interested in and click on "Release Information". This
provides you a location to view all servers with out logging on to each
one. The answer below will give you information about the server you are
connected to only.

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

Also try "disp+work -v" on server.

-----Reply Message-----
Subject: RE: How to know the kernel version of a SAP R3 system

go to transaction SM51 -->release information

-----End of Message-----

SAP Transaction code to pre-compile all system program

SAP Transaction code to pre-compile all system program

If I have to run SGEN and have to recycle the server as well for clearing out memory, does it make sense to run SGEN first and recycle afterwards, because SGEN will sort of litter the memory or is it inconsequential what runs first.

SGEN is ued to "compile" ABAP programs. Results are put in database.

So, if you restart SAP, compiled results will still be in the database, so, no need to run SGEN again.

Make use of the transaction 'SGEN' to re-generate all the SAP programs after you change version of your SAP kernel, upgrade SAP system or apply support packages.

Do take care of the table spaces and use SAPDBA to observe them.

Do it during a weekend which is the best or a period of time with very very low users activity.

It will takes about 5 to 8 hours depending on the type of hardware configuration you are using.

Reporting a Problem to SAP BASIS

Reporting a Problem to SAP

When I tried to report a problem to SAP using
http://service.sap.com/message url it provided 4 steps to follow:

1) Choose system
2) Prepare Solution Search
3) Find Solution
4) Enter Message

I could do the step 1 but dont know what to do at steps 2, 3 and 4.

SAP changed the customer message screens so you now have to navigate through a search of the SAP Notes before being able to create a message.

We usually search the Notes extensively before we create a message, so we just enter a blank search and then go on to create the message.

Follow the steps, It may solve your problem:

1. Copy following url into web browser : http://service.sap.com/message

It will ask you for your OSS ID and password .
A Screen which contain a push Button Select System displayed .

2. Push the Button Select System .
It will open a sub screen in which there will be a hierarchical structue which looks like

-
-



+
+

Here + indicate that you have a sub tree .
Specific product like SAP R/3 T for Services , SCM , CRM , ERP etc

3. Select the system for which you need to log a message
It will take you to message screen screen.

4. Select you domain for problem for example Basis problem with Database where dataBASE IS oracle then Message type will be BC-DB-ORA
* .
5 Select priority of Message

6 . Write Message and send it to SAP

Apply Support Packs To My SAP SYSTEM

Apply Support Packs To My SAP SYSTEM

How can I apply support packs to my 4.7 IDES SYSTEM?
SAP"- SAP R3 4.7EE,
DATABASE : ORACLE 8.1.7
OS : WINDOWS 2003 SERVER
What is the step by step procedure and how to apply in r/3?

You have various issues with your setup:

- Oracle 8.1.7 is not supported under Windows 2003
- Oracle 8.1.7 is out of maintenance since three years

During SP application you will maybe run into problems that can't be
fixed since your installation is just too old and unsupported. *-- Markus

As mentioned, it's true that it won't get supported on Oracle 8. The best combination would be with 9i

Any How I have mentioned the steps below to apply for patches.

To Apply Support packs first up all you need to download the patches. When you have the downloaded the file i.e.. (*.car ) patch file then you can extract and apply it in two ways.

1. Go to command prompt through cmd (if you are using windows) and go to the folder where you have download these files ( could be in \downloaded folder\ ) type this command on command prompt without quotes "sapcar -xvf .sar". Now it will create a folder called EPS and a folder called IN inside EPS. Go to this folder and it will show two extracted files with extension " .att " and " .pat ". Copy this two files into yours trans\eps\in folder which could be something like \usr\sap\trans\eps\in folder.Then type spam on your session and navigate to Support Package\Load Package\From Application Server and it will ask for Path confirm it Say " YES"Select the patch imported and double click on it and then click on small truck Icon and it start Import.

2. Type Spam on session then navigate to Support Package\Load Package\From FrontEnd \ and Navigate to path where you have downloaded the *.SAR file of Support Pack.Now it will open a popup window and then click on decompress button ( It is front-End process for extracting or decompressing .sar file in .pat and .att extension ) After that click on Display-Define button on right hand side.) Select the BASIS or ABAP patch ( whichever you are applying *) what ever you are after and import it in queue. After that click on Small truck Icon in menu i.e.. (import Queue) and it Starts importing.

How to find an Operation mode Switch in SAP

How do you find that an operation mode switch occurred? There are many ways

1) Go to sm50. If the no of dialog work processes or background work processes changes then a operation mode switch took place.

2) Go to transaction sm63. Here you can see the time when the operation mode is set. You can guess when the operation mode switch occurs.

3) Go to transaction RZ04, here you can see the list of operation modes and their time. You can guess that from here

4) Go to transaction rz03 , here you can see the current operation mode in which the server is running.


5)
Call transaction Code sm62. Then view system events. If there is an event called SAP_OPMODE_SWITCH then operation mode switch occurred at that time. If you click on activity log you can see the time and date when the event was triggered. It is time and date of operation mode switch

Bandwidth requirement of ISP to connect to SAP server through VPN

We are in the process of implementing SAP for our overseas sales offices. However, the Server will be situated at our country. We want our overseas sales office to connect to our SAP Server through VPN. What should be the optimum internet bandwidth that they should use at their place to connect to our SAP server? Does SAP recommend any standard bandwidth for this process?

From our experience, there is no general rule that one can follow, as several factors will affect the connectivity

1. No of hops between your ISP and that of the remote site, the more hops the poorer the performance, even having large bandwidth may not improve the performance by much if there are numerous hops in between.

2. Is the Internet connectivity solely used for your VPN or other purposes such as web surfing, email etc, other traffic can consume large amount of traffic thus causing your SAP performance to be poorer

3. ISP's bandwidth to the public internet - If the ISP is heavily over subscribed, and has limited bandwidth connecting to the international network, you will find that you will not be able to get the international throughput you subscribed for as such, performance may be poor even you have paid for a line with a large bandwidth

4. No of users at your remote office using the VPN - In general the lines we use are 64kbps for sites with approx 3-5 users, we are also using ADSL lines with 512kbps connectivity and they enjoy close to local Lan performance for SAP.

See from which network IP address and host name a user has logged on

To see the network IP address from which a user has logged on,

perform the following steps:

Call transaction OS01,

click "Presentation Server" button, "Change View" button.

If you are using Citrix, you will not be able to view the user individual IP address as it will be the same Citrix IP address.

To check the speed and quality of the user's network connection,

select the desired presentation server and click "10 X Ping" button.

SAP - No System name and transaction code in SM04

No System name and transaction code in SM04

If you have more than one application server, use AL08 instead of SM04.

or

It is because they are at the logon screen which has established a connection.

You will notice that the transaction code shown when there is no user name is SESSION_MANAGER.

This shows you which workstations out there have the login screen up but have not yet entered a user name and password.

The transaction column shows the Last executed transaction code.

Sometimes your users will have multiple sessions open. If they do, to the system, it is the same as multiple logins as it relates to the resources used etc.

So the user name will show up more than once in AL08.

Under the application server they are logged into, each instance of that user name on that application server represents a session open.

For instance if you run AL08, you will have your name show up at least twice on the application server you are logged into.

One will show AL08 and the other will not have a transaction next to it.

Then you will notice your user name showing up on all other application servers with no transaction. This is because you are using AL08.

Basis - Message Class - System Message

Basis - Message Class - System Message

Configure System Messages

For example, when a user blocks himself out and receives a message :

"User blocked. Contact system administrator"

You can open a repair and change the message in Message class 00.

This can be done in transaction SE91 - Message Maintenance.

Messages allow you to communicate with the users from your programs.

They are mainly used when the user has made an invalid entry on a screen.

To send messages from a program, you must link it to a message class.

Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables (e.g. & & & - three variables).

All messages are stored in table T100.

Once you have created a message, you can use it in the MESSAGE statement in a program.

Friday, January 9, 2009

BC - Memory Management

This documentation introduces the SAP R/3 Memory Management System and explains which parameters are available and how you can set them to optimize your system.

This explains which hardware and operating system requirements you must fulfill and how you can monitor your memory management, discover and correct problems.

The documentation is made up of the following chapters:


  • Functions of the R/3 Memory Management System
  • Setting Up the
  • Memory Management System

  • Operating System and Hardware Requirements

  • Monitoring the Memory Management System

  • Profile Parameters for Memory Management

  • Recognizing and Correcting Problems

  • Terminology

    Functions of the R/3 Memory Management System

    An application runs in an R/3 work process where an ABAP program is normally executed. The process requires memory to do this, which is allocated to it by the memory management system. The order in which the work process is assigned the memory type depends on the work process type, either dialog or non-dialog (see R/3 Memory Types), and the underlying operating system.

    This is described in the section Allocating Memory for User Contexts.

    The location of the various memory areas in the virtual address space is explained in Virtual Address Space of a Work Process.

    The area of a user context that is directly accessible is now extended as needed, if the user context has expanded. For dialog work processes, the data of the user context, including internal tables, is located in this expandable area called Extended Memory. You can therefore access all the data in the user context. The data types Extract and Export to Memory remain in the SAP Paging.

    The R/3 roll area is used for the initial memory assigned to a user context, and (if available) for additional memory if the Extended Memory is full.

    The advantages of the SAP memory management require increased swap space and main memory. See: Operating System and Hardware Prerequisites.

    The following diagram displays the memory types that can be assigned to R/3 work processes on the R/3 and operating system level. Here are the most important system profile parameters that control the availability of the memory types.

    Whenever a dialog step is executed, a roll action occurs between the roll buffer in the shared memory and the memory area, which is allocated according to ztta/roll_first in a dialog process. Then the area in the shared memory is accessed that belongs to this user context.

    The following illustration displays the roll process performed by the dispatcher.

    • Roll-in: User-dependent data is rolled in from the common resource in the work process (and is processed there).
    • Roll-out: User-dependent data is rolled out from the work process in the common resource (after the dialog step has ended).

    The common resource stands for the different R/3 memory types:

    R/3 Memory Types SAP

    Definition

    The memory management system assigns memory to a work process. There are the following memory types:


    • R/3 Roll Area

    • R/3 Extended Memory

    • Private Memory

    To find out the order in which memory type is assigned, refer to Allocating Memory for User Contexts.

    The area of a user context that is directly accessible is now extended as needed, if the user context has expanded.

    Use

    For dialog work processes, the data of the user context, including internal tables is located in this Extened Memory. You can therefore access all the data in the user context directly. The data types Extract and Export to Memory remain in the SAP Paging.

    The roll area is used for the initial memory assigned to a user context, and (if available) for additional memory if the Extened Memory is full.

    The majority of the user context is stored in the Extended Memory. Page management of this memory as a stack is not taken from the operating system; rather it is performed directly from the R/3 System. This Extended Memory is implemented as an unnamed mapped file (on AIX and optionally on HP-UX as shared memory). This means the address space uses the paging file or uses the swap space of the operating system as background memory. For more information, refer to the man page mmap (UNIX systems), or Create File Mapping and Map View of File for Microsoft Windows NT.

    With the context change, the user context is not copied as with the roll area. Instead it is assigned to alternating work processes by mapping operations. The roll area can be decreased, which results in a faster context change because less data is copied and mapping an extended area is not work-intensive.

    All internal tables and ABAP variables are located completely in the area of a user context that can be directly addressed. Copying and in/output operations when accessing internal tables and lists is no longer needed. The result is low CPU usage and shorter access times.

    The advantages of the memory management system require increased swap space and main memory. The need for swap space increases because the internal tables and lists now are in the address space in their full size requiring swap space. The main memory requirements may increase to prevent excessive operating system paging due to the increased swap space requirements.

    R/3 Roll Area SAP

    Definition

    The roll area is a memory area with a set (configurable) size that belongs to a work process. It is located in the heap of the virtual address space of the work process.

    Use

    When the context of a work process changes, the data is copied from the roll area to a common resource called the roll file. To prevent repeated copying, the data is buffered in the roll buffer which is located in the shared memory.

    Structure

    The roll area consists of 2 segments. The first segment, which can be set with the parameter ztta/roll_first, is assigned to the work process first as memory. If this is used up, the work process has more memory assigned to it. The amount of memory is determined by the difference between the parameters ztta/roll_area and ztta/roll_first.

    See:

    Allocating Memory for User Contexts

    Integration

    For technical reasons, the roll area is always the first memory that a work process receives. Only afterwards can Extended Memory be requested.

    See: Virtual Address Space of a Work Process

    R/3 Extended Memory

    Definition

    SAP R/3 Extended Memory is the core of the R/3 memory management system. Each R/3 work process has a part reserved in its virtual address space for Extended Memory (see Virtual Address Space in a Work Process). You can set the size using the profile parameter em/initial_size_MB. Under Windows NT, further memory is assigned dynamically as needed, and you can also set this amount.

    Use

    You can map the Extended Memory from the common resource onto any work process, and after onto another process (see graphic) on the same address in the virtual address space. This is important if you work with pointers in the ABAP program.

    Structure

    Depending on the operating system, how you implement the Extended Memory is different.

    Windows NT: Implementation with Map/Unmap

    Here, a roll-in corresponds to mapping a context in the Extended Memory, and a roll-out corresponds to unmapping.

    The following graphic displays 2 work processes that are accessing a common resource.

    The common resource (memory mapped file) contains all the user contexts. The Extended Memory of a work process contains an area reserved for mapping the current user context.

    The graphic displays a context change or transfer: First, the context for user X, mode Y is mapped in the Extended Memory of work process 1. The work process processes an inquiry of this context. Analogous to this, the context from user N, mode M is mapped in the reserved area of work process 2 (marked with a 1). After processing, both work processes "put" the (changed) context back in the common resource by making the context visible again.

    Then work process 1 can process the context for user N, mode M and work process 2 can process the context from user X, mode Y (marked with a 2).

    The start address for the mapped context is always the same.

    UNIX: Implementation with Memory Protection (Protect/Unprotect)

    Here, a roll-in corresponds to removing the protection for a context in the Extended Memory, and a roll-out corresponds to protecting a context.

    All user contexts are always mapped in the virtual address space for each work process. At the beginning, all the contexts are protected.

    The example from above changes to the following:

    Work process 1 removes the protection for the context from user X, mode Y. To do this, this context is locked for all other work processes. After processing, the protection is restored. Now, work process 2 can process this context.

    Integration

    The R/3 System builds a layer on to the operating system functions for the page management of this memory. This Extended Memory is implemented as an unnamed mapped file. This means the address space uses the paging file or uses the swap space of the operating system as background memory. For more information, refer to the man page "mmap" (UNIX systems), or Create File Mapping and Map View of File for Microsoft Windows NT.

    R/3 Private Memory

    Definition

    Other processes cannot use private (heap) memory. After releasing the assigned memory, the operating system still considers the (virtual) memory as being occupied by the allocating process. These characteristics of heap memory require that:

    1. The work process be run in PRIV mode (private) when the local memory is assigned. This means that the work process is reserved for processing the current user context until the context releases the work process again when the request has ended.

    2. The work process, if it has used a lot of private memory, is restarted when the user context is terminated and the local memory is returned. The restart makes the local memory available again for other processes. The restart occurs if a work process uses more local memory than is defined in the parameter abap/heaplimit. The mechanism is displayed again there.

    See also: Virtual Address Space of a Work Process

    Use

    If a dialog work process has used up the roll area assigned to it and the extended memory, private memory is assigned to the work process. The work process goes into PRIV mode (private).

    In the parameter settings, ensure that not too many dialog work processes are simultaneously in the PRIV mode, since this lowers system performance.

    The other work process types (background, update, enqueue and spool work processes) are assigned heap memory after the roll area is used up. Allocating Extended Memory is not useful since no context change occurs for these processes.

    Integration

    Automatic Termination of PRIV Mode Processes

    If too many dialog work processes run in the PRIV mode in an R/3 application server, performance problems arise. The normal processing of user inquiries is slowed down by the PRIV mode work processes.

    The R/3 System offers a mechanism that lets you terminate non-active dialog processes in the PRIV mode. This mechanism helps reduce performance problems.

    The mechanism works as follows:

    In the PRIV mode, a maximum number (n) of dialog work processes can run without any time restrictions.

    To determine this number n, set the value of the profile parameter rdisp/wppriv_max_no . If a value is not entered, the R/3 System determines this number using the following formula:

    the number (n) is set to the greater of the 2 following values:

    • Number of dialog work processes minus 5
    • 1

    If more than (n) dialog work processes are active and the time span set in parameter rdisp/max_priv_time (default 600 seconds) has elapsed, the transaction for that PRIV process, which has spent the longest possible time in PRIV mode, is reset.

    You have configured 10 dialog work processes on one R/3 instance. The parameters rdisp/wppriv_max_no and rdisp/max_priv_time are not changed (default settings).

    Then, the R/3 System checks periodically if more than 5 dialog work processes are in PRIV mode after 600 seconds (10 minutes). If this is the case, the transaction is reset that has been in PRIV mode for the longest time. A corresponding dialog box appears to the user.

    If performance problems arise, you can change these parameters, but do this only after consulting with SAP.

    Non-dialog work processes (background, update, etc.) are not contained in this mechanism and are also not considered.

    Allocating R/3 Memory for User Contexts

    Use

    The memory management system assigns memory to the user contexts from the following 3 areas: Roll area, R/3 Extended Memory and heap memory.

    The order of assignment from these memory areas arranges itself according to whether the user context runs in an R/3 dialog work process or in another R/3 work process. This enables the R/3 System to optimally use the characteristics of the individual memory types.

    When allocating memory, the following characteristics for individual memory types become noticeable.

    Memory type

    Characteristics

    R/3 roll area

    Sequential memory allocation to several work processes using a relatively slow copying process

    SAP Extended Memory

    Sequential memory allocation to several work processes using a fast allocation process Uses swap space

    Private memory

    Allocation to a local work process, as required for the running user context in the process Uses swap space

    Flow

    The flow depends on whether it is a dialog work process or not. Unlike other work process types, dialog work processes require frequent context changes. Private memory that is linked to a work process is only assigned if there are no other options.

    Allocating Memory for Dialog Work Processes

    The following graphic shows how the memory management system assigns memory to a dialog work process with different memory types. Normally, dialog work processes process requests from dialog users of the R/3 System.

    1. For technical reasons, the roll area provides the first 100 to 250 KB (depending on the operating system) that is required for the user context. Additional memory for this initial allocation is sets according to the system profile parameter ztta/roll_first. (If ztta/roll_first is set to 1 MB for example, approximately 1.2 MB roll area is provided.)

    2. If the memory from the roll area is not sufficient for the user context, more memory is provided from the R/3 Extended Memory. Extended Memory remains available for the user context as long as:

    The work process reaches the limit of the R/3 Extended Memory for work processes. This limit is set in the system profile parameter ztta/roll_extension.

    The R/3 Extended Memory is used up. The size of the extended memory pool is set in the system profile parameter em/initial_size_MB.

    3. If this memory is also insufficient for the user context, more memory is provided from the roll area until this area is completely used up, or until the limit set in ztta/roll_area is reached. The roll memory now available sets itself according to the difference between the 2 parameter values ztta/roll_area (total memory in the roll area) and ztta/roll_first (size of assigned roll memory in step 1).

    4. If the user context still requires additional memory, it is assigned heap memory ( Private Memory). Heap memory is available until one of the following situations occurs:

    R/3 limits: Either the limit of the heap memory for dialog work processes is reached (defined in the system profile parameter abap/heap_area_dia ), or the entire heap memory of all work processes for an R/3 application server reaches its limits (defined in parameter abap/heap_area_total ).

    Operating system limits for allocating memory

    The swap space in the host system is used up or the upper limit of the operating system address space (as determined by the 32 bit architecture) is reached. Try to avoid these situations at all times. To avoid this situation, you must set parameter abap/heap_area_total correctly.

    Allocating Memory for Other Work Processes

    The following graphic shows how the memory management system assigns memory to non-dialog work process (background, update, lock and spool work processes) with different memory types.

    1. The memory is taken from the roll area until the area is used up. The maximum size of the roll area is set in the system profile parameter ztta/roll_area .

    2. If the roll area is full, heap memory is allocated to the work process. Heap memory is available until one of the following situations occurs:

    R/3 limits: Either the limit of the heap memory for non-dialog work processes is reached (defined in the system profile parameter abap/heap_area_nondia), or the entire heap memory of all work processes for an R/3 application server reaches its limits (defined in parameter abap/heap_area_total).

    Operating system limits for allocating memory

    The swap space in the host system is used up. (This should never occur.)

    3. If no more heap private memory can be allocated, a non-dialog work process can use the R/3 Extended Memory.

    This only valid under UNIX. Under Windows NT, the memory is distributed for non-dialog processes the same as for dialog work processes. This is described more explicitly under Implementation on Windows NT.

    Archives