cancel
Showing results for 
Search instead for 
Did you mean: 

Auto populate drop down box when search help listed in table definition?

Former Member
0 Kudos

Hi All,

I'm trying to output a drop down box which contains a list of employee numbers. I thought that if the field (pa0001-pernr) had a check table or search help listed against it in the table definition then this drop down would be populated automatically?

This is not happening for me. Can anyone shed any light on this for me? What am I doing wrong?

Thanks in advance,

Liz.

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

Check whether you are using dropdownbyindex or dropdownbykey.

automatic population will happen for drop down by key only.

thanks

sarbjeet singh

Former Member
0 Kudos

Hi Sarbjeet,

Firstly many thanks for the response. I checked and it is drop down by key. This is the error I'm getting:

Adapter error in DROPDOWN_BY_KEY "DD_PERNR" of view "ZWDR_PAYSLIP.MAIN_VIEW": Context binding of property SELECTED_KEY cannot be resolved: Node MAIN_VIEW.1.PA0001 does not contain any elements

I have ensured that the selected key property is bound to the correct attribute (pa0001-pernr).

Any ideas what might be causing this error?

Thanks again,

Liz.

gill367
Active Contributor
0 Kudos

Hello

MAIN_VIEW.1.PA0001 this node is not contianing any elements.

atleast one element should be there for it to work.

so change the cardinality of the node to 1..1 or 1..n

or you can create the element, bind the table.

there should be elemets in the node.

thanks

Former Member
0 Kudos

Thanks again.. I've changed the cardinality to what you suggested and it is outputting now without error. The only issue I have now is that there are no values listed in the drop down!

I have checked the table and there should 3000+ values. Can you think of anything else I might be missing?

If you haven't already guessed, I'm new to web dynpro!

Thanks,

Liz.

Former Member
0 Kudos

Hi Liz,

If you bind dropdownbyindex, you wouldnt get this error. DropDownByKey is better to use for Domain values and ValueSet.

Former Member
0 Kudos

Hi Baskaran,

But if I bind dropdownbyindex does that not mean that my drop down wont be automatically popluated?

gill367
Active Contributor
0 Kudos

Are you sure that there is some search help linked to this tablefield PERNR in the dictionary table.

i checked and haven't founf anything.

thanks

sarbjeet

Former Member
0 Kudos

Well there's Pa0003 listed as the check table.. Does it have to be specifially a search help or is this not sufficient?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I really wouldn't recommend using a drop down for this anyway. 3000 entries is way too many for a drop down (both from a performance and usability standpoint). It seems like you should be using an inputField and letting the search help do its job.

The Drop Down also doesn't automatically build its value set from a check table. It can build from a domain value table or direct specification, but that is it. You would either have to build the value set manually (not advisible for this size of value set) or switch to the inputField/value help.

Former Member
0 Kudos

Hi Thomas,

Firstly thanks for the response. I was approaching this all wrong, I'm new to web dynpro. So just to be clear then you would advise outputting this field as a input and assign the search help then in the determined input help field?

So just for future reference, if there was a check table defined against a field, this would output the search help automatically?

Many thanks,

Liz.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

A value table in the domain will output via the search help. A check table won't. However it should be very easy to generate a data dictionary search help for a check table and attach that to the input field if there isn't already a search help defined.

gill367
Active Contributor
0 Kudos

HI

sorry for that, actually i was also not aware that it wont create the dropdown automatically.

now as cleared by thomas, dropdown will fill automatically if you have values at the domain level.

check table will provide the value help automatically i checked it

and if you want dropdown then you need ot fill the valueset of the attirbute.

which wont be a gud approach as you have 3000 entries.

thanks

sarbjeet singh

Former Member
0 Kudos

Thank you so much for all your help.

All the best,

Liz.

Answers (0)