cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down List values to be differ Web Dynpro table field

Former Member
0 Kudos

Hi,

I have place a table on the view. It has three fields F1, F2 & F3. All the three are drop down by Key fields. I need Drop down values for the field F2 to be changed based on the field F1 input.

Suppose,on first row, If I select 'L' from the dropdown of field F1, I need drop down values for field F2 to be 'X, Y, Z'.

If I select 'M', then F2 drop down values should be 'A B C'. for that perticular row.

for the remaining rows Drop down values for the field F2 should have X,Y,Z,A,B,C.

Thanks & regards

Warun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Dropdownbykey might now work in your case as using this you only can maintain common value set for a field and is same for all rows. You can try the approach with DROPDOWNBYINDEX which you can maintain value set for each row of the table seperately.

Regarding how to use DROPDOWNBYINDEX in a table, you can refer to example WDR_TEST_TABLE->view TABLE_CELL_EDITORS(check how context binding is done for the fifth field of the table in the view which is dropdownbyindex)

Similarly as shown in the above example, have supply function for context node(which have value set of dropdown), and write the code as shown below.

1. Using parameter PARENT_ELEMENT, check all the other attributes of this row(in your case what is the previous field F1 value) and according bind the possible values for required fields( in your case field f2).

2. Call this supply function to refresh the values everytime ONSELECT event of dropdown.

Regards,

Manne.

Former Member
0 Kudos

Hi Warun,

as already mentioned by Raja you need to use DropDownByIndex! See also this [Thread|;. I also have asked this question quite recently.

The node for the DropDown should look like this:

-node data (0:N)
---node column 1 (0:N)
-----attribute_key
-----attribute_value
---node column 2 (0:N)
-----attribute_key
-----attribute_value
---node column 3 (0:N)
-----attribute_key
-----attribute_value

The selection of the current DropDown value will be done via the lead selection (and not via a key like in DropDownByKey)! For each change of a value you have to have a event-handler to fill the DropDowns of the next columns of the same row!

Regards,

Stefan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Warun,

Create an action for the dropdown for onselect. in the onselectaction get the value selected by the user in the drop down and based on the value populate the next drop down.

Thanks,

Former Member
0 Kudos

Hi,

folow the below way,

1. craete a context for the f1

2.create context for the field f2 then f3

bind them with respective dropdown UI elements

remeber you need to create 3 different contexts for the three drop down.

3. for f1 context create a supply function in that write the code for getting the values X,Y,Z

4. now onselect event of the dropdown for f1 write the code for getting f2 and f3 dropdown values

this can be achived by binding the internal(which contains the A,B,C for dropDown Values) table to f2 f3

Thanks,

Shaik Shadulla.