Friday, June 29, 2012

System Trace: Relevant Profile Parameters

With system profile parameters, you can set the maximum size of the SQL and system trace files and specify its path name. All trace parameter names begin with the string rstr/. For default values and parameter documentation, see transaction RZ11.

The trace parameters that you can set are as follows:

Profile Parameters

Meaning

rstr/buffer_size_kB

The SAP trace (such as SQL trace) writes the trace data to the trace files. For performance reasons, this is done via an internal buffer and not directly. The profile parameterrstr/buffer_size_kB determines the size of this buffer in kilobytes.

rstr/filename

rstr/max_files

rstr/max_filesize_MB

Since Release 6.10, the SAP trace stores the data in several files. These files are written to sequentially. The parameter rstr/filenamesets the basic name of these files. There is always one file with the basic name. When this file is full (parameterrstr/max_filesize_MB), the file is re-named and a new file is created with the basic name. When the file is re-named, a number from 00 to 99 is added to the filename. The parameter rstr/max_files determines how many files there are in total. If this number is exceeded. the files are overwritten.

The System maintains additional trace parameters which you should not change.

You can obtain further information on the parameters using transaction RZ11.

Protecting Trace Information from Being Overwritten


If you want to protect a trace from being overwritten later, choose the Save button on the initial screen, or choose Go To -> Save from the menu.

On the next screen, you can create a short text for a trace, and choose whether the new file that is created specifically for this trace should be automatically created, or whether you want to specify a file. If you do not specify an absolute path, a file of this name is created in the log directory. In the case of automatic file creation, the system determines the filename and stores the file in the log directory. The advantage of this is that, unlike a manually created file, the F4 help can be used for to search for the file from the analysis screen.

If you choose automatic creation, you can delete the file again in this transaction (use the  button in the analysis screen). This is not possible if you specify a filename. If you want to delete this kind of file, you have to do so at the operating system level.


(Enter transaction code ST01. Alternatively, choose Administration -> System administration -> Monitor -> Traces -> SAP System Trace.)

Interpreting the Analysis in System Trace

Information in trace entries includes the following:

  • Time (to the millisecond). Double-click to see the time to the microsecond.
  • Type of the trace entry, that is, the component selected when the trace was activated or when the analysis settings were made.

Component

Key

Object

Authorization check

AUTH

Authorization object used

Kernel functions

CMOD

Corresponding C function in kernel

General kernel

USER

C module in the kernel in which the trace is written

Database accesses (SQL trace)

SQL

Database table being accessed

Table buffer trace

BUFF

Database table being accessed

RFC calls

RFC

Called function module

Lock operations

ENQUE

Lock object used

  • Duration of the trace, provided this is useful. In the case of an authorization trace, a USER trace (free text that can be written by a kernel module), and the beginning of a C function in CMOD trace, a duration is not useful and therefore not required.
  • Object: the object is different, depending on the trace component, and can be obtained from the table above.
  • Trace message text

Double-click on a line to get additional detailed information on this trace record.

Options for Trace Analysis in System Trace


If you choose Analysis, a screen opens on which you can make various analysis settings.

Besides determining the trace components, you can restrict the analysis to particular users, work processes, transactions, and times.

For performance analysis, you can use the field Duration to analyze only records for which the duration of a trace record exceeds a specific period of time. This also applies to trace components that have a duration. This setting does not apply to the authorization trace.

You can also set a restriction that only specific tables are included in the trace analysis (this also applies to the SQL and the table buffer trace). You can enter two table names directly on the screen; you can add other tables using the button of the same name. The button changes color if there are more than two tables in the list.

In the lower part of the screen, you can specify a separate file, in order to protect a trace from being automatically overwritten. If you specify a separate file here, the "normal" trace files are ignored and the specified file is used.

Besides the  button, there are 3 more buttons:

 Filter history

This shows you that last 10 filter settings of the user in question.

 Use default values

The filter gets the following default values: own user, own client, from 10 minutes ago (rounded off) until now, all trace types, not tables D010* and D020*.

 Delete all values

This button deletes the values in all fields.

The menu "Filter Settings" also contains all these functions.

Once you are finished making the settings for the analysis criteria, choose  to display the results of the analysis.

Activating and Deactivating System Traces in SAP


First configure the trace components. If necessary, restrict the selection using the pushbutton General filter, and then choose Trace on. You can also change the components while the trace is activate by choosing Change trace.

You can use both Settings buttons to save your settings and call them up again later.

You can use the Save button (or Go To -> Save in the menu) to save trace records in dedicated files. 

You are presented with a screen on which you can create a remark for the trace file and select whether this should be created automatically or whether a file has to be created for this purpose. 

System Traces in SAP

If you want to record the internal SAP system activities, use the function SAP system trace. Recording the processes in your application server enables you to monitor the system and facilitates troubleshooting.

The system trace is primarily used when an authorization trace is to be used. The system log or the developer trace are recommended for system monitoring and problem analysis.

The following components can be monitored using the SAP system trace:

  • Authorization checks
  • Kernel functions
  • Kernel module
  • Database accesses (SQL trace)
  • Table buffer
  • RFC calls
  • Lock operations (client side)

The last 4 components can also be monitored using Performance Analysis (transaction ST05). 

There are two ways of selecting what traces you want displayed. In the initial screen, the components to be logged are selected and more filters are set, if required. The filters and restrictions for the traces that have these settings can be set when the traces are evaluated.



Trace Facility in SAP

With the trace facility, you can trace various operations in your SAP System. You thus monitor the system and reduce the problems that occur

You can use the trace facility to monitor the following operations in your system:

  • SQL database accesses
  • ABAP programs
  • Internal operations in the SAP System and authorization check.You can use transaction ST01 for this.
  • Traces generated by SAP processes (developer traces).

These are the trace files that are written by the individual host system processes. These trace files contain highly technical information for use in the event of problems in your System. 


To access the trace facility, choose Tools ® Administration ® Monitor ® Traces.

Example of Trace Logging in Use

Let us assume that your work processes terminate sporadically. In the work process trace file, there is always a message like the following just before the termination point:

*** Error => ShmProtect(1002,3) shmat(4,0x700000490000000,(SHM_RND 0)) (22: Invalid Argument) [shmux.c 2904]

However, you cannot reproduce the problem. You have configured 20 work processes and do not want the trace files to occupy more than 500 MB in the work directory.

In RZ11, set the parameters as follows:

Parameter

Setting

Reason

rdisp/TRACE_LOGGING

on, 10 m

Trace logging is active. When the trace files reach 10 MB, they are copied to <file name>.old. In the case of 20 work processes, this makes 400 MB, plus the dispatcher trace and some buffer.

rdisp/TRACE_PATTERN_0

Error => ShmProtect* shmat*

The wildcard symbol * can be any character string.

rdisp/TRACE_SEARCH_LIST

WP, DISP

Only the work process trace file and the dispatcher trace file are logged. The gateway, the message server, and the ICM are not relevant here.

rdisp/autothtime

Keep the default of 60.

It should not be necessary to change the time interval at which the task handler checks the trace files. However, if so much trace is written that the size limit is reached within one minute, this value can be reduced.

Now change the trace level from the default 1 to 2 or 3. To do this, open SM50, select all work processes, and choose Process -> Trace -> Active ComponentsYou can specify the components and the trace level in the dialog box that opens. For an error of this type, it should be sufficient to select the components TaskhandlerABAP Proc., Scrn.proc., and Extended Memory. To increase the trace level of the dispatcher, choose Process ®Trace ® Dispatcher ® Change trace level.

You can now let the system run and check periodically whether the pattern was found. If the pattern is found, the parameter rdisp/TRACE_LOGGINGis automatically set back to OFF, and the trace level is set back to 1 (default). This is indicated in SM50 when the processes no longer have a yellow background. Once this happens, you can look in the trace files of the work processes and in the older trace files (files with the extension .old) to see what preceded the error.

Once you have finished your analysis, you can either reset the parameters in RZ11 or re-start the system. Any dynamic changes made to parameters are then lost.

Activating Trace Logging in SAP

  1. Activate trace logging by setting the parameter rdisp/TRACE_LOGGING to ON. Also specify the size at which, once reached, the trace file is logged and the trace level is reset to 1.
  2. You can dynamically change this parameter in transaction RZ11.

    The parameter values have the following syntax:

    rdisp/TRACE_LOGGING = on, <n> [k m] off


    The first part specifies that logging is active. The value here can be either ON or OFF. If logging is active, you can specify the file size in the second part.

    rdisp/TRACE_LOGGING = off : no trace logging

    rdisp/TRACE_LOGGING = on, 1000: trace is logged if the trace file contains more than 1000 bytes

    rdisp/TRACE_LOGGING = on, 20 k: trace is logged if the trace file contains more than 20 KB

    rdisp/TRACE_LOGGING = on, 30 m: trace is logged if the trace file is greater than 30 MB


  3. Use the parameter rdisp/TRACE_PATTERN_0 to specify a trace pattern for automatically switching off the SAP trace. This parameter takes effect only if trace logging is activated using rdisp/TRACE_LOGGING. In this case, the trace files are searched for the search pattern before being automatically reset. If the pattern is found, trace logging is deactivated and the trace level is reset to 1. The following trace files are included in the search:
  • Work process traces dev_w*
  • Dispatcher trace dev_disp
  • Gateway trace dev_rd
  • ICM trace dev_icm
  • Message server trace dev_ms

The search pattern can contain the special character * for any character string, and ? for any character. The parametersrdisp/TRACE_PATTERN_1 and rdisp/TRACE_PATTERN_2 can be used to define additional search patterns. All search patterns use the or operator; in other words, if one of the patterns is found, the trace level is reset.

Developer Trace Logging in SAP

You can use this function if you want to activate trace level 2 or 3 for a long period, but want to ensure that the trace file does not become too large. This is useful if you are trying to locate a sporadic error. If you are waiting for a particular trace output, you can specify that the trace file should be saved after the pattern you are searching for is found, and that the trace level should then be reset to 1.

In this way, you can easily control the size of the trace files. You can also search the trace file for a particular character string without running the risk of filling up your hard disk if a high trace level is active.


Set Size Limit for Trace Files

To activate trace logging, you have to set the parameter rdisp/TRACE_LOGGING. Here, you also specify the maximum size of the trace file.

If the trace file reaches that size, the content is written to a log file with the name of the trace file and the extension .old. The current trace file is then reset. The parameter rdisp/autothtime is used to define how often the trace file should be checked and, if necessary, reset. The default is 60 seconds.

Trace logging is active for the following trace files:

  • Work process traces dev_w*
  • Dispatcher trace dev_disp
  • Gateway trace dev_rd
  • ICM trace dev_icm
  • Message server trace dev_ms


Specify Trace Components

The parameter rdisp/TRACE_SEARCH_LIST is used to specify a list of trace components that you want taken into account in the automatic trace search.

As a value for this parameter, you can enter a list with the following elements (use a comma or a semicolon to separate elements):

  • ALL: all trace files are searched (default)
  • WP: all work process trace files are searched
  • DISP: the dispatcher trace file is searched
  • GWRD: the gateway trace file is searched
  • ICMAN: the ICM trace file is searched (if available)
  • MS: the message server trace file is searched (if available)

rdisp/TRACE_SEARCH_LIST = WP, ICMAN means that all work process trace files and the ICM trace file are searched.


Search Trace Files for a Pattern

The parameter rdisp/TRACE_PATTERN_<x> is used to search the trace files for a specific pattern. When the specified file size if exceeded, the file is then searched for this pattern. If the pattern is found, the trace level is reset to 1 for all active components.

You can also use wildcards (* for any character string, ? for a single character) in the pattern. Use a backslash (\) to ensure that special characters are treated as ordinary characters. See below for examples.

For the sake of readability, the search patterns in the following examples are enclosed in inverted commas. When specifying your own search terms in RZ11 or in the profiles, however, enter them without inverted commas.

  • The pattern "word1 * word?" is found in the line "one example with word1 and word2", but not in the line "one example with word1 and word".
  • The pattern "10 \* 10 =" is found in the line "multiplication: 10 * 10 = 100", but not in the line "addition: 10 + 10 = 20".

Displaying Developer Traces

You can display developer traces from within the SAP System and from the operating system level.


Within the SAP System:

  1. Choose Administration -> System management -> Monitor -> ServerAlternatively, enter transaction code SM51.
  2. Select the server whose developer traces you want to display. Then choose Goto -> Traces.
  3. The system presents the list of developer traces available at the server. (The names of the files are listed below.)

  4. Choose Attributes to display summary information on the trace, including the user who created it and the time stamp.

Choose Display to display its contents.

You can also display work process traces from the Process overview function (transaction SM50) in the same menu path.


From the operating system:

  1. Log on to the correct host system.
  2. You need to access the work directory of the SAP application server whose traces you wish to see. This directory is always local, located on the host on which an SAP application server is running. You'll therefore need to log on to the host system of the SAP application server.

  3. Change to the work directory of the SAP application server.
  4. Typical menu path (UNIX; other systems similar): /usr/sap/<SYSTEM ID>/<INSTANCE>/work

    or /usr/sap/CLP/D01/work

  5. Display the list of files in the directory. (The names of the files are listed below.) Use a host system command like more to display the files.

Always display trace files from within the SAP System if you can. The files are presented in the SAP System in an easier-to-read format than they are at the operating system level.


Core files, profile and start traces: Should one of the work processes of an application server terminate abnormally with core dump, you will also find the core files in the work directory.

Further, you can display the start-up and instance profiles used by an SAP application server along with the developer traces. Server start-ups are recorded in the sapstart<n>.trc files.

Activating / Deactivating Developer Traces from the System Profile & Command Line

Activating / Deactivating Developer Traces from the System Profile:

You can also set trace options instance-wide with the rdisp/TRACE=<n> option. The trace values are the same as those in the list above.

Setting the trace parameter in the instance profile of a particular server activates developer traces only in that server.

Setting the parameter in the default profile would activate traces in all servers (excepting those whose instance profiles specify a different parameter value).


Activating / Deactivating Developer Traces from the Command Line:

You can also turn tracing on, or set the various trace levels by entering the appropriate commands in the command line. This is possible in all SAP programs. Typically, you must add these options to the start commands for SAP processes in the start-up profile of an instance of your SAP System. 

The following criteria are available:

  • TRACE=0: No trace
  • TRACE=1: Write error messages in the trace file.
  • TRACE=2: Full trace. The trace entries that are actually written can vary with the SAP program that is being traced.
  • TRACE=3: Additionally, trace data blocks.

Turning Developer Traces On and Off

You can turn developer traces on and off and set the trace level dynamically from within the SAP System or with system profile parameters or command-line arguments.

Activating / Deactivating Developer Traces from within SAP System:

  1. Choose Administration -> System management -> Monitor -> System monitoring -> Process overviewAlternatively, enter transaction code SM50.
  2. Choose the work process in which you wish to increase the trace level. To trace all work processes of a server, use the system profile method shown below.
  3. Choose Process -> Trace -> Active components.
  4. The system presents a dialog screen that shows the current status of the developer trace.


Turn developer tracing on and off for different server components by selecting the appropriate checkboxes.

Set the degree of detail by entering a number in the Level field. Possible trace levels are as follows:

– 0: No trace.

– 1: Write error messages in the trace file.

– 2: Full trace. The trace entries that are actually written can vary with the SAP program that is being traced.

– 3: Additionally, trace data blocks.

Error and System Log Entries in Trace Files


Developer traces contain technical information for use in the event of problems with your System. Using the entries in the developer traces requires a sophisticated knowledge of the host systems in which your SAP System is running and of the SAP System itself.


The traces can be useful in diagnosing host system and SAP-internal problems that are affecting your SAP System.

Developer traces are written in files in the work directory of the SAP application server that generated the trace.


In the files, lines that contain error information begin with *** ERROR =>. Lines for which system log entries are written start with *** LOG <message ID>.

An "error line" contains the name of the calling function, the operation that failed, the error number from the host system (if a system call is involved), and the name of and line in the C module that failed.



File Names of SAP Developer Traces

Developer Trace File Names

Component

File Name

Dispatcher

dev_disp

Work Process

 

Task handler

dev_w<n> n is the range from 0 to one less the number of work processes.

Dynp (screen processor)

dev_dy<n>

Roll

dev_ro<n>

Paging

dev_pg<n>

DB interface

dev_db<n>

ABAP processor

dev_ab<n>

Enqueue (lock)

dev_eq<n>

Logging

dev_lg<n>

Spool

dev_w

Message server

dev_ms<n>

SAPGUI (presentation)

dev_st<logon name>

APPC-server (CPIC gateway)

dev_appc

RFC (Remote Function Call) facility

dev_rfc, dev_rfc<n>

dev_rfc traces RFC calls to external functions (written in C or Visual Basic).

dev_rfc<n> traces RFC calls that are executed in R/3 work processes. <n> is the number of the work process in the server (as shown above). A work process uses the same log file across RFC calls.

Gateway

dev_rd

R3trans and tp transport programs

dev_tp

Monitoring infrastructure (test mode only)

dev_moni

In normal operation, you will not see this file. It is used only by test tools of the monitoring infrastructure. It therefore appears only if the test tools must be activated during a support session.

 

SAP BASIS Material from Help Portal

1) Basis (BC) 
2) Basis
3) Batch Management (LO-BM)
4) BC - ABAP Dictionary
5) BC ABAP Workbench Tools 
6) BC ABAP Workbench Tutorial
7) ABAP Programming (BC-ABA)
8) BC Basis Programming Interfaces 
9) BC - Business Workplace 
10) BC - Central Maintenance and Transport Objects 
11) BC Data Modeler 
12) BC Documentation of System Objects
13) BC Extended Applications Function Library
14) BC - Namespaces and Naming Conventions (BC-CTS-NAM) 
15) BC R/3 Database Guide:DB2/400 
16) BC R/3 Database Guide: DB2 Universal Database for UNIX & Windows 
17) BC R/3 Database Guide: Informix 
18) BC SAPconnect
19) BC SAP Graphics: Programming Interfaces
20) BC SAP Graphics: User's Guide 
21) BC - SAP Printing Guide 
22) BC SAPscript Raw Data Interface
23) BC SAPscript: Printing with Forms
24) BC - SAP Style Guide
25) BC Style and Form Maintenance 
26) BC System Services 
27) BC The SAP Communications Server
28) BC - Word-Processing in the SAPscript Editor 
29) Desktop Office Integration (BC-CI)
30) SQL Studio (BC) 
31) Reference Manual 7.2 (BC)
32) Messages 6.2 (BC) 
33) Messages 7.2 (BC) 
34) Network Integration Guide (BC-NET) 
35) Updates in the R/3 System (BC-CST-UP) 
36) Users and Roles (BC-CCM-USR) 
37) The SAP Lock Concept (BC-CST-EQ) 
38) The Test Workbench in the SAP System (BC-CAT-PLN) 
39) The Appointment Calendar (BC-SRV-GBT)
40) The BAPI Gateway Component (BC-FES-AIT) 
41) Terminology and Glossary in SAPterm (BC-DOC-TER) 
42) Business Configuration Sets (BC-CUS)
43) Business Document Service (BC-SRV-BDS) 
44) Central Adress Management (BC-SRV-ADR) 
45) Change and Transport System - Overview (BC-CST) 
46) Changing the SAP Standard (BC) 
47) Computing Center Management System (BC-CCM) 
48) Controls Tutorial (BC-CI)
49) Repository Service Component (BC-FES-AIT) 
50) Generic Object Service (BC-SRV-GBT) 
51) Hypertext Structure Maintenance (BC-DOC-DTL) 
52) Generic Business Tools for Application Developers (BC-SRV-GBT)

Thursday, June 14, 2012

Knowledge Management - Introduction

With the Knowledge Management functional unit, SAP NetWeaver provides a central, role-specific point of entry to unstructured information from various data sources. This unstructured information can exist in different formats such as text documents, presentations, or HTML files. Workers in an organization can access information from different source such as file servers, their intranet, or the World Wide Web. A generic framework integrates these data sources and provides access to the information contained in them through the portal.


The Knowledge Management functional unit supports you in structuring information and making it available to the correct target audience. You can use the different functions on all content of integrated data sources, as long as the technical conditions are met.


  • Knowledge Management is a part of SAP NetWeaver Enterprise Portal.
  • The entire functional scope and configuration of the Knowledge Management capabilities are available in portal iViews.
  • To run Knowledge Management, you also require the standalone engine Search and Classification (TREX).


Knowledge Management comprises the following functions:

Function

Description

Integrating Repositories

Unstructured information is stored in various types of repository such as file servers or document management systems. You can use preconfigured repository managers to integrate repositories and make their content accessible through a central entry point in the portal. Open programming interfaces (APIs) allow customers and partners to develop repository managers for other storage systems.

You can also store documents in one of KM's own repositories.

Navigating in Folders

Portal users can navigate in the folders of all integrated repositories and access the documents they contain. Access to folders and documents is controlled using permissions.

The user interface for navigating in folders can be configured flexibly and modified to suit various roles. Portal users can personalize the presentation of the user interface. Open interfaces allow you to extend the user interface by integrating your own functions into the standard system.

Search

The search function finds documents in all integrated repositories. The system displays only documents for which the current user has read permission in the results list.

You can also include the content of Web sites in your indexes using Web crawlers. This information is then also available through the search function in your portal.

Taxonomies and classification

A taxonomy is a hierarchical structure of categories in which you classify documents according to content, organizational, or other criteria. Documents that are stored in different repositories can be included in the same category. Taxonomies portal users to navigate in a uniform structure throughout an organization even if information is stored in heterogeneous storage locations.

After the initial configuration has taken place, the system automatically classifies new and changed documents.

Knowledge Management services

Knowledge Management services enable functions that you can use on the content of all connected repositories as long as technical conditions are met. These services include subscriptions, ratings, public reviews, feedback, and personal notes.

You can also import documents into KM repositories from external sources by using the content exchange service.

Document creation and publishing

Every portal user can create information in the portal, provided he or she has the necessary permissions.

You can upload documents that you created using a PC application directly to a KM folder. You can also use forms to create information directly in the Web browser.

The publishing process is supported by various functions such as the approval workflow.

You can assign metadata to documents and other objects to make the knowledge available in your company more usable.

Web Page Composer - Introduction

Web Page Composer is a tool for business users that facilitates the creation and management of portal pages that can combine business applications with user-generated Web content and static content. In this way, major content creation activities can be performed directly by business users, enabling IT personnel to focus on core tasks and innovation.


Web Page Composer provides an intuitive work environment that is fully based on standard portal capabilities. Applications and content can be integrated from SAP and non-SAP sources. Portal pages can be enriched with applications and user-generated, unstructured content such as articles, news, documents, and banners.


  1. Administrators perform configuration tasks to set up and maintain Web Page Composer.

    .

  2. Business users work in the Web Page Composer staging area to create and maintain areas and pages as well as the Web content that they can contain.


  3. Developers can extend Web Page Composer capabilities. For example, you can enable connecting between content items in a page ("mashups"), extend the standard notification mechanism, or implement a custom content provider.