cancel
Showing results for 
Search instead for 
Did you mean: 

filtering in ALV

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks. I did a workaround to achieve this.