Friday, November 23, 2007



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.







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)





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 - 4.6D

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.








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.






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?


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



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...



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.



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.








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







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.






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.







Troubleshooting SAP Performance Issues


Is there a document that will help me troubleshoot system performance? What are the steps on how to troubleshoot?

Troubleshooting is a BIG task of itself, there is no single reference document because there are too many reasons why a system can appear "slow" to the user:


- Different Databases

Every database has its own mechanism for optimizing access, even more, each database has BOOKS on performance optimization. This can start from parameters to database layout to operating system configuration, used filesystems, mount parameters...


- Different Operating System

The same goes for operating systems, a standard Windows 2000 (or 2003) isn´t configured for optimal throughput, there is a LOT to tune, e. g. enable "background process priorities", stop non-needed services, network configurations (TCP window sizes) etc. Also the connection between application and database servers can be an issue


- SAP Itself

Almost for each and every long running program there are optimizations, be it on ABAP layer or on selection layer. Out of my experience, most self developed programs (Z*-programs) are the main issue, because developers program "quick-and-dirty"
doing "select *" and other things.


For e.g.:

If CPU is 100% Busy, what action should be taken to keep CPU idle?

This can't be answered generally. One need to check what process is using so much CPU - then one can start digging deeper. To add info regarding this issue, you may use:

st06->details analysis menu->snapshot analysis->top CPU from there, start to narrow down.








Tuning Summary In Transaction ST02


My current system is SAP R/3 Enterprise 4.70. I have some questions about tuning summary in transaction ST02 :

To the best of my knowledge I am answering your questions. Ok


1. Do we have to increase every profile parameter value which is displayed in red alert in transaction ST02 ?

Ans: Of course it should be, since each buffer holds different values, wherever the red alert is there change the parameter value.


2. Why do the swapped objects always increase after a few days of tuning (in RZ10) & system restart?

Ans: Since more data had been fed into the server, it needs more space to hold in buffer while retrieving the data.

Since buffer is shot in space, swap memory will be used. It is not enough to increase the buffer and that does not mean tuning, tuning in the sense full analysis of the problem and working in that particular area to resolve the issue.

For example, creation of index, data archival, availability of statistics, aloting of no. of work process, etc.


3. Is there any standard in tuning ST02 to hold up the increasing value of swapped objects?

Ans: No. It depends on requirement.


4. After analysing ST02, how can we calculate the value of the parameter profile to be increased (in RZ10) ?

Ans: yes, use the command:


sappfpar check pf=\\usr\sap\trans\tpparam


(or)

sappfpar check pf=\\usr\sap\trans\tp_domain_sid







SAP System Performance Issues


My server becomes slow when more users login.
What could be the reason? Is it because of less hardware resource?

Server configuration is 104GB HDD, 2GB Ram.
OS:Win 2003 server.
Database:Oracle.


I manage SAP R/3 4.6C systems on Risc 6000 machines, under Oracle 9.2.

The overall performance problem for me is to know if SAP response time is acceptable ; if not, do this :

- at AIX level : utilities are topas, to catch what's wrong : Disk I/O ? CPU bottleneck ? Too much swap ?

- at Oracle level : tkprof but don't know much about this.

- at SAP level : you can manage SAP memory, Oracle and OS too.


If SAP response time is acceptable, then try this :


Try to have a look at OS response time : ST06 : look at CPU, Memory, Swap, Disk and Lan response time.


Try to have a look at buffer quality : ST02, if many fields are red, investigate each fields dependant parameters.


Try to have a look at DB response time : ST04N, databuffer quality (SGA zone), how much physical reads / logical reads Ratio, wait times, number of user calls, Shared Pool cache hit ratio should be >96%, Sort usage, Redo logging.


I use this kind of procedure to manage my systems.


It depends how much you allocated for SGA (database buffers, shared pool buffer, redo log buffers), how much you allocated for SAP buffers esp. Program buffers and whether the server have any other external processes/programs running.


How many Dialog Work Processes you allocated…I think your problem most likely is you don’t have enough of these Dialog processes. Also maybe users running inefficient reports/programs which are holding the Dialog processes, goto SM50 & check all DIA (Dialog) with status “waiting”…if ALL are “running” then you have wait time (problems !) for other users wanting to process transactions .


To troubleshoot performance, you need these tcode tools:-


ST04 – Database ß in here, check especially for Expensive SQLs (Detail Analysis à SQL Request)

ST02 – SAP buffers

ST06 – OS stats

ST05 – SQL trace

SE30 – Abap runtime analysis


A few step which you can exercise to sort/identify performance issues.


* ST03, ST02, ST04 are the tcode for workload, tuning and DB Performance Monitoring codes.

* ST06 FOR Operation System Monitoring.

** SM51 OR SM50 is process overview which tells you the workprocess sequence. ( Ideally 10-15 process with OLTP and batch process scheduled at peak and off peak times respectively) say 8-17 hrs and 17-8 hrs for Batch Process)


Operation Mode can be configured in RZ04 tcode.


** Check for top CPU in ST06 tcode. CPU should not exceed more than 60% for long time for any process.

** Based of No. of instances ( Application Servers ) should have adequately sized.

** Most resources intensive process have to be scheduled in Batch Process ( in Background in Non Peak Hours )

** Look for unnecessary Jobs Active During Prime Time
** Look for Parameters Set To Your Business Process.
( RZ10, RZ11 ) Check Snote:0124361

** Refer Early Watch Alert Periodically for Overall System Performance.. ( Tcode SDCC )





SAP Load Balancing and Work Processes Troubleshoot

The benefit of segregating user groups by line-of-business (using logon groups) is related to the point that groups of users (like SD users or HR users, for example) tend to use the same sets of data. They (generally) work with the same groups of tables and hit the same indexes using the same programs (transactions).


So, if you can group all of the users hitting the same tables, onto (or one set of) App server(s), then you can tune the App server buffers to a much greater extent. If the FI users (generally) never hit against the HR tables then the App servers in the FI group don't (generally) have to buffer any HR data. That leaves you free to make memory and buffer adjustments to a more drastic extent, because you don't have to worry (as much) about screwing the HR users (as an example), when you're adjusting the FI server group.


So, (in opinion only) you should start with a buffer hit ratio analysis / DB table & index access analysis (by user group) to see where you would get the best benefit from this kind of setup. If you don't have this kind of info, then creating logon groups by line-of-business may have no benefit (or worst case, may make performance degrade for the group with the highest load %). You need some historical information to base your decision on, for how to best split the users up.


You may find that 50% of the load is from the SD users and so you may need one group for them (with 3 App servers in it) and one other group for everyone else (with the other 3).


The logon group(s) will have to be referenced by SAP GUI, so SAP GUI (or saplogon.ini + maybe the services file, only) will have to change to accomodate any new groups you create in SMLG. Also consider that there's variables for time-of-day (load varies by time-of-day) and op-mode switches (resources vary by op-mode).


All Work process are running? What will be our action?


Are all the work processes (dia,btc,enq,upd,up2,spo) running or just all the dialog work processes?

If all the work processes are running, then you may want to look at SM12 (or is SM13?) and see if updates are disabled. If they are, look at the alert log (if it's an Oracle database) and see if you have any space related errors (e.g. ORA-01653 or ORA-01654). If you do, add a datafile or raw device file to the applicable tablespace and then, re-enable updates in SM12.

If only all the dialog work processes are running, there are several possible causes. First, look to see if there's a number in the Semaphore column in SM50 or dpmon. If there is, click once on one of the numbers in the Semaphore column to select it and then, press F1 (help) to get a list of Semaphores. Then, search OSS notes and, hopefully, you'll find a note that will tell you how to fix the problem.

If it's not a semaphore (or sometimes if it is), use vmstat on UNIX or task manager on Windows to see if the operating system is running short on memory which would cause it to swap. In vmstat, the free column (which is in 4k pages on most UNIX derivatives) will be consistently 5MB or so and the pi and/or po columns will have a non- zero value. The %idle column in the cpu or proc section will be 0 or a very low single digit while the sys column will be a very high double-digit number because the operating system is having to swap programs out to disk and in from disk before it can execute them.

In task manager, look at free memory in the physical memory section under the performance tab. If it's 10MB or 15MB (I think), then the operating system will be swapping.

Usually, when all the dialog work processes are running, you won't be able to log in via SAPgui and will need to execute the dpmon utility at the commandline level. The procedure is basically the same on UNIX and Windows.


On UNIX:

telnet to server and login as sidadm user.
cd to /sapmnt/SID/profile directory
execute "dpmon pf=SID_hostname_SYSNR" (e.g. PRD_hercules_DVEGMS00) select option "m" and then, option "l"


On Windows:

Click on START, then RUN
Type "cmd" and press enter
change to drive where profile directory resides (e.g. f:)
cd to \sapmnt\SID\profile
execute "dpmon pf=SID_hostname_SYSNR" (e.g. PRD_zeus_DVEGMS00) select option "m" and then, option "l"

On both operating systems, you'll see a screen that looks like what you see in SM50. Depending on what you see here, will depend on what you do next, but checking the developer trace files (e.g. dev_disp) in the work directory (e.g. /usr/sap/SID/DVEGMS00/work) is never a bad idea.




SAP Load Balancing and Work Processes Troubleshoot

The benefit of segregating user groups by line-of-business (using logon groups) is related to the point that groups of users (like SD users or HR users, for example) tend to use the same sets of data. They (generally) work with the same groups of tables and hit the same indexes using the same programs (transactions).

So, if you can group all of the users hitting the same tables, onto (or one set of) App server(s), then you can tune the App server buffers to a much greater extent. If the FI users (generally) never hit against the HR tables then the App servers in the FI group don't (generally) have to buffer any HR data. That leaves you free to make memory and buffer adjustments to a more drastic extent, because you don't have to worry (as much) about screwing the HR users (as an example), when you're adjusting the FI server group.

So, (in opinion only) you should start with a buffer hit ratio analysis / DB table & index access analysis (by user group) to see where you would get the best benefit from this kind of setup. If you don't have this kind of info, then creating logon groups by line-of-business may have no benefit (or worst case, may make performance degrade for the group with the highest load %). You need some historical information to base your decision on, for how to best split the users up.

You may find that 50% of the load is from the SD users and so you may need one group for them (with 3 App servers in it) and one other group for everyone else (with the other 3).

The logon group(s) will have to be referenced by SAP GUI, so SAP GUI (or saplogon.ini + maybe the services file, only) will have to change to accomodate any new groups you create in SMLG. Also consider that there's variables for time-of-day (load varies by time-of-day) and op-mode switches (resources vary by op-mode).

All Work process are running? What will be our action?

Are all the work processes (dia,btc,enq,upd,up2,spo) running or just all the dialog work processes?

If all the work processes are running, then you may want to look at SM12 (or is SM13?) and see if updates are disabled. If they are, look at the alert log (if it's an Oracle database) and see if you have any space related errors (e.g. ORA-01653 or ORA-01654). If you do, add a datafile or raw device file to the applicable tablespace and then, re-enable updates in SM12.

If only all the dialog work processes are running, there are several possible causes. First, look to see if there's a number in the Semaphore column in SM50 or dpmon. If there is, click once on one of the numbers in the Semaphore column to select it and then, press F1 (help) to get a list of Semaphores. Then, search OSS notes and, hopefully, you'll find a note that will tell you how to fix the problem.

If it's not a semaphore (or sometimes if it is), use vmstat on UNIX or task manager on Windows to see if the operating system is running short on memory which would cause it to swap. In vmstat, the free column (which is in 4k pages on most UNIX derivatives) will be consistently 5MB or so and the pi and/or po columns will have a non- zero value. The %idle column in the cpu or proc section will be 0 or a very low single digit while the sys column will be a very high double-digit number because the operating system is having to swap programs out to disk and in from disk before it can execute them.

In task manager, look at free memory in the physical memory section under the performance tab. If it's 10MB or 15MB (I think), then the operating system will be swapping.

Usually, when all the dialog work processes are running, you won't be able to log in via SAPgui and will need to execute the dpmon utility at the commandline level. The procedure is basically the same on UNIX and Windows.

On UNIX:

telnet to server and login as sidadm user.
cd to /sapmnt/SID/profile directory
execute "dpmon pf=SID_hostname_SYSNR" (e.g. PRD_hercules_DVEGMS00) select option "m" and then, option "l"

On Windows:

Click on START, then RUN
Type "cmd" and press enter
change to drive where profile directory resides (e.g. f:)
cd to \sapmnt\SID\profile
execute "dpmon pf=SID_hostname_SYSNR" (e.g. PRD_zeus_DVEGMS00) select option "m" and then, option "l"

On both operating systems, you'll see a screen that looks like what you see in SM50. Depending on what you see here, will depend on what you do next, but checking the developer trace files (e.g. dev_disp) in the work directory (e.g. /usr/sap/SID/DVEGMS00/work) is never a bad idea.