User-dependent GuiXT Scripts
In a script, you can use if Q[user=...] to query the current SAP username and, for example, display a pushbutton only for specific users. A more flexible approach is to query SAP user roles using if Q[Role=...]. This avoids hardcoding individual usernames and allows you to control user groups based on roles.

User Catalog: Targeted Interface Control
If the differences in the interface go beyond minor variations, it is recommended to use the central user catalog provided by GuiXT. With the user catalog, you define user groups based on various criteria and assign specific script directories to each group. This eliminates the need for queries within the script itself.

Structure of the User Catalog

Create a text file, e.g., usercatalog.txt, in which user groups and their assigned script directories are defined. Example:

M1        SAPMR:SAP/BC/BSP/SAP/GUIXT/General      SAPMR:SAP/BC/BSP/SAP/GUIXT/M1 
M2        SAPMR:SAP/BC/BSP/SAP/GUIXT/General      SAPMR:SAP/BC/BSP/SAP/GUIXT/M2 
MX        SAPMR:SAP/BC/BSP/SAP/GUIXT/General 
TEST      SAPMR:SAP/BC/BSP/SAP/GUIXT/Test
XX        none 


000/Adam         M1
000/Rinaldini    M2
000/Zwitschke    M1
000/*            MX        // Other users in client 000

100/Anton        M1
100/Bertini      M1
100/Cemicz       M2
100/Schmitten    M1
100/Muellermann  M2
100/Warwig       TEST 

*                XX        // Other users, all clients

 

User groups can be defined using the following criteria:

  • Client and username: 100/Anton

  • User role: Role=SD_FACTORY_SALES

  • User profile: PROFILE=Q_ALL

  • Reference user: Refuser=DISPLAY01

  • User parameter: Parameter.ZZGXT=SALES

Example: 

Role=SD_FACTORY_SALES    M1
Role=SAP_FI*             M2

PROFILE=Q_ALL            MX

Refuser=DISPLAY01            M2

Parameter.ZZGXT=SALES    M1
Parameter.ZZGXT=FIN      M2

Assignment is sequential: As soon as a criterion matches, the user is assigned to the corresponding group. Remaining entries are ignored.

Formatting Rules:

  • Comments begin with //

  • Blank lines are ignored

  • Script directories containing spaces must be enclosed in "..."

  • Up to four script directories per group are allowed

  • In addition to script directories, you can set the parameters vbDirectory=, jsLibrary=, and vbsLibrary= (same meaning as in guixt.ini). Example:
    M1        \\P5008\GuiXT\General  vbDirectory="\\P5008\GuiXT\M1\VB files"

  • In the second part of the user catalog, each client/username is assigned exactly one user group. At the end of each client section, you can use the client/* entry to assign remaining users. A cross-client * entry is also possible and applies to all users.

  • Alphabetical sorting of users or groups is not required but can improve clarity.

  • The entry none disables GuiXT completely for the respective group—even directly specified script directories will not be active.

 

Specifying the User Catalog in the GuiXT Profile

For centralized administration, a central guixt.ini file is recommended, e.g., in the SAP MIME Repository.

  • On local PCs, a uniform guixt.ini file is located in the SAP GUI directory, e.g.:
    IgnoreRegistry Yes
    RfcUser xxxxx
    RfcPAsswwordEnc xxxxxxxxxxxxx
    RfcCurrentclient Yes
    SwitchTo SAPMR:SAP/BC/BSP/SAP/GUIXT/GUIXT.INI

  • The central GUIXT.INI file contains the GuiXT options and refers to the user catalog:

    IgnoreRegistry     Yes
    StartHidden        Yes
    Component          GuiXT
    Component          InputAssistant
    Component          Controls
    Key                mycompany.P60.ibfqwexljnlt
    Key                mycompany.Q60.kmrqodxljnlt
    Licensefile        SAPMR:SAP/BC/BSP/SAP/GUIXT/guixtlicensefile.txt
    UserCatalog        SAPMR:SAP/BC/BSP/SAP/GUIXT/UserCatalog.txt