Friday, 12 December 2014

SAP BASIS Tips


Checks When SAP R3 is Very Slow

I'm using SAP R3 4.6C MS SQL 2000.  I have 190 users. I notice when users are log in during peak hours 9am -6pm SAP R3 is very very slow. I lately increase my DIA and BGD process but still same issue.
Check if there are long running jobs in the background during the peak times (SM50) or if users are running long running
transactions/big lists.
System performance cannot improve if Dia and Bck workprocess increased. In fact those itself will bring down the performance of the system.
* Do not allocate more the 2 bck process in peak hours
* Check if your hardWARE is adequately sized for these many users.
* Check for any jobs consuming more than 60% of you resource.
  ( STO6-DETAIL ANALYSIS-TOP CPU)
* Check if  there is any NETWORK COLLISION AT SERVER AND USER END.
* Rate of ARCHIEVE LOG SWITCH OVER .
* All USERS use SAME SERVER AT A TIME
* Even USER with ALL SUPER USER AUTHORISATIION can bring DOWN SYSTEM PERFORMANCE AT TIMES
* TRANSPORTS, providing AUTHORISATION and EXECUTING RESOURCE CONSUMING REPORTS TO BE AVOIDED at PRIME TIME.


What is the difference between unicode and nonunicode.  For what purpose it is used.

Unicode is a character encoding system similiar to ASCII. You can see the definiton for Unicode by Unicode consortium below.
 
Unicode is the universal character encoding, maintained by the Unicode Consortium.
This encoding standard provides the basis for processing, storage and interchange of text data in any language in all modern software and information technology protocols".  Unicode covers all the characters for all the writing systems of the world, modern and ancient. It also includes technical symbols, punctuations, and many other characters used in writing text.
The Unicode Standard is intended to support the needs of all types of users, whether in business or academia, using mainstream or minority scripts.
Most of the SAP implementations are done on Unicode system as it support all kind of languages, which is good for a company to expend their business. Another things is Unicode system requires 70% more storage area and processing speed to run the system perfectly.
There are systems like XI, which can work only on Unicode so it is always advisable to go for unicode then to non-unicode.

Regular Job to Purge Transactions Logs

You should re-organize (note 16083) the following data at regular intervals. When doing so, use the following job names as they can be used to check if the jobs have already been active in your system: 
Administration Data for Background Jobs
  • Program: RSBTCDEL
  • Re-organized tables: BTC*
  • Path for accessing files: /usr/sap/SID/SYS/global/<client>JOBLG
  • Job scheduling: Daily (with variants)
  • Recommended job name: SAP_REORG_JOBS
Spool Data and Administration Data for Spool Jobs
  • Program: RSPO0041
  • Re-organized tables: TSP*
  • Path for accessing files: /usr/sap/SID/<instance>/data
  • Job scheduling: Daily (with variants)
  • Recommended job name: SAP_REORG_SPOOL
Administration Data for Batch Input
  • Program: RSBDCREO
  • Re-organized tables: BDC* and APQ*
  • Path for accessing files: /usr/sap/SID/SYS/global
  • Job scheduling: Daily (with variants)
  • Recommended job name: SAP_REORG_BATCHINPUT
Runtime Statistics for Background Jobs
  • Program: RSBPSTDE
  • Re-organized tables: BTCJSTAT*
  • Path for accessing files: Not specified
  • Job scheduling: Weekly (with variants)
  • Recommended job name: SAP_REORG_JOBSTATISTIC
Question about Go Live Check

What's Go-Live Check?
Who's responsible for Go-Live Check?
What should we prepare before Go-Live Check?
How many times for Go-Live Check?(I mean that Go-
Live Check seperate into how many steps/types such as 3 times for 1 Month before Go-Live, 2 Weeks before Go-Live
and 2 Weeks after Go-Live etc.) What's recommend schedule for each time?
How can we proceed Go-Live Check?
You have to open a message in component XX-SER-TCC to find out if your installation is scheduled for a Go-Live check which is conducted by SAP and it’s partners.
Go-Live Functional Upgrade Analysis – ideally 6 months before Golive – basically checks your hardware requirement , will it be able to accommodate the increase in the functionalities caused by the Go-Live, also some parameter recommendations to fine-tune your system.
Go-Live Functional Upgrade Verification – This is normally 2 months after the Go-live which is to see e’thing is fine after the upgrade.
Then you have normal Earlywatch session , each installation is entitled for 2 free earlywatch session in a year, in this performance tuning is done for your system, hardware,memory, I/0 bottlenecks are identified.
Reports of all these sessions carried out by SAP is then sent to you in form a MS-Word document and you can follow the guidelines mentioned and call up SAP or mail the person who has done the session for you for any clarifications.
Usually once a session is scheduled.
SAP will contact you to open the connections for them, so that they can prepare the system before the actual session takes place , in which they see , if SDCC version is good enough so that they can download the data from your system into their internal system on which they carry out the analysis, see if SAPOSCOL is running and enough history data is there in ST03n for them to carry out reasonable analysis. If e’thing is set a download is scheduled on your system using SDCC for a day prior to the actual session , and on the day of the session you open the connections for them again and provide them with userid and password normally it is earlywatch in 066 client.

Perform a Consistency Check and Clean Temse Directory

I'm having problems with the STMS on the Development Box, from the look of things I need to clean the temse directory. What sought of routine can I perform as clean up routine regarding the same.

----------------------------------------------------
This is the procedure clear and tests the consistency of temse objects in case of 3.1I.
 
So first execute SPAD, where click on the consistency check button.

- this will display a list of objects. check to see the whether objects other than current day is displayed.
 
- then go SP12, here click on temse database button, where there is again consistency check.
 
- after the consistency checks are over, click on temsedatabase button, select reorganisation,
 
- here select the radio button that shows "delete all objects older than".  Here enter the value and click on tick mark.
 
- this will display the number of objects. then delete it.
 
That's all the procedure.

SAP SUPPORT PATCH UPGRADE

SAP SUPPORT PATCH UPGRADE
SUPPORT PATCH
From time to time SAP does modifications to the various objects of its R/3 software and makes the modifications available to the customers in form of support packs and CRTs. Customers are required to check for the latest updates on the changes being made by SAP to its software and accordingly apply them at their installations. The support packs and CRTs are made available by SAP on their mySAP.com Marketplace site (earlier known as SAP Net).
The following is procedure to show you step-by-step process of applying different support packages into your system.
  • It is always advisable to first verify the SPAM/SAINT version in the system.
  • If you do not have, download the latest SPAM/SAINT package.
  • There are certain support packages, which require certain level of SPAM/SAINT. For such packages, you first have to update the SPAM/SAINT
  • SPAM/SAINT update and support packs are applied through Transaction code SPAM.
  • The SPAM/SAINT updates and support packs files are .CAR (compressed archive) files, which need to be unpacked. Each CAR files is an archive of two files.
  • Supports packs for Applications area (i.e. changes made to the objects of various functional modules of SAP) are also known as HOTPACKS
Purpose
  • A Support Package is a quantity of corrected SAP objects. Support Packages Are required to correct errors in various components. This is done by replacing erroneous objects with corrected versions of these objects.
  • Each software component has a separate sequence of Support Packages. The following list contains the technical names of a number of components and the notation for their Support Packages:
  • COP (Component Package)

SAP_APPL (SAP R/3 Support Package)
Naming conversion of SAP_APPL is SAPKH

SAP_APPL Stands sap application platform
SAP_BASIS (Basis Support Package)

Naming conversion of SAP_BASIS is SAPKB
SAP_BASIS Stands sap basis component

SAP_ABA (Application Interface SP)
Naming conversion of SAP_ABA is SAPKA

SAP_ABA Stands sap cross application component
SAP_HR (SAP R/3 HR Support Package)

Naming conversion of SAP_HR is SAPKE
SAP_HR stands human resources

SAP_APO (APO Support Package): SAPKY
SAP_BW (BW Support Package): SAPKW

SAP_CRM (CRM Support Package): SAPKU
SAP_SRM (SRM Support Package): SAPKU
SAP_SEM (SEM-BW Support Package): SAPGKS
Requirement of Support packages
  1. A support packages is a quantity of corrected SAP objects.
  2. Support packages are required to correct errors in various components. This is done by replacing erroneous objects with corrected versions of these objects.
  3. Each software component has a separate sequence of Support Packages.
Prerequisites of Support Packages:
  1. Login to 000 client with user like DDIC.
  2. Support packages and patches are applied in T-code SPAM (support package manager)
  3. No aborted packages should be available in the system.
  4. Download the support packages from marketplace.
  5. Always use the updated SPAM & SAINT versions to Apply Support Packages.
  6. There should be enough space in EPS directory to hold support directory.
  7. There should be at least two background processes reserved for this process.
  8. Functional and technical consultants should be around for applying changes to data dictionary elements and repository objects.
  9. Take the database backup before going to apply support packages.
  10. In order to avoid network congestion the files which are more than 10MB has to be applied through “application server”. Patches which are less than 10MB can be applied through front end
  11. There should be enough space in table space in the table spaces (DB02),it should not be above 90%.
  12. Apply patches in the sequence defined in the composite note. Patches can be applied individually or bundled together.
  13. Patches can’t be reverted by consultants, only SAP can revert patches by developing a negative patches if required.
  14. Schedule the downtime before going to apply support packages.
  15. Go through the composite note and document the sequence and CRT.
  16. Observe the system behavior.
  17. Check STMS configuration before going to apply support package.
  18. Before going to apply support package we need to check either any side effects if we apply the patch.
Procedure
The support packages are needed to be applied to the system depending on the requirement from functional and technical consultants’ support package can make changes to objects are data dictionary level or at repository level. It requires to be applied during non-peak hours. It provides enhanced functionality. Sap recommended applying patches for the known problems.

SAP AddOn Components

SAP AddOn components are extra functionalities that do not come with main SAP product. Different organizations have different requirements, so SAP has recognized some main functionalities that are in demand and builds that functionality as a components, which can be integrated with the core SAP. so add on components sit above the core and access the same  dictionary objects or repository objects and perform the required funcionality.

The following steps are to be followed while applying service packs.

  • Go T-code SPAM
  • Apply support pack through front end if the size of the pack is less than 10MB.
  • Apply support pack through Application server if the support pack is greater than 10MB, after decompressing the file using uncar (SAPCAR –XVF xxxx.CAR).
  • In order to apply the support patches define the Queue and import the queue.
  • During the runtime of import we may ask to run SPDD to modify the data dictionary objects.
  • During the runtime we may be asked to run SPAU to modify repository objects.
  • Confirm the queue.

Download the required .CAR files from SAP Net or SAPServX server as shown in the screenshots below


Login to service.sap.com. You will get an initial screen as shown above.

If you want to navigate into the market place you require an SAP user id. For example click on support pack you will get a popup box. Here you need to enter the S user ID and password.

Enter by component

Save the target and save them in a temporary directory

Follow the below procedure to install

  1. Copy them to a temporary directory either in /usr/sap/trans/tmp or any other folder which you can create (say, patch)
  2. Change to the directory /usr/sap/trans (UNIX) or \usr\sap\trans (NT)
  3. Use the command SAPCAR -xvf The command SAPCAR is case sensitive
  4. The command SAPCAR will decompress the CAR file and put two files (with extensions .ATT and .PAT in the /usr/sap/trans/EPS/in directory.
  5. Logon to the SAP system in client 000 as user DDIC
  6. Once in the system execute the transaction code SPAM
  7. Depending on what version are you in do the following
    • Goto Support Packages
    • Load Packages from Application Server
  8. You will get a pop up box with the list of the patches in the queue. Both the applied patches and the new ones will be listed. Hit the Back button to come to the main screen.
  9. Click on the Display/Define button on the screen
  • You will get a pop up screen with the unapplied patches.
  • Select the patch or group of patched that you want to apply and hit the enter key/icon.
  • The patch number will be defined in the queue box.
  • Goto Support Packages >> Import Queue or click the apply patch / import queue icon on the application toolbar
  • After the patch is successfully applied, you will have to CONFIRM the patch application.
  • Goto Support Packages >> Confirm Or click the confirm icon on the application toolbar.
  • The traffic light in the status box should turn green.
  • While the patches are being applied, it’ll prompt us for conformation of the changes, whether to keep the objects which have come from SAP patch or to keep existing customized objects.
  • You can compare the changes and decide to keep the changes made to the system via OSS notes or return the objects to original.
For applying SPAM upgrage patch (XXXXX.CAR) use import SPAM/SAINT Update menu option.

Import from Frontend
for small files you can do this. It will upload from frontend to server and ask you to decompress. Once decompressed, click on New Support Packages/ Display button.
Once decompressed, click on New Support Packages/ Display button.
Check for logs
 

  • At times depending on the situation, you may have to reapply the OSS notes after returning back the object to original

Thursday, 27 November 2014

License Administration at Operating System Level with Program saplikey



You can use the program saplikey to install, check, and administer digitally-signed license keys in your SAP system. It resides in the directory /usr/sap/<SAPSID>/SYS/exe/run.
Note
For Microsoft Windows systems, replace the forward slash (/) with a backslash () in all path names.
Prerequisites
As of release 4.5A, the database interface library is linked dynamically. To allow saplikey to locate this library, the following variables must be set in the environment of the user calling saplikey.
·         dbms_type = <database type> (such as ora, inf, ada, mss, db2, db4, db6)
·         DIR_LIBRARY = <Path_to_dynamically_linked_database_library> (for example, /usr/sap/SID/SYS/exe/run)
User for saplikey: You must be logged on as the user <sid>adm. This ensures that all of the required environment variables are set correctly.
Features
The saplikey program offers the following options: When you enter commands, always specify the profile:saplikey pf=<profile> <command> <product>
saplikey Commands
Command
Meaning
-delete
-get
-number
Displays the hardware key, among other things.
Run this command on the message server, for example by telnet; otherwise, it applies only for the local host.
-help
Help for -get, -install, -temp, or -show
-install
Installs the license key. With the parameter -install <file name>, the license data can be read from the license key file.
-show
Shows all installed license keys
-temp
-version
Displays the version number of the saplikey program.

Installing a License Key
Prerequisites
You have received the e-mail containing the 424 or 428 character license key and installation data from SAP.
Procedure
1.       Copy the file from the e-mail to a local file on your computer, for example, with copy and paste.
2.       Log on to the host where the central instance of the SAP system is running at operating system level as user <sid>adm.
3.       Enter the command saplikey pf=<profile> -install <filename>. The file name is the name of the file that you created in the first step.
Example
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:Userscrsadm>cd C:usrsapCRSSYSprofile
C:usrsapCRSSYSprofile>saplikey -help
SAP License Key Administration  -  Copyright (C) 2003 - 2012 SAP AG
usage: saplikey pf=<profile> [trace=<level>] <command>
where <command> is one of:
-help. . . . . . . . . . . . . . . Display this usage text
-version . . . . . . . . . . . . . Display the version of the license key library
-get . . . . . . . . . . . . . . . Display infos about the system
-number. . . . . . . . . . . . . . Get installation number
-install <filename>. . . . . . . . Install permanent license keys from a file (which comes from SAP)
-show. . . . . . . . . . . . . . . Display all installed license keys
-temp <product>. . . . . . . . . . Create a temporary license key for the given product and the hardware key of this machine
-delete <SID> <HW Key> <product> . Delete license keys (For each of the parameters after                  "-delete"you can use "*" as a wildcard. Remember that you might have to                                                            use quotes to mask the "*"!)

C:usrsapCRSSYSprofile>saplikey pf=CRS_DVEBMGS00_sapcrm-1 -show
SAP License Key Administration  -  Copyright (C) 2003 - 2012 SAP AG

List of installed License Keys:
==========================================

1. License Key:
------------------------------------------
System                : CRS
Hardware Key          : H10579*****
Software Product      : NetWeaver_MSS
Software Product Limit: 2147483647
Type of License Key   : permanent
Installation Number   : ***********
System Number         : 000000000*********
Begin of Validity     : 20140701
End   of Validity     : 99991231
Last successful check : 20140905
Validity              : valid

2. License Key:
------------------------------------------
System                : CRS
Hardware Key          : H10579*****
Software Product      : NetWeaver_MSS
Software Product Limit: 2147483647
Type of License Key   : permanent
Installation Number   : ***********
System Number         : 000000000*********
Begin of Validity     : 20140701
End   of Validity     : 20141002
Last successful check : 20140829
Validity              : valid
------------------------------------------
2 license keys listed.

C:usrsapCRSSYSprofile>saplikey pf=CRS_DVEBMGS00_sapcrm-1 -install CRS_license_script.txt

SAP License Key Administration  -  Copyright (C) 2003 - 2012 SAP AG
2 SAP license key(s) successfully installed.


Wednesday, 26 November 2014

SPOOL Process in SAP

                                                SPOOL Process

It’s the only process which is used to print documents. Dialog and background process initiates the spool request.


Structure

The figure below shows the individual components of the print architecture that are required to print from the SAP System:
This graphic is explained in the accompanying text
The individual components interact as follows:
...
       1.      After the user triggers the print process, the print requests are sent to the spool server, which contains the dialog and spool work processes required for the processing.
       2.      A dialog work process (D-WP) of the spool server forwards the spool data to the spool database for temporary storage.
       3.      When the data is explicitly sent to an output device, an output request is generated from the spool request. This is forwarded to the spool work process (S-WP).
       4.      The spool work process formats the output request data.
This converts an internal data stream of the SAP Systems to a data stream that the output device understands.
       5.      After formatting, the spool work process forwards the print request to the host spool system (operating system spooler). The host spool system has the following tasks:
Wait queue management
Transferring the data to the output device
Depending on the situation of the host spool system, one of the following print types is used:
1.               Local: The print requests are forwarded to the printer through a local network. The host spool system and the spool work process are on the same host.
It is irrelevant whether the output device is directly connected to the server, or whether it is defined using a remote print server.
2.               Remote: The print requests are forwarded from the spool work process to the printer through a remote network. The host spool system is on a different host to the spool work process. This remote host is called the target host.



The figure below shows how a document is formatted for printing. This graphic is explained in the accompanying text

            While other spool systems have only print requests that go directly to the printer, the SAP spool system differentiates between spool requests and output requests. The print process in the SAP spool system therefore consists of two steps: ­
...
       1.      When you have released a document for printing; that is, you have chosen a print option, a spool request is first created. The system differentiates between following print data during the creation of the spool request and stores the data in different places:
-     Spool request data
This is the administrative information for the request, such as created on, created by, and the output device. This data is stored in the SAP spool database.
-        Spool Data
This is the data that is to be printed; that is, the content of the document to be printed. This data is stored in a special data store for temporary sequential data (TemSe).
       2.      Only once the document is sent to the output device is the administrative data and the data to be printed combined, and an output request is generated.
To do this, the system converts the device-independent print data in the spool request into the appropriate printer language understood by the output device (
By differentiating between spool requests and output requests, print data can be temporarily stored, without an output being required. This gives you the following options:
·        Print immediately (Spool and output requests are both created immediately)
·        Create a spool request first, and only print this later


Spool and Output Requests 

Definition

The SAP System differentiates between two types of request when printing:
        Spool request
        Output request
A spool request is a document for which a print function has been selected. However, it has not yet been output on a printer or another device. The output data for the print document are stored in a partly formatted form in the TemSe Data Store, until an output request is created for it, that is, until it is sent to a particular output device.
The spool system uses a spool request to store the print data temporarily in TemSe and to be able to access it. The data is stored in a temporary format. You can also display the print document.
The system automatically assigns a 10 digit ID number to a spool request.
From the point of view of the SAP spool system, an output request is outputting the print data of a spool request on a particular output device.
Multiple output requests may exist for a single spool request. Each represents an instance of the output of the same spool request. Each of these output requests may have different attributes, such as the target printer, number of copies and so on.
By differentiating between spool request and output requests, the spool system provides way of storing the data temporarily.
You an administer spool requests and output requests using the Output Controller (Transaction SP01).

Spool request workflow:

User initiates a print request using either dialog process or background process.
-          The spool requests are created and stored in TEMSE
-          TEMSE Stands for Temporary Sequential Object which as stored either at O.S Level or D/B level which is determined by parameter rspo/store_location
-          If it is G then it is stored at System Global directory /usr/sap/sid/SYS/global
-          IF it is database it is stored in the table TST03 & TST
You have the following options to define a storage location for spool requests:
        Using the profile parameter rspo/store_location; where you can specify file system (parameter value G) or table TST03 (parameter value db)
        In the device definition of an output device (Edit ® File Storage)
(OUTPUT DEVICE) SPAD ® Output Devices ® Change ® Output device ® Create/Create using template

Advantage of TEMSA at File System

It is easily accessible

Disadvantage:
-          When the spool size increases, managing the spool will be difficult bcoz (no indexing at file level.
-          Files will (may) be corrupted
-          File system is not part of regular backup in case of crashes entire spool data will be lost.

Advantage of TEMSE at DB
-          Data in D/B is organized and can be accessed with indexes.
-          It is part of regular backup
-          Permissions can be setup

Disadvantages

 - Slower when compared to OS level

Spool process reads the temse and crates OUTPUT request.

Define the printer

Go to SPAD
Click on Output device to define a printer
Click on Change
Click on create
Specify the output device name
Output device name should follow the naming convention
E.g.. LP (Line Printer), BC (Bar Code), CR Colour Printer, CP Check Printer)

Short Name: LP01
Specify the Short name.

Go to device attribute
Device Type
Device types specify the type of printer, model of the printer, name and make.
Device types are by default provided by SAP. If device type does not exist, write to SAP they will send a device type in terms of transport.

Go to SPAD\ Utilities\ Device Type\ Import the Object

SPECIFY THE SPOOL SERVER

The server with atleast one spool process is referred as real spool server.
Logical Spool Server : These are assigned logically.
  • Advantage : Used during overload (load balance type of thing)
  • Can also be used as fail over server

Creation of spool Server
Go to SPAD \ Spool Server (2nd Option)
Click on Create spool server
Specify the server name (Lgoical_spool_server)
Specify the server class (Mass printing, desktop printing, Production printing)

Device Class
To specify whether it is a fax or standard printer, programming (archiving), Telex,


REMOTE ACCESS METHODS (RAM)

If the spool process and the OS System spooler does not reside on the same machine then it uses remote access method.
IF the spool process communicates with remote spooler to create a output request then RAM is used.


SPOOL Monitoring
Go to SP01 \ Spool request can be displayed based on request no, Userid, client, date and time.
Spool request has the following status:
-          Not yet sent to the host system  ( no output request )
-          Spool is generated (Stored in spool request)
-          Waiting for the spool process to process the spool request.
-          IN process: The spool process is in the process of formatting the output for printing.
-          Printing: The host spool process printing the output request.
-          Status can be to completed statues or error.
-          Error: Indicate a error, such as network error.

PROBLEMS:
      -     Device type is not matched.
-          Device drivers are corrupted.
-          Network error
-          Print Server disconnected
-          Cartridge problem
-          Out of paper


SPOOL REOGRANISATION

GO to SPAD\ Go to Admin\ Select delete old spool request\ or schedule report RSP….41 to delete the old request.

Access Methods 

Use

To be able to address an output device from the SAP System in which you are working, you must configure the output device in this SAP System using a device definition.
When you configure the output device in a device definition, you specify the access method with which the output device is connected to the SAP System, such as whether you are using local or remote printing. The access method is identified by a letter and informs the system which architecture is in use and which operating system you are using.
The access method is specified during the definition of output devices in the SAP System so that the system knows how it should transfer the spool work process data for this output device to the host spool system.
There are the following access methods:

Access Method
Use
C
Local printing from a Microsoft Windows NT or Microsoft Windows 2000 system or from AS/400 and OS/390.
The spool work process of the SAP System and the host spool system (operating system spooler) are on the same host.
L
Local printing from a UNIX system
The spool work process of the SAP System and the host spool system (operating system spooler) are on the same host.
S
Printing using a remote Microsoft Windows PC with the SAPlpd transfer program. The spool work process of the SAP System and SAPlpd are on different hosts.
The spool work process transfers the output data to the SAP transfer process (SAPlpd) in the remote PC.
U
Printing using a remote UNIX server or Microsoft Windows PC (with or without use of SAPlpd), where the spool work process of the SAP System and the host spool system (operating system spooler) are on different hosts.
The spool work process transfers the output data to the host spooler in the remote system using the Berkeley protocol (BSD).
F
Printing on a frontend printer
Output requests are printed locally at the user’s PC.
E
Printing using an external output management system
The printer is connected to an external output management system.
P
Printing using a device pool
I
Archiver
The device is an archiving device for SAP Archivelink.
M
Printing using e-mail