SAP Basis/Netweaver Tutorials, Monitoring, Administration(Certification) and FAQs Headline Animator

SAP Basis/Netweaver Tutorials, Monitoring, Administration(Certification) and FAQs


Thursday, 16 June 2011

What are the different background job statuses ?

This article answers the following queries :

  • What are the different statuses of a background job and their significance ?
  • How to cancel or terminate a background job ?
  • How to capture an active job ?
  • What could be the reason for  canceled status of a job ?

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


A background job can have following statuses :




Scheduled :  This means that the steps that are required to make up the  job are already completed but the start condition is not yet specified.

Released : This means that all the steps that are required to make up the job including start condition are defined. A job cannot be released without a start condition. A job can be released only by the administrator or by the user who has proper authorisations.

Ready : This means that the job is ready for execution. It is kept in the wait queue by the job scheduler and is waiting for the next free background workprocess to assign the same.

Active : This means that the job is currently active. In this state, job cannot be deleted or modified.

If the active job is not running correctly, either it can be terminated or it can be canceled in a background workprocess in debugging mode, analyse it and  can be released again.

How to capture a background job ?

Goto SM37 transaction and navigate to Jobs -> Capture active job to capture the job. Once the job is captured , analyse the same and you can release it again.
Please note that you should be in the application server on which the job is running to capture a job. Otherwise, you cannot capture it.











How to terminate a background job ?

Goto SM37 and list all the jobs that are active between some time interval.
Once it listed the active jobs, identify the job that is to be deleted. Then navigate to  Job -> Cancel Active job and cancel the job.


Finished : The execution of the job has completed successfully

Canceled : The job got aborted or canceled. This can happen for 2 reasons.
                 
  • One of the job step is terminated with an error
  • An administrator has deliberately terminated the job due to various reasons like running unusually for a long time





How to change SAP parameters ?

This article answers following query :
How to change or set a SAP parameter


SAP parameter can be set using RZ10 transaction. Go to RZ10, select the respective instance profile of the application server on which you would like to change the parameter.
From the dropdown of profile, select the instance profile (of the application server) on which you would like to change the parameter.


After selecting the profile, select extended maintenance button and press change push button.

It displays a screen with all the parameters as shown below :

You can  either search the parameter or create the parameter and then set the value to the desired and save the same as below.

Set the parameter value in the text box provided and click copy button to copy the same and then press back button and press copy again in the next screen. After that press the back arrow to come to the following screen

Click on Save button to save and activate the profile.

Press no to goto the next screen



Press yes, to activate the profile.



The parameter will take effect after restart of the application server





Wednesday, 15 June 2011

How to avoid TIME_OUT dumps in SAP system ?

This article answers the following queries :
  • How to avoid TIME_OUT dumps in SAP system ?
  • There are lot of TIME_OUT dumps in ST22 transaction. How to avoid these dumps ?
-----------------------------------------------------------------------------------------
These TIME_OUT dumps usually occur if the program has exceeded the maximum permitted runtime without interruption. After this program will get terminated and in ST22 a dump will get generated.
Usually SAP system will terminate the program after permitted runtime to make the work area available to other users who may waiting and to prevent a work area being blocked unnecessarily long time like
Eg: Database accesses without a suitable index (Full table scan)
      Database access with a large result set
     Endless loops (DO, WHILE) etc

In SAP, there is a parameter rdisp/max_wprun_time which limits the maximum permitted runtime without interruption. By default this value is set to 600 seconds. However, if you are frequently encountering more dumps in SAP system due  to this, you can consider increasing this value to 3600 seconds to avoid this issue.




What is Change and Transport System(CTS) in SAP ?

This article answers following queries in SAP ?
  • What is Change and Transport System (CTS) in SAP ?
  • What is Transport Management System(TMS) in SAP ?
  • What is Change and Transport Organiser (CTO) in SAP ?
  • What are the transport tools  in SAP ?
  • What is the transport control program and what is its significance in SAP ?
  • What is the functionality of R3trans program in SAP?
-----------------------------------------------------------------------------------------
Change and Transport System (CTS) is the tool provided by SAP for the creation, documentation and distribution of changes within a system landscape.

CTS comprises of 

Change and Transport Organiser (CTO) : This provides several functions to facilitate software development 

 Transport Management System (TMS) : This is used to setup transport routes in the landscape. This provides functions to perform organize, monitor and perform transports within the landscape 

Transport Tools (R3trans and TP) : These are the tools that are used by SAP at operating system level to communicate with SAP, database and the files generated during the export process.


The transport control program (TP) is a utility for provided by SAP for managing transports and to handle release upgrades. This utility is inturn called by other programs like CTS, TMS and Upgrade control program (R3up)

R3trans is a transport program provided by SAP to handle transports between different SAP systems and for the release upgrades. R3trans is usually not called directly and it is called mostly by Transport control program(TP) and Upgrade control program(R3up)




How to activate automatic sap* user in ABAP stack of sap?

This article answers the following queries:
  • Forgot sap login password for ABAP stack . Donot have any other password for any other user id. How to login to sap? 
  • How to activate automatic sap* user in ABAP stack of SAP?
  • Unable to login to newly created client with sap* and default password. How to login now ? 
  • Sap* user got locked for ABAP stack. Donot have any other user id to unlock the same. How to login to system again?

-----------------------------------------------------------------------------------------
  In SAP, there is a parameter login/no_automatic_user_sapstar whose default value is 1. If the value is set to 1, automatic login of sap* into SAP system using password PASS won’t be allowed.
In all of the above scenarios,
Pls set the value of parameter login/no_automatic_user_sapstar to 0 in both the default profile and the instance profile and restart the instance. So automatic login of sap* with default password will be enabled.


How to change SAP parameter ?
Afterwards, connect to the database and execute the following command :
In the following example am considering, oracle as the database.
sqlplus “/ as sysdba”
SQL > Delete from SAPSR3.USR02 where MANDT=’000’ and BNAME=’SAP*’;
In the above command, SAPSR3 is the schema of the database and USR02 is the table name and MANDT is the client and BNAME is the user id.
In case you would like to activate sap* in client 500 and your schema name is SAPBPW then the command would be as below :
SQL > Delete from SAPBPW.USR02 where MANDT=’500’ and BNAME=’SAP*’;
Once you successfully executed this command, you can login to sap system with SAP* user id and default password PASS



Tuesday, 14 June 2011

How to schedule Basis standard jobs ?

This article answers the following queries :

  • How to schedule Basis standard jobs ?
  • What is the need of scheduling basis standard jobs ?
  • What are the Standard jobs that should run in an SAP system & their significance?
----------------------------------------------------------------------------------------

How to schedule Basis standard jobs ?

Goto transaction SM36 and click on "standard jobs" pushbutton. This inturn displays standard jobs screen. Here select all the jobs and click on "default scheduling" push button to schedule all of them as per their default schedule.




Incase you would like to change the default schedule for each job, it can also be done by selecting each job and defining its start date/time and periodicity in the same screen.

What is the need of scheduling basis standard jobs ?

Standard jobs are the jobs that should run regularly in the SAP system. These jobs will perform housekeeping like deleting old spool requests (thus avoiding spool overflow), deleting old background jobs/logs/updates/batch input sessions/ABAP short dumps, collecting operating system/database level statistics (used for workload reporting)  etc

What are the Standard jobs that should run in an SAP system & their significance ?

SAP_CCMS_MONI_BATCH_DP : Internally this job runs
RSAL_BATCH_TOOL_DISPATCHING report. This job dispatches monitoring architecture methods

SAP_COLLECTOR_FOR_JOBSTATISTIC : Internally this job runs RSBPCOLL report. This job generates run time statistics for background jobs

SAP_COLLECTOR_FOR_PERFMONITOR : Internally this job runs RSCOLL00 report. This job collects data for the performance monitor

SAP_COLLECTOR_FOR_NONE_R3_STAT : Internally this job runs RSN3_STAT_COLLECTOR report. This job will collect non-abap statistic data (Distributed Statistic Records - DSR)


 SAP_REORG_ABAP_DUMPS : Internally this job runs RSSNAPDL report. This job cleans up old abap short dumps


SAP_REORG_BATCH_INPUT : Internally this job runs RSBDCREO report. This job cleans up old batch input sessions


SAP_REORG_JOBS : Internally this job runs RSBTCDEL report. This job cleans up old background jobs


SAP_REORG_JOBSTATIC :  Internally this job runs RSBPSTDE report. This job cleans up old data from the run time statistics of the jobs


SAP_REORG_ORPHANED_JOBLOGS : Internally this job runs RSTS0024 report. This job cleans up orphaned job logs. The logs that cannot be deleted by RSBTCDEL report (i.e SAP_REORG_JOBS), remains as orphans which will be deleted by this job.


SAP_REORG_SPOOL : This job internally runs RSPO0041 report. This job deletes old spool data


SAP_REORG_XMILOG : This job internally runs RSXMILOGREORG. This job deletes XMI logs


SAP_SOAP_RUNTIME_MANAGEMENT : This job internally runs RSWSMANAGEMENT report. This job does the SOAP runtime monitoring


SAP_REORG_UPDATERECORDS : This job internally runs RSM13002 report and this deletes old update records






What is the difference between Config Tool and Visual Administrator tools in SAP?

This article answers the below queries :

  • What are the prerequisites and uses of  config tool ?
  • What are the prerequisites and uses of Visual Administrator ?
  • What are the limitations of Config tool ?
  • What is the difference between Config Tool and Visual Administrator tools in SAP?

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

Config Tool and Visual Administrator(VA) are the administration and configuration tools in SAP Netweaver AS Java.

What are the prerequisites and uses of  config tool ?

The prerequisite for the config tool is database must be running, as this tool is  used to maintain the SAP Netweaver AS Java settings in the database. It is not necessary that Java should be running to use config tool.

Uses of config tool :

  • The Java Virtual Memory(JVM) settings can only be maintained with the config tool.
  • Configuration of services and managers can be done with config tool
Limitations of Config tool :

  • Remote configuration cannot be done by Config tool
  • Start or stop of java cannot be done through config tool
  • Change of parameters at run time is not possible

What are the prerequisites and uses of Visual Administrator ?

With visual administrator, we can logon to the P4 port of the AS Java. Hence both database and java should be running. This is the prerequisite for VA.

Uses of Visual Administrator :

  • Configuration of services and managers can be done
  • Remote configuration can be done ( It means VA can be installed and used for configuration in any host on which SAP Netweaver AS JAVA is not installed
  • Starting and stopping services can be done
  • Stopping an SAP NW As java instance can be done

What is the difference between Config Tool and Visual Administrator tools in SAP?

  • Java Virtual Machine parameter settings can only be done through Config tool. VA cannot be used for this
  • To use VA, SAP Netweaver AS Java should  be running but for config tool it is not required
  • Changes to selected parameters can be done at run time through VA, which is not possible with Config tool.
  • AS Java can be started/stopped by VA which is not possible by Config tool
  • Remote configuration can be done by VA but not by config tool
Related Link :

How to open config tool?






What is lock table over flow ? How to resolve lock table overflow issue ?

This article answers the below queries ?

  • What is lock table overflow ?
  • How to identify lock table over flow issue ?
  • What is the parameter to be changed to increase lock table size in SAP ?
  • What is the reason for lock table overflow ?
  • How to resolve lock table overflow ?

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

What is lock table overflow ?

SAP manages locks using lock table. The lock table contains all of the informaton related to locks like who is holding the lock and which locks are currently held etc. The size of the lock table can be specified by the SAP parameter enque/table_size. The size of the lock table limits the number of locks, lock owners and lock names. If this size is exceeded, then the lock table overflow occurs.

How to identify lock table overflow issue ?

In SM21 transaction log and ST22 dumps, if you find any error messages like LOCK_TABLE_OVERFLOW, Lock table overflow, Internal lock administration error it means there is a lock table overflow issue.


What is the parameter to be changed to increase lock table size in SAP ?

Parameter enque/table_size to be changed to increase or decrease lock table size using RZ10 transaction. Default value of this parameter is 32768. The min value that can be set is 4096 and max value is 102400. The unit for this parameter is KB.


As this is not dynamic parameter, for the new value to take effect, a system restart is required after modifying the parameter.

What is the reason for lock table overflow ?

A lock table overflow can occur due to

  • The lock table is configured too small (i.e value set to enque/table_size parameter is very low)
  • Due to improper design of application which sets a large number of locks
  • Number of enqueue worprocesses configured in a sap system are less and update is very slow/hanging due to which lots of locks are accumulated in lock table
  • Running a custom report with improper selection criteria (like very long time periods data pull) which sets so many locks & eventually lock table overflow occurs

 How to resolve lock table overflow ?

  • Increase the size of lock table i.e increase the parameter enque/table_size value using RZ10 transaction.
          To determine the optimal value for this parameter, you can check the maximum locks set so far in the history and the current number of locks set from SM12 -> Extras -> Statistics

  • Increase the number of enqueue workprocesses


  








what is spool overflow ? How to troubleshoot spool overflow issue ?

This article answers the following queries :

  • What is spool overflow ?
  • How to troubleshoot spool overflow ?
  • How to delete old spool requests ?
  • How to avoid spool overflow issue ?
  • How to check spool numbers?
  • How to set the spool number in SAP ?
  • How to define storage location (Temse) of spool requests ?


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

What is spool overflow ? :

Spool request that got generated are stored in a temporary sequential file called Temse. Please note that these are stored in Temse because these are not stored permanently. The size of the Temse is limited by the parameter definition.
The default size of Temse is 32,000 and it can be increased till 2 billion. However, defining very high value can effect the database performance. Due to limited storage capacity of Temse, when this file got full, this throws an SAP spool overflow error.

If this happens, customers could not print from SAP. If you check in SM21 and ST22 transactions, you may encounter some error log or dumps like

  • ERROR IN SPOOL call : SPOOL OVERFLOW
  • SPOOL_INTERNAL_ERROR
  • System internal error in the spool system
How to troubleshoot spool overflow ?

To resolve this spool issue, some of the old spools can be deleted from the sap system. Goto transaction SPAD. From the initial screen, navigate to Administration -> Clean_up_spool. Once you click this, Spool Administration : Delete old spool requests screen will be displayed.
In that screen, you will be prompted to choose requests for deletion like

  • Old spool requests older than the maximum set age
  • Requests already printed
  • All spool requests
and enter value for minimum age (in days) text box.








Select the check boxes as per the requirement (eg:  delete all requests already printed and minimum age in days equal to 30 days) and execute to delete old spool requests, which will clear Temse and will resolve spool over flow issue.

Apart from this there are others ways of resolving spool overflow issue. They are

1) Run the report RSPO0041 from SE38 transaction to delete old spool requests








2) Run the report RSPO0043 from SE38 transaction, which checks the Temse/spool consistency and reorganizes the spool







How to avoid spool overflow issue ?

  • These reports RSPO0041 and RSPO0043 should be scheduled as background jobs with proper variants on a periodic basis which avoids spool overflow issue.

  • You can try to increase the spool numbers from default 32000 to a bit higher value but please note donot set this too high as it may impact database performance

  • Proactive monitoring check can be made in RZ20 transaction to see how much is the fill level of spool numbers.
          How to check spool numbers ?

          To check spool numbers : Goto RZ20 transaction, navigate to SAP CCMS Monitor Templates -> Spool System.







Here you can check the status of spool servers and the used numbers percentage of spool numbers. If you find that used numbers is greater than 80%, you can manually run above mentioned reports or delete old spool requests from SPAD tcode as mentioned earlier.

How to set the spool number in SAP ?

Using Transaction SNRO (Number range object maintenance) and object SPO_NUM, you can set the spool number in an SAP system.










Once you provide object as SPO_NUM, click on change icon. It displays another screen. In that screen, click on Number Ranges push button. It displays another screen "Number range for spooler numbers". Click on change icon here and set the value of spooler(from number and to number). Please note that a change request may be generated here based on the client settings(if automatic recording of changes is set in SCC4 transaction of the client)

How to define storage location (Temse) of spool requests ?

Every Temse object contains a header in TST01 table and the actual object. This can be either stored in table TST03 or in file system. You can set a parameter rspo/store_location in RZ10 to define whether to store Temse objects  TST03 table or in filesystem.

If value G is set to this parameter, it will be stored in filesystem and if it is db it is stored in TST03 table.








What are the different Spool statuses and their significance?

This article answers the following queries :

  • What does spool request contain ?
  • Where is the spool request stored ?
  • What are different Spool statuses and their significance?
  • Which workprocesses will create spool requests?
  • What is the difference between spool request and output request ?
  • Which workprocess will create output request  or print request?

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

What does spool request contain ?

Spool request contains detailed information regarding printer model, formatting to be done on the data to be output.

Where is the spool request stored ?

The spool request that is generated is stored in the Temse( temporary sequential file)

What are different Spool statuses and their significance?

Spool requests will have different statuses like

  • Completed (The output request printed successfully)
  • Waiting (Spool request is in waiting status and spool system has not yet processed the output request and not yet sent to the host system)
  • Inprocess (The spool workprocess is in the process of formatting output request for printing)
  • Printing (The host spool is in the process of printing the output request
  • Problem (This indicates there are some minor errors. It means output request printed but contains some errors like incomplete character set etc)
  • Error (This status indicates some serious issues such as network error. It means the requests have not printed and they remain in the spool system until they are deleted or until they reach their expiration date. After expiry date, they are deleted by the reorganisation jobs. 
  • Archive (This status is set for spool requests that are sent to an archiving device. This status means that the spool request was already processed by the spool system and it is now waiting to be archived)
  • Time (This status means that the user who has created the spool has mentioned some specific time for output)
  • -  ( This minus status means that the spool request is not yet sent to the host system and no output request exists)
  • + ( This plus status means that the spool request is being generated and it is stored in the spool system )
Which workprocesses will create spool requests? :

Spool requests will be created by dialog or background workprocesses.
Please note that spool work processes donot create spool requests


What is the difference between spool request and output request ?

Spool request contains detailed information regarding printer model, formatting to be done on the data to be output. Output request contains all the data in the format that the printer understands.

A spool workprocess formats the data specified in the spool request and generates the output request. Output request is also termed as print request.

Which workprocess will create output request ?

Output request will be created by spool workprocesses.




Monday, 13 June 2011

How to troubleshoot a background job running for long duration in sap?

This article answers how to troubleshoot a background job running for a long duration

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

1) First of all identify the job that is long running and identify details like job class, workprocess that is executing the job


2) Click on the job to view the display job screen. In the screen, click on job log to understand what is being performed by the job currently. This may give details like job is currently extracting some data packages or processing data packages etc

3) Identify the executing server and process id of the job from the step 1 and goto transaction SM50 of the respective executing server to view more details about the background job running.

Figure out the status of the job like On Hold or running from the process overview. If the job is On Hold, find out the reason for On Hold by examing the "Reason" column of SM50 transaction. Reason for On Hold could be due to CPIC/RFC/DEBUG/ENQ/PRIV/UPD etc.

Double click on the reason column for detailed information on the same and troubleshoot accordingly. If reason is RFC, check out which RFC it is referring to and cross check whether destination system is up or not and any other problems with that system.
  • If it is ENQ, check out any lock issues like lock overflow etc
  • If it is PRIV, check out for memory bottlenecks
  • If it is UPD, check out whether any update issues
  • If it is CPIC, check out for any network , gateway, message server and other communication problems

4) After performing step3, if you figure out job is not on Hold and it is in running state, then examine report column to identify what report/program is being executed by the job. Once you got the report/program details, figure whether it sap program or custom program and take actions accordingly.

5) Also examine Action and table columns in SM50 transaction of respective executing server to identify what is the action( roll in/roll out /Sequential read/Physical read/insert/update/delete etc)  being carried out by the job currently and what is the table on which action is being carried out.

If it is sequential read, figure out the cost of that sequential etc and consider for indexing etc. If it is physical read, check out whether there are too many swaps and consider resizing buffers accordingly. If you observed delay is due to high roll in/roll out, identify reasons for the same and tune buffer/memory parameters accordingly.

6) Once you get the table details on which action is being carried out, figure out        

  •     How many records are existing in the table ?
  •     Is this taking long time due to volume of records ?
  •     Are there proper indexes on the table ?(If no proper index, consider index creation  by taking help of DBA )
  •     Is the table having upto date statistics ? (If statistics are out of date,
              consider updating statistics of that table)


7) Consider debugging the process in SM50 ( Program/Session -> Program ->   Debugging ) to figureout the issue

8) Using ST05 or ST12, a trace can be taken for background job to figure out where exactly time is being consumed and to identify various cpu/memory bottlenecks or any buffer issues.

9) STAT/STAD transcation can be used to figure out what is the reason for high response time and actions can be taken accordingly

10) By taking help of ABAP er, even ABAP run time analysis can be done using SE30 transaction

By following the above steps, you can pin point the issue and take actions accordingly to minimize runtime of long running background jobs.