When running load tests it is recommended that you use a different SAP user for each virtual user. This can be managed by creating users with user names that have sequence numbers appended to them, for example SAPUSER1-SAPUSER99.
SapGuiLogon("SAPUSER" + string(GetUserId()), "PASSWORD", "000", "");
By default SapGuiLogon enters passed parameters to corresponding text fields on the logon screen and then presses the Enter key.
SapGuiSetOption(SAPGUI_OPT_LOGON_BEHAVIOR, nValue)
0 | Do not Handle Multi-Logon automatically
This means that the dialog will not handled automatically; it will be treated as a normal new window. You can then handle the window manually. |
1 | No multiple Logon
This means that the option Do not logon is selected. |
2 | Multiple Logon (default)
This means that the option Continue and do not cancel other logged on users is selected. |
3 | Logon-Kill other sessions
This means that the option Continue and cancel other logged on users is selected. |