Correlation of Session Number to DIAG Stream in SAP

In SAP there’s a concept called the session number, which controls how many session a user can open and connect to SAP system in one terminal/computer.

User can view the current session number inside the status bar of the typical sap screen on bottom right corner of the screen such as below :

Internally, SAP maintains the session number in its first byte of SAP DIAG stream data and parsed as the OVERHEAD structure. This structure has the size of 8 bytes, and the field is called “mode” (Overhead->mode).

This structure can be shown up using SAP GUI’s tracing function by setting some of the properties related to DIAG communication trace properties (Diag parser, Diag prior parsing, Diag to Server) as follow :

After enabling the trace and performing some round trip transaction the trace results can be easily viewed by clicking the “View Trace” and here is some instances that shows trace detail information of overhead structure :

Although it hasn’t been yet verified, by controlling this number in the DIAG stream, it is possible to open many sessions that exceeds maximum session imposed by the rdisp/max_alt_modes parameter. This is done by internally sets the mode fields to the same number for each session so it never reach the maximum value of the parameter 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: