on 10-02-2013 5:47 PM
Hi all,
apparently, this sounds like an easy question... however, I'm stuck at this.
Suppose to work on a Custom Web Dynpro, in which there's a simple table which shows on each row a couple:
- fixed text (Text View element);
- a dropdown field.
So... suppose we've to render this situation:
Row 1 ---> FixedText1 --> available choices: A, B
Row 2 ---> FixedText2 --> available choices: C, D
There's a binding between the table and the context, so avaiable values (A,B) and (C,D) are stored in the same context element that represents a row.
I tried using a DropDownByKey and I'd like to BIND the VALUE_SET in order to use a specific Context Path.
However, as far as I've seen, the only way to set the value_set is from NODE_INFO element; that is to say, same values in every dropdown of the given column.
Any advice? How can I have different dropdown on the same column?
Hi,
Instead of Dropdown by key, you can try dropdown by index.
And the node which will be binded to the dropdown should have a supply function.
Your supply function will get called for each row and you will be able to set dynamically different values for dropdown in each row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hitesh,
this sounds interesting... I used to manage DropdownByKey as they seems more simple to manage so I don't know much about DDByIndex.
However, your solution seems actually to be the simplest one; do you have any sketch of code/example showing:
- how to bind the node to the dropdown ? (easy, this should be similar to the way a DDByKey is binded to the node)
- how to wrote supply function so that the VALUE_SET is dynamically calculated for each row?
Thanks again!
Check this example: ABAP Web dynpro dropdown by index.
To replicate it in the table, you have to the same for each element, while loading/adding to the node.
Regards,
Sharath
Hi,
Please refer this Document.
If you get stuck somewhere let me know.
In Web Dynpro Java, the runtime/dynamic value assignment to the element->variable is accomplished using Extended Value Selector.
However, in WD ABAP that option is not available.
Check the tread and also the sap help link. It may be useful in your solution.
SVS, EVS, and OVS, Value Help and Search Help | SCN
Input Help - Developing Web Dynpro ABAP Applications - SAP Library
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
You can use table cell variants to create multiple Dropdown elements-- say Dropdown_1 with values (A,B) and Dropdown_2 with values (C,D)-- then display just one of the Dropdowns depending on the value of FixedText for the row. The document below should give you an idea of how this can work.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amy and thanks for your help,
I've seen your tutorial, my scenario is however a bit different because I have to handle various rows in my table ( I don't know table's cardinality in terms of rows - and different dropdowns - if not at runtime ).
So, I can't work on cell variants statically as you did in your tutorial; I should proceed with dynamic programming and handle even cell variant creation at runtime.
This could be a feasible solution, even if it seems quite complex.... Suppose my table will be populated at runtime with 100 rows. As I told before, each row has an attribute of type WDR_ELEMENT_SET which contains the available entries for the dropdown.
I should at runtime create 100 different cellvariants...
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.