cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ALV Dropdown List Filter Function

Former Member
0 Kudos

Hi ALL,

I have implemented my own Filter Function in the ALV Header. It is a dropdownlist.

Creating the object of a dropdownlist requires to provide the name of an attribute of the context node that is shown in the ALV table:

CREATE OBJECT lr_dropdown EXPORTING texts_elementname = 'TEST'.

As a consequence, the dropdownlist is filled with all values contained in this attribute - which is nice.

However, When I change these values in the ALV table, the drop down list is being changed to the same value the I have choosen in the ALV table, too (and thus, the table is filtered by the choosen value, since I have implemented the filter functionality)...

That is a problem. How can I avoid this?

THANKS, Johannes Schnatz

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Johannes,

I'm now trying to create a dropdown list in the ALV toolbar.

My codes are as following:

***********************************************************************************

DATA: lo_dropdown TYPE REF TO CL_SALV_WD_FE_DROPDOWN_BY_IDX,

lo_dropdown_func TYPE REF TO CL_SALV_WD_FUNCTION

lo_value TYPE REF TO CL_SALV_WD_CONFIG_TABLE.

lo_value = ir_interface_controller->get_model( ).

CREATE OBJECT lo_dropdown EXPORTING texts_elementname = 'CONTACT'.

lo_dropdown_func = lo_value->if_salv_wd_function_settings~create_function( id = 'DROPDOWN' ).

lo_dropdown_func->set_editor( lo_dropdown ).

lo_dropdown->set_enabled.

************************************************************************************

I also set an external Context-Mapping to the Context-node FUNCTION_ELEMENTS of ALV-Interfacecontroller.

Context-node'TEST' with attribute 'CONTACT' is mapped to 'FUNCTION_ELEMEBNTS'.

Ist there anything wrong? through this way I always get an error message "The ASSERT condition was violated"

The error position has the following code and comments:

    • " Context Path contains no multiple node

assert 1 = 2

Maybe you could help me. Thank you very much in advance!

regards,

meer

Former Member
0 Kudos

Common.. Does anybody have a clue?

What about the FILTER_VALUES node in the ALV?

Any other ideas?

Former Member
0 Kudos

Check the Thread [ABAP WebDynpro ALV Filter Dropdown |;. Also check the [Standard ALV Functions |http://help.sap.com/saphelp_nw70ehp1/helpdata/en/7f/849e6d796d4fe49221609ffcbc357d/content.htm]

Former Member
0 Kudos

I have seen this post before. It is about implementing a standard DDL FIlter, NOT a DDL Filter in the ALV Toolbar!!

Again: I would like to implement a DDL Filter in the ALV Toolbar that uses a different context node than the Table shown in the ALV!

I was not able to do that since the DDL object only allows tp provide an attribute of the ALV Table...

So my problem remains unsolved.. Does anybody know what to do there??

THANKS, Johannes

Former Member
0 Kudos

It could be happening because you have bound both your DDL and ALV column value with same attributes, and when you change the selected value in ALV, the drop down by key selected value also changes and sets it to the same value.

Try creating another attribute in another node with same data type as your ALV column and bind that with DDL.

Hope this helps.

Regards

manas dua

Former Member
0 Kudos

It is like I said: I am using the Functions of the ALV to create my DDL! And there, it is not possible to bind another node (see coding above!!).

I could use a normal DDL outside of the ALV, but I would prefer using the functions of the ALV. It look weird if the DDL is outside of the ALV, doesn't it?

Does anybody else have a clue?

THANKS, Johannes