Highlighted
Absent Member.. Absent Member..
Absent Member..
2338 views

SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution

All, I am trying to record a simple login, logout script using SAP GUI on LR11. But script fails right on first step where it is trying to connect to SAP R/3 ABAP server.

 

here is the script:

 

    sapgui_open_connection_ex("/SAP_CODEPAGE=1200  /FULLMENU  localhost 00 /3 /UPDOWNLOAD_CP=2",
        "NSP local",
        "con[0]");

    sapgui_select_active_connection("con[0]");

    sapgui_select_active_session("ses[0]");

    sapgui_select_active_window("wnd[0]");

    sapgui_window_resize("159",
        "18",
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui104",
        END_OPTIONAL);

    /*Before running script, enter password in place of asterisks in logon function*/

    lr_think_time(12);

    sapgui_logon("SAP*",
        lr_decrypt("4e1323c3b3ee9ddfdd"),
        "001",
        "EN",
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui1012",
        END_OPTIONAL);

    sapgui_press_button("Log off   (Shift+F3)",
        btn1,
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui1013",
        END_OPTIONAL);

    sapgui_select_active_window("wnd[1]");

    sapgui_press_button("Yes",
        btnSPOP1,
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui1016",
        END_OPTIONAL);

 

here is the error:

 

vuser_init.c(12): Error: Failed to open new connection to server "NSP local"
vuser_init.c(12): Error: Failed to get active window
vuser_init.c(12): Error: Failed to find SapGui component by ID "sbar"
vuser_init.c(12): Error: Failed to get the status bar text
vuser_init.c(12): Error: Failed to get active window

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution
Spoiler
I fixed it.
Spoiler
Thank you.

View solution in original post

0 Likes
4 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution
Spoiler
I fixed it.
Spoiler
Thank you.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution

Did you installed the SAPClinet login in the Load generators.
If not first install the SAP in the Loadgeneratos

 

 

Satish

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution

HI VPathak,

 

Did u find the solution for your problem?? I am facing the same issue in my case and would need some pointers ,if you have any.

 

 

Thanks in advance,

Nitin

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: SAP GUI Scripting using LR 11 with saplogon 7.2

Jump to solution

I did solve this problem but a while ago. I think it was firewall that was blocking me from connecting.

I hope you enabled scripting on SAP server, installed client on vugen machine.

 

Also try with GUI 7.1.

 

If that doesnt work then make sure you have right patches download on client side. Meanwhile I will try to find the solution.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.