on 02-24-2009 4:10 AM
I have enabled filterline in my ALV table. There is one Dropdown by key field, for e.g., 'PRIORITY' in this ALV table, contained in its underlying context, for which the filter value list has to be modified manually. How do I do this ? As the filter value list is automatically taken from the domain of the underlying field ! I need to insert 2 extra values in this filter value list.
Hi,
Iam not sure if I got your question right. Do you want to modify the valuehelp list of the dropdown within the ALV? In that case what you could do is the following: use the Function module DDIF_FIELDINFO_GET(Pass the domain name as parameter) and get the domain values in an internal table(key/value pair). Append the 2 new entries that you want to add to the list. Now bind the internal table back to the node_info(metadata) of the context attribute. The new values will be reflected in the dropdownlist.
Best Regards,
Viqar Ali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Viqar,
Thanks for the reply. Actually I am referring to the valuehelp list of the dropdown in the filterline of the ALV table and not the dropdown of the field within the ALV table itself.
The valuehelp list of the dropdown in the filterline automatically takes the same values from the domain which is specified for its corresponding field within the ALV table itself. But I want to insert some extra values in the valuehelp list of the filterline dropdown, without modifying the value help list of its corresponding field within the ALV table.
Regards
Sukanya
Edited by: Sukanya Mayuri Gogoi on Feb 24, 2009 7:49 AM
Hi Sukanya,
If value list is NOT going to change frequently you can, use supply function to give values to Attribute thats bound to DDK on the ALV filter.
method fill_node.
data:
itab type if_componentcontroller=>elements_uln_func,
stru like line of itab_uln_func.
stru-key = 'B'.
stru-value = '>'.
append stru to itab.
stru-key = 'L'.
stru-value = '<'.
append stru to itab.
stru-key = 'E'.
stru-value = '='.
append stru to itab.
* bind all the elements
node->bind_table(
new_items = itab
set_initial_elements = abap_true ).
endmethod.
To take care of frequent modification in the value list you can also read the DOMAIN values using DDIF_DOMA_GET , append them to iTab above then add your custom values below then in same manner as illustrated above.
Greetings
Prashant
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
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.