Highlighted
Frequent Contributor.
Frequent Contributor.
762 views

LOADRUNNER : SAP : cannot select spreadsheet

Hello,

I have recorded a script in SAP.

The screen open a sub screen with a spreadsheet. Whenever I select something in this spreadsheet, there is an error in the replay. It seems the replay can't select the spreedsheet.

Here is the error message :

Action.c(80): Warning: Failed to find SapGui component by ID "usr/cntlCTN/shellcont/shell"
Action.c(80): Error: Grid - Failed to select the cell in column ""

And the line in action :

    sapgui_grid_select_cell_column("'Basic data', 'traceability'", 
        "usr/cntlCTN/shellcont/shell", 
        "ZZTRACABILITE", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui1025", 
        END_OPTIONAL);

Thank you

 

0 Likes
9 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

Try using sapgui_set focus function and put focus on the grid cell to capture.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

So I tried to put :

sapgui_set_focus(shell4);

where shell4 is what is recorded in lr_strings.h  :

const char* shell4=
        "usr/cntlCTN/shellcont/shell";

But it failed too :

Action.c(76): Warning: Failed to find SapGui component by ID "usr/cntlCTN/shellcont/shell"

Do you think the definition of shell4 is correct ?

 

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

which tcode are you trying to test? 

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

This one :

 76   sapgui_set_focus(shell4); 
         
  78  sapgui_grid_select_cell_column("'Basic data', 'traceability'", 
        shell4, 
        "ZZTRACABILITE", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui3025", 
        END_OPTIONAL);

Previously it failed at line 78, so I added lined 76 where it failed with the same error.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

SAPGui protocol provides active screen snapshots.

Compare the ID of the objects between recording and replay and try to see if you can introduce a logic to get the ID dynamically.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

Here is what I see just before the error : Snapshot.GIFwhen I drag the mouse on the different part, I get the ID, but for the spreedsheet (under basic data), there is nothing (same thing on the replay snapshot).

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

Compare the Record and Reply, right click on Snapshot and try to get the object ID for the excel /grid. Check if that changes. Sometime object id might change, if it does you might have to right the condition.

Can you provide which T-code are you using. I can try on my machine on check if that works for me. I work on SAP GUI protocol for load testing.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

When I right click on the spreadsheet in the recorded or replay snapshot, there is nothing.

I have attached the tcode.

 

 

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: LOADRUNNER : SAP : cannot select spreadsheet

Tcode in zip

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.