New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Commodore Commodore
Commodore
1443 views

SAP GUI Connection Problem

Hi all!

I am just facing a problem with a SAP GUI script. I can see all server online and I can log in manually without any problem at any time. But the script sometimes fails in the BPM to reply and generate an error (95% OK, 5% NOK). The errors occurs always at the beginning when calling the function sapgui_open_connection_ex

This is an example of the output log:

Action.c(16): Error: Failed to open new connection to server "pw0.appld0"
Action.c(16): Error: Failed to get active window
Action.c(16): Error: Failed to find SapGui component by ID "sbar"
Action.c(16): Error: Failed to get the status bar text
Action.c(16): Error: Failed to get active window
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.

I am trying to catch this error to do a connection retry directly in the script. But in these cases the SAP-GUI client generate an abort that triggers vugen_end anyway.  Code Snippet:

	do
    {
	RC=sapgui_open_connection_ex(connection_string2, 
			"pw0.appld0", 
			"con[0]");
		i++;
		lr_output_message ("Counter %d", i);	
	}
	while ((RC!=LR_PASS)&&(i<=3));

Screenshot from Vugen attached (please notice, I put extra a wrong server for testing purposes). 

Thanks for any suggestion or help you can give!

 

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

Hi,

You should try to do a Wireshark capture and check failed connections on ports 3200-3299 and 3300-3399 to SAP server when it happens, the issue described is most probably a network issue.

 

 

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.