How to determine SAP Table Buffer Requirements

November 19th, 2008 Comments Posted in BASIS, Configuration, Monitoring

I had one of those ‘doh’ moments during a recent SAP performance performance tuning workshop. The instructor, Tim Bohlsen, pointed out a remarkably easy way to discover how large a table buffer that a running ABAP WAS system instance requires to reduce buffer swaps to zero.

This is important because the easiest way to reduce your database I/O in ANY application, SAP or not, is to reduce the need to go to disk. Keeping data in the Application buffer improves response time by reducing the time (both the CPU time and the I/O time) requiried by the DBMS to continually retrieve that data.

In the case of an ABAP engine, you use transaction ST02 to determine if there is any swapping going on in the first place. In the case shown below, both table buffers have some swapping - it is a relatively well tuned HR/PY system, so there isn’t much table buffer swapping despite the sytem being up for two months. Oh, and there isn’t much point in doing this on any other system except the one you wish to tune as it will be extremely difficult to replicate the load of the target system.

Select the images to open larger versions in another window or tab

In this case, we will look at the Generic Key Buffer, since it is the the worst of the two Table Buffers. Selecting the buffer in question, by double cliking on the line, results in a screen showing a little bit more detail. This has some usefull navigation features. As shown below, we are looking at the current status of the buffer, but we have the option to look at the history of the buffer. This can give us an idea of when the swaps occurred, which we can then track back to certain workloads. Moe importantly, we can look at the current status of the individual objects in the buffer.

Now we have the statistics for individual tables (or parts thereof ) that are currently loaded into this Buffer. This data is usefull in and of itself, which I will touch on in a later post, but first, select the Next View button.

st02 first view of the table statistics

The value highlighted below is the total value for Size maximum [bytes]. This is the sum of the highwater mark for each table that has been loaded into the buffer so far. In other words, the amount of storage required to accept all data requests that should be buffered, without swapping, since the instance was started.

ST02 snapshot of a table buffer by table

Now, you could put this value straight in to the appropriate profile parameter and restart your system, but there are a couple of caveats.

  1. If a table is marked to be buffered, but has not been read yet, it will not be included in the buffer or, therefore, the buffer size yet,
  2. You need to examine the detail of both the snapshot and the history to determine if the correct tables are buffered or if they are correctly buffered (the Invalidations total suggests that there is some work to do in this area), and, most importantly,
  3. This does not tell you if you have sufficient storage available to fulfill any increase in the buffer size without causing problems elsewhere

So, make sure your system has been through a pay run, or a month-end (or whatever the appropriate business cycle is) before you use this method to measure the requirement,
use sappfpar to validate the storage requirements of your new profile parameters, and
be aware that this is only the first step towards efficient use of all of the available resources.

This won’t fix all your performance problems. However, it is an important first step. Your database vendor may make the most efficient database engine there is, but calling any DBMS to get data will always be slower than getting that data from memory.


Howto avoid irj/portal in the portal URL

September 18th, 2008 Comments Posted in Configuration, Portal

Actually, its a bit of a cheat. What happens is that you’re telling the J2EE WAS that if there is no page specified (such as …/index.html), then open the page …/irj/portal.

1. Go to j2ee visual administrator
2. For each Server, Navigate to Cluster-> Server -> Services -> HTTP Provider
3. Enter /irj/portal in the Start Page Text Field
4. Click on Save Properties
5. Restart this service from visual administrator

va_start_page.jpg

Access http://yourserver.yourdomain.com and your portal login page should come up.

This means that your SAP J2EE Engine Start Page will still show up if you http://yourserver.yourdomain.com/index.html


Upgrade to SAP ECC 6.0

July 7th, 2008 Comments Posted in Configuration, Upgrade

I’m posting these links for myself and anyone else who may be required to lead or assist in an upgrade to ECC6.  They point to blog entries the SAP Developer Network, which is an SAP sponsored and developed community site for all things SAP.

How To Tackle Upgrades to SAP ERP 6.0
This blog addresses frequently asked questions about the upgrade to SAP ERP 6.0, asked by customers at user group events, projects, and other occasions.  Mar. 20, 2008

How To Tackle an Upgrade (2): Technical Upgrade
In this blog, Martin Riedel, Senior Vice President and head of the SAP Global Upgrade Office, addresses frequently asked questions from customers about upgrading to SAP ERP 6.0. The questions have been gathered at user group events, on projects, and during the course of other occasions. Part 2 focuses on the technical upgrade.  Mar. 31, 2008

How To Tackle an Upgrade: Implementing Functional Enhancements
The second phase of the upgrade approach is to implement functional enhancementes. This blog post gives an overview of this phase and explains how crucial project management is. Apr. 13, 2008

How To Tackle an Upgrade (4): Implementing Strategic Enhancements
Part 4 of this blog describes how an upgrade to SAP ERP 6.0 provides the perfect basis for enabling your IT landscape for enterprise service oriented architecture (SOA) and what’s in it for you.  Apr. 28, 2008

How To Tackle an Upgrade (5): Upgrade Services for the Planning Phase
This blog post describes which services can assist you in the planning phase of your upgrade project to SAP ERP 6.0 May. 13, 2008

How to Tackle an Upgrade (6): Enhancement Packages for SAP ERP
Part 6 of this blog series focuses on some of the most frequently asked customer questions regarding enhancement packages, support packages, and upgrades.  May. 20, 2008

SAP Upgrades (7): Customers’ Experiences and Pain Points – What about Yours?
Part 7 of this blog gives you an insight into customer feedback data about SAP upgrades: What are the main challenges and pain points when planning and performing an upgrade?  Jun. 21, 2008

SAP Upgrades: When Should my Organization Convert to Unicode?
Part 8 of this blog answers one of the most frequently asked customer questions: When upgrading to SAP ERP 6.0, do we have to convert to Unicode?  Jul. 5, 2008


SAP Event Processing

July 3rd, 2008 Comments Posted in BASIS, Configuration

An SAP event is a “flag” that is created by using transaction SM62 View and Maintain Background Events. The commonest use of Events is to trigger jobs. Events can be triggered from the Operating System or from within SAP - either within ABAP programs and Function modules or from Transaction SM64.

Create an Event in transaction SM62. Select the Maintain radio button next to User Event Names and execute. This will present tyou with the Edit User Events screen. You can add change or delete user events from here.

To use this Event as a trigger, create a job via transaction SM36. You specify the Event that will trigger this job using the Start Condition button. On the Start Condition screen, select option AFTER EVENT. The After Event fields will open for input. Fill these in and Save.

Definng SAP Batch Job Start Condfitions

You can see which jobs are waiting for events by looking at table BTCEVTJOB (via transaction SE16). This is the system’s way of keeping track of which jobs are in the queue waiting for an event to occur. The EVENTID column contains those Events that will submit a Job. You should see several System Events here.

A listing of the BTCEVTJOB table

Now, once the event is triggered this newly created job will execute. The event can be triggered via transaction SM64 or from the Operating System (see below).

To get the event triggered from the Operating System, log into the <sid>adm user id (at the Operating System level) level and go to directory /usr/sap/<sid>/SYS/exe/run. Note that in the Unix / Linux implementations, there is an alias ‘cdexe’ that will get you there as well. Run the SAPEVT executable as follows :

sapevt <event_name> -t pf=<instance_profile_directory_and_name> nr=<sys_number>

Example:

sapevt roberts_test -t pf=/usr/sap/DEV/SYS/profile/DEV_DVEBMGS00_server001 nr=00

This will raise the event, and cause the job scheduled within SAP to execute. Once the job has executed the SAP event that was in the table BTCEVTJOB will disappear.

Every time a Background Job is run, an entry is created in table TBTCO. This contains entries such as JOBNAME, EVENTID, EVENTPARM, JOBCLASS etc. This means that once you’ve found your job name in this table (using SE16) you can double click on its entry and see that it was executed via an event.


Operating System TP / TMS / CTS unconditional modes

June 26th, 2008 Comments Posted in BASIS, Configuration

The TMS / CTS functions are  a front end to the TP commands at the operating system level. If you use the operating system commands, you face the challenge of replicating the options available via the SAP GUI front end.  These options are controlled by using the Unconditional mode. An example of how to use these is shown below. 

host:prdadm 2> tp import L6BK162625 PA1  U client=100
This is tp version 340.16.38 (release 640)
This is R3trans version 6.13 (release 640 - 07.01.08 - 14:25:00).
2EETW000 T5QTM table class is ‘C’. Entries are only imported to client ‘000′.
2EETW000 T5QTX table class is ‘C’. Entries are only imported to client ‘000′.
R3trans finished (0008).
tp finished with return code: 8
meaning:
  A tool used by tp produced errors
host:prdadm 3> tp addtobuffer  L6BK162625 PA1
This is tp version 340.16.38 (release 640)
Addtobuffer successful for L6BK162625
tp finished with return code: 0
meaning:
  Everything OK
host:prdadm 4> tp import L6BK162625 PA1  U128 client=100
This is tp version 340.16.38 (release 640)
This is R3trans version 6.13 (release 640 - 07.01.08 - 14:25:00).
R3trans finished (0000).
tp finished with return code: 0
meaning:
  Everything OK
host:prdadm 5>

The U stands for unconditional force, similar to the options that you can select when importing via the SAP GUI.

0: Overtaker - change requests can be imported without deleting it from the buffer. Usually, this is followed sooner or later by an import using unconditional mode 1 to import another transport in the correct sequence.

1: Import the transport again.

2: Allow transport to overwrite SAP or System originals.

3: Allow transport to overwrite system-dependant objects.

5: Allow transport to contain source systems other than the integration system (usually used only when importing into Development or Consolidation system).

6: Allow transport to overwrite objects in unconfirmed repairs.

8: Allow transport to ignore limitations caused by the table classification (see the example above).

9: Allow transport to ignore that the system is locked for this kind of transport.

 

Remember that the location to run the tp addtobuffer and / or tp import from is operating system dependent:
(Windows): \\$(SAPTRANSHOST)\sapmnt\trans\bin
(UNIX): /usr/sap/trans/bin


SAP HR/PY Structural Authorisations

June 11th, 2008 Comments Posted in Configuration, Security

I had added a new developer to the customer’s HR/PY landscape, but they couldn’t see any of the Employee Data in the Development or QA system. According to SU01, the roles and profiles were identical to a developer who could see the data.

After hunting around my disks (because it has happened to me before !!), I found a note about Table T77UA, which has prompted this reminder to both myself and any one else who has to work with HR/PY Developers.

HR Security

HR Security comprises the General Authorisation Profiles as managed by Role Maintenance (transaction PFCG), plus Structural Profiles.  To assign Structural Profiles, you use table T77UA (User Authorizations = Assignment of Profile to User).  The Structural Authorisation’s themselves are specified in the T77PR table (Definition of Authorization Profiles).  You protect structures (or substructures) of the Organisational Chart by making relevant entries in this table.

  1. When you use both Structural and General Authorisations , a user’s Overall Profile is determined from the intersection of the two.
  2. The structural profile determines which object in the hierarchical structure the user has
    access to;
  3. The general profile determines which object data (infotype, subtype) and which type of
    authorization (Read, Write, …) the user has for these objects.
  4. The access mode for authorization objects in HR Master Data is determined in the AUTHC field (Authorization Level).

Steps to do Structural Authorisation:

  1. Use transaction OOAC (updates table T77S0) to Activate the Structural Authorisation switch
  2. Use transaction  OOSP (updates table T77PR) to Create Structural Authorisation profiles. You protect (sub)structures by making relevant entries in this table.
  3. Assign regular Role Authorisation via PFCG.
  4. Assign Structural Authorisation profile to User Id. Apparently, some releases have a report RHRPROFL0 that you can use to assign the object id. However, I use transaction SM30 to update Table - T77UA (User Authorizations = Assignment of Profile to User).
  5. Organizational Plans are created using PPOCE

SAP Enterprise Portal 7 - Modify Default Ports

June 3rd, 2008 Comments Posted in Configuration, Portal

An SAP portal installation, by default, selects a port for http and https access based on your system number. For example, if your system number is ##, then the default port for portal access would be

* 5##00 for http access
* 5##01 for https access ( aka SSL )

Many Project teams wish to shorten this long url (http://yourserver.yourdomain.com:5##00\irj\portal). Fortunately, there is an easy way to modify the portal http and https ports and keep it to 80 and 81 ( or anything you wish).

Follow the below given steps to achieve this.
1. Start the j2ee visual administrator tool
2. navigate to cluster -> dispatcher -> HTTP Provider
3. Choose Ports
4. Change the port number to 80 for http and 81 for https
5. Thats it - You’re done!!!!

ports01.jpg

One extra step that’s required if you’re also running IIS (for example, if you’re using an ITS to communicate with an older R3 system or running TREX), you need to make sure that your J2EE ports do not conflict with any of the IIS ports (including the default web server). The best way of doing that is to ensure that the IIS default web server is pointing at different ports AND is stopped.

ports02.jpg


SAP Enterprise Portal 5 - Modify Logon Page

June 2nd, 2008 Comments Posted in Configuration, Portal

The logon page is FormLogon.asp found in the SAPPortal  directory of the Default Web Site under IIS 

image

For those familiar with later releases of Enterprise Portal, you need to remember that when EP5 was released, the Web Application Server release of SAP had yet to be released.  This meant that the portal server had to provide its own web server.