What is this about:

In this Document I would like to explain how we can set dropdown values depend on user entered value(dropdown).

What I have done:

I created simple webdynpro view with table of 2 fields country and languages.  I set Country filed as DropDownByKey and language field as DropDownByIndex. To know the difference between this two types go through  http://help.sap.com/saphelp_nw04s/helpdata/en/bb/69b441b0133531e10000000a155106/content.htm.

So languages available depends on country selected .

I created table node and bind it to table value.In table node I created another node which has attribute ‘LAN’ which holds the language as shown below.

c4.PNG

c3.PNG

c1.PNG

c2.PNG

I added button Add to add row (Editable) to table

For country I created data element  with domain YSR_COUN with fixed values.

c5.PNG

I assigned ON_COUN action to event onSelect  of country.

c6.PNG

onSelect event has following Event parameters

c7.PNG

Code:

c8.PNG

Get the context element where country selected

c9.PNG

Get the selected Country value from above context element

c10.PNG

Get the language node from context element.

c11.PNG

Set Languages depends on selected country

For India

c17.PNG

For Canada

c13.PNG

For America

c14.PNG

Bind This values to Language Node

c15.PNG

We can see Languages depend on selected country

c16.PNG

Untitled.png

Untitled.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply