Dissecting SAP DIAG Protocol – Support Bits

The first time when user activates one of the systems list in the sapgui client, the application will first send its UI capabilities in the form of support bits to the SAP system server.

But there are surprisingly very little information about the description of support bits. As of March 2011, googling “support bit” SAP keyword will yield only about 6000 results, with most of it only related to OSS Notes and trace results, which does not explicitly explains each support bit’s items.

The first level of information itself can be obtained by activating trace option in saplogon.exe, that is documented in SAP help center. At trace level 3, the support bit description is generated in sapguidll_*.trc file. Below is the partial list of support bit info in the trace file :

DIAG_SUPPORT_BITS send to _tsystem:
SUPPORT-BIT PROGRESS_INDICATOR(0) is ON
SUPPORT-BIT SAPGUI_LABELS(1) is ON

But the level of information stops here, because there are no further information that can be gleaned from, say the PROGRESS_INDICATOR support bit.

So, one of the method that I will use in documenting the support bit is by locating its structures, where it is initialized, and how the client and server used it in their functional routines.

In the SapGUI client, the support bit structure is initialized at the constructor of CSapguiSupportBits class. For example, in one of the SapGUI version, the support bit structure is as follow :

ff 7f fa 0d 78 b7 37 de-f6 19 6e 93 24 bf 05 83

The first byte, 0xFF which translates to 1111 1111 in binary value means that the support bit at index 0 to 7 is supported, and this is verified in the trace log data :

DIAG_SUPPORT_BITS send to system:
SUPPORT-BIT PROGRESS_INDICATOR(0) is ON —> 0xFF
SUPPORT-BIT SAPGUI_LABELS(1) is ON
SUPPORT-BIT SAPGUI_DIAGVERSION(2) is ON
SUPPORT-BIT SAPGUI_SELECT_RECT(3) is ON
SUPPORT-BIT SAPGUI_SYMBOL_RIGHT(4) is ON
SUPPORT-BIT SAPGUI_FONT_METRIC(5) is ON
SUPPORT-BIT SAPGUI_COMPR_ENHANCED(6) is ON
SUPPORT-BIT SAPGUI_IMODE(7) is ON

The second byte 0x7F :

SUPPORT-BIT SAPGUI_LONG_MESSAGE(8) is ON —> 0x7F
SUPPORT-BIT SAPGUI_TABLE(9) is ON
SUPPORT-BIT SAPGUI_FOCUS_1(10) is ON
SUPPORT-BIT SAPGUI_PUSHBUTTON_1(11) is ON
SUPPORT-BIT UPPERCASE(12) is ON
SUPPORT-BIT SAPGUI_TABPROPERTY(13) is ON
SUPPORT-BIT INPUT_UPPERCASE(14) is ON
SUPPORT-BIT RFC_DIALOG(15) is OFF

On the R/3 System Server (i.e. disp+work.exe), this support bit is checked via DiagIsSupported function before any client specific action is taken. This function accepts the support bit index in one of its parameter, and returns whether it is supported (0x1) or none (0x0). For example, before the routine _multi_login_allowed is executed, it checks the client support bit MULTI_LOGIN_USER at index 0x33 (51 dec) :

push 033
call 0052F365 {_DiagIsSupported} {_DiagIsSupported}

The support bits is thus can be viewed as “Contract Agreement” or communication language between the server and the client about certain feature or actions in the communication session between client and the server.

This concept in the protocol makes it possible to develops any application in the client side that’s independent on the platforms or OS of the client.

It is also up to the client to implement or interpret any of the support bit that is suitable for its requirement. The PROGRESS_INDICATOR can be used to apply actions ranging from showing sophisticated progress bar UI in Windows OS or some other UI in Android devices 🙂

Advertisements

2 Responses to “Dissecting SAP DIAG Protocol – Support Bits”

  1. Dror Says:

    Great post!

    Is it possible to deactivate a support bit programmatically? Is there some kind of a kernel call in ABAP to disable some of the GUI capabilities?

    Thanks,
    Dror

  2. ekasiswanto Says:

    As far as I know, the support bit can be viewed as the feature/capabilities of the client, and the server action is to record this information to be used later on each subsequent communications.

    If you want to disable some feature, in my opinion, you have to do this in client side. This will make the server to understand that certain capabilities is not provided.

    On server side, there is no reason to disable certain bits of the stored capabilities, because it will have no effect to the client.

    The role of the server is to checks whether certain support information is available before taking some actions that will potentially futile 🙂

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: