Re: SAPGui combobox selection fails (518 Views)
Reply
Occasional Contributor
alesp
Posts: 7
Registered: ‎03-29-2013
Message 1 of 5 (558 Views)
Accepted Solution

SAPGui combobox selection fails

Hello,

 

I cannot get combo box value setting to work. I recorded simple SAPGui 7.30 in which I try to set time filter for displaying IDocs (we02), changing criteria Created At opens a dialog with 3 combos, but replay fails

 

    sapgui_select_combobox_entry("14", 
        cmbSHL3_TIME10, 
        "14", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui7014", 
        END_OPTIONAL);

 

Action.c(49): Warning: Could not find combobox entry by value "14"
Action.c(49): Error: Failed to select combobox entry "14"
Action.c(49): Error: Failed to find SapGui component by ID "sbar"
Action.c(49): Error: Failed to get the status bar text

 

lr_strings.h:

const char* cmbSHL3_TIME10  "usr/cmbSHL3_TIME-SHOUR";

 

 

Thank you for any advice in advance.

HP Expert
h2o_2
Posts: 13
Registered: ‎05-02-2011
Message 2 of 5 (535 Views)

Re: SAPGui combobox selection fails

Hi Alesp,

 

The error message indicates that during the replay such entry doesn't exist.

 

The easiest way I can think  of troubleshooting the problem is as follow:

1. Put the cursor on the step

2. Replay the script using the "Record at the cursor" option to insert additional steps

3. On the point you start recording, select the option in the combobox

4. Stop the recording

5. Compare and see the steps generated

 

I would suspect that either the business process is a bit different when you repeat the same value or when you use different values and  a logic should be added in the script level to address all scenarios.

 

Thanks

Occasional Contributor
alesp
Posts: 7
Registered: ‎03-29-2013
Message 3 of 5 (530 Views)

Re: SAPGui combobox selection fails

[ Edited ]

Hi,

 

thank you for response. I tried what you suggested, but I was not successful. It recorded similar sapgui call as before, which fails during reply.

 

    sapgui_select_combobox_entry("07", 
        cmbSHL3_TIME13, 
        "07", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui904", 
        END_OPTIONAL);

 

 

where cmbSHL3_TIME13 = "usr/cmbSHL3_TIME-SHOUR"

 

Action.c(58): Warning: Could not find combobox entry by value "07"
Action.c(58): Error: Failed to select combobox entry "07"
Action.c(58): Error: Failed to find SapGui component by ID "sbar"
Action.c(58): Error: Failed to get the status bar text

 

The dialog does not change, it is a standard time criteria dialog in SAPGui with 3 combox boxes used to specify HH:MM:SS, the combos are always populated with all possible values, and when the dialog opens, the values in those combos are preselected to match current time - and that is what I need to change.

 

Ales

HP Expert
h2o_2
Posts: 13
Registered: ‎05-02-2011
Message 4 of 5 (525 Views)

Re: SAPGui combobox selection fails

Hi Ales,

 

As you can see the value selected int he combobox changes each time.

 

I would suggest you try to see if there is a function that allows you to check the possible values in the combobox from the snapshot viewer

 

or

 

Select alternative way to perform the operation as the additionalInfo also changes.

 

Thanks,

 

Occasional Contributor
alesp
Posts: 7
Registered: ‎03-29-2013
Message 5 of 5 (518 Views)

Re: SAPGui combobox selection fails

[ Edited ]

Hi,

 

I haven't found alternate way to set the combo value but I have found the solution.

 

There is an advanced runtime option "Replay using running SAPlogon application". When not set, LR launches SAPlogon application. And then when the Choose time dialog is opened, combos are not filled with all values (yet, or in this mode LR blocks application's UI event message loop or whatever??) and therefore sapgui_select_combobox_entry fails.

However when set the runtime  option and I launch SAPlogon by myself, replay works just fine.

 

Thanks,

 

 Ales

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.