on 04-14-2011 2:58 PM
Hi All,
We're using ECC6 701.
I have a table where one column contains drop down lists. The trouble is that each drop down should have a different subset of the data. So my question is how can I revise the subset of data based on the row it's on.
As it stands at the moment I have that column bound to another node in my context which is filled at run time. This node contains all possible values for the drop down column but depending on the row the drop down is on, it should only contain a subset of this data. Is this even possible? If so, how?
Many thanks in advance,
Liz.
It is totally possible using value sets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Srinivas,
Each column has it's own values but these values are repeated on the rows. In other words, the column A in row 1, has the same values as column A in row 2.
Here is the code I used to achieve my goal:
data: lt_value_set type table of wdr_context_attr_value,
ls_value_set type wdr_context_attr_value.
data: lo_nd_reason_code type ref to if_wd_context_node,
lo_nodeinfo type ref to if_wd_context_node_info.
refresh lt_value_set.
clear ls_value_set.
append ls_value_set to lt_value_set.
loop at lt_zsd_reason_codes into wa_reason_code
where org_unit = wa_field_cat-org_unit
and field_no = wa_field_cat-field_no.
ls_value_set-value = wa_reason_code-reason_code.
concatenate wa_reason_code-reason_code wa_reason_code-long_desc into
ls_value_set-text separated by space.
append ls_value_set to lt_value_set.
clear ls_value_set.
endloop.
lo_nodeinfo->set_attribute_value_set( name = 'SUPPLY_CHAIN_CODE'
value_set = lt_value_set ).
'SUPPLY_CHAIN_CODE' is the name of the context element on the view, with the attribute selected_key bound to it.
Hope it helps,
Liz.
Hi Liz,
I am using ddbk in table, but displaying without dropdown i mean just no edit mode table.
here the code.. where is the problem pelase suggest
data: lt_value_set type table of wdr_context_attr_value,
ls_value_set type wdr_context_attr_value.
data: node type ref to if_wd_context_node,
node_info type ref to if_wd_context_node_info.
data : it_objid type STANDARD TABLE OF if_main=>element_portal,
wa_objid like line of it_objid.
SELECT OBJID FROM HRP5007
INTO TABLE it_objid
WHERE "PLVAR = '01' and
ENDDA = '99991231' and
TFORM = '0017'.
loop at it_objid into wa_objid.
ls_value_set-value = wa_objid.
append ls_value_set to lt_value_set.
endloop.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( 'PORTAL2' ).
node_info->set_attribute_value_set( name = 'DEALER_CODE'
value_set = lt_value_set ).
Thanks,
Venkat.
HI Liz,
You can use the event on_lead_select ie when you change the select in a table that event will be called and you can fill the dropdown as per your requirement.
Regards
Kuldeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The way you described, supply function seems appropriate.
Create a node(DDBK) inside the (table) node which you binded for table UI.
Write a supply function for the DDBK node.
Bind this node (attribute ) to the dropdown.
When the Table is rendered, supply function would called for every table. You can control the table row data and based on that fill the ddbk node.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
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.