cancel
Showing results for 
Search instead for 
Did you mean: 

Personas: Setting selection for a dynamic dropdown list failed, why?

Former Member
0 Kudos

Hi Guys,

In my Personas app, I want to make a selection using script by filling a field of a "SAP built-in" dropdown list with a value (VM) that is included in the list. I used IW38. This dropdown list is shown only when first pressing the "Select All" icon on the top of the screen, and normally user would need to make selection by clicking an item in the dropdown list. Here I want to let the script do the selection.

The id of this "dynamic" field is:

ses[0]/wnd[0]/usrUSRAREA/frameB007017_BLOCK_1000/cmbDY_PARVW

The problem is: when I use "Set selection" for the dropdown list in script, it pops out error:

Step of the executed script failed!

Reason: failed to fire action

However, when I made one my own dropdown list control, I was able to make selection of one of the item in the list by scripting.

It looks like somehow there might be some special property of this "SAP built-in" dropdown list that blocks the setting selection.

Does anyone have the same problem and know a solution?

Thanks a lot!

Dong Zhu

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I'd just try to enter the actual field value into that dropdown selection... like BU for the Buyer partner function, or in your case, VM.

Does that work?

Former Member
0 Kudos

Hi Tamas,

Thanks for quick reply. I'v tried that way, but got error: "failed to set value".

I compared the propperties of this dropdown list and my own dropdown list, there are some fields different, eg, "IsFrontEnd" field, one is True and the orther is False, but the fields are dimmed - offer no way to make manual change.

The built-in list seems meant to pick up a vlaue by click the prefilled list - this might be why setting a value manually is not working, but I am not sure. Still need to find out.Thx.

Br,

Dong

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Strange... using the Enter Value script command with the actual key (for instance BU) works fine for me... just tried it in the same transaction, with the same field:

Former Member
0 Kudos

Hi Tamas,

There is a difference between the GUIs in your case and my case. I can see in your pic that the Partner field is shown right after your tcode. I also test IW64 after which the Partner field is directly shown on UI - and in such case I can use script to make a selection.

But in my original case, it includes the following UIs. After IW38, I got the upper pic where no Partner field is shown. I then need to press the third icon from left on top bar (see pic), then new fields are added on the same UI, see the lower pic where the Partner field is shown. I don't find this icon in your pic.

It is this dynamically displayed Partner field that running script to set a selection value, eg, VM, always pops out the error message. I compared the properties of the two types of the dropdown list controls - but finding no difference.

Why does the setting value fail for such a dynamic dropdown list?

Thanks.

Br,


Dong

Figure 1: UI after running iw38.

Figure 2: After press the marked icon in Figure 1, the UI shows new fields as marked.

Former Member
0 Kudos

"Set selection" is not applicable for dropdown list. To make a selection, just "Enter Value" of the Key value of the list item. Eg, IW38 >Shift+F7>Enter Value: VW. It works now.

Set to answered.

Dong

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

That's exactly what I have suggested in my previous reply

Answers (0)