Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module - REUSE_ALV_LIST_DISPLAY Set Filter

Former Member
0 Likes
1,452

I have a report using the function module - REUSE_ALV_LIST_DISPLAY. The set filter on the tool bar is not working. What do I need to do to get it working?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,369

In the FIELDCAT, is the output length of the order number the same as in lt_output? I've tried this with one of my reports and get the same problem.

Rob

13 REPLIES 13
Read only

Former Member
0 Likes
1,369

What do you mean by it's not working? What's happening on clicking on it?

Read only

Former Member
0 Likes
1,369

In the FIELDCAT, have you defined all the fields as key? If so, I don't think it will let you filter.

Rob

Read only

0 Likes
1,369

This is the code that I am using -

Form  fill_field_catalog to create the field catalog PT_FIELDCAT
PERFORM fill_field_catalog USING lt_fieldcat.

ls_layout-colwidth_optimize = 'X'.
ls_layout-detail_popup      = 'X'.
ls_layout-no_keyfix         = 'X'.
ls_layout-key_hotspot       = 'X'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    i_callback_program = 'ZRSD_OPEN_ORDERS'
    i_callback_user_command           = 'USER_COMMAND'
    is_layout          = ls_layout
    it_fieldcat        = lt_fieldcat
    i_default          = 'X'
    i_save             = 'A'
  TABLES
    t_outtab           = lt_output
  EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

FORM fill_field_catalog  USING  pt_fieldcat TYPE slis_t_fieldcat_alv.

  CLEAR ls_fieldcat.

  ls_fieldcat-fieldname   = 'VBELN'.
  ls_fieldcat-seltext_l = 'Order Number' .
  ls_fieldcat-col_pos     = 1.
  APPEND ls_fieldcat TO pt_fieldcat.

Read only

0 Likes
1,369

Can you try this? ( in the subroutine for field cat)

ls_fieldcat-tabname = 'LT_OUTPUT'. ( in upper case)

Read only

0 Likes
1,369

No This did not work. Is this the correct place that you wanted me to add this code?

*Form  fill_field_catalog to create the field catalog PT_FIELDCAT
PERFORM fill_field_catalog USING lt_fieldcat.

ls_layout-colwidth_optimize = 'X'.
ls_layout-detail_popup      = 'X'.
ls_layout-no_keyfix         = 'X'.
ls_layout-key_hotspot       = 'X'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    i_callback_program = 'ZRSD_OPEN_ORDERS'
    is_layout          = ls_layout
    it_fieldcat        = lt_fieldcat
    i_default          = 'X'
    i_save             = 'A'
    TABLES
    t_outtab           = lt_output
    EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

FORM fill_field_catalog  USING  pt_fieldcat TYPE slis_t_fieldcat_alv.

  CLEAR ls_fieldcat.

  <b>LS_FIELDcat-TABNAME   = 'LT_OUTPUT'.</b>  ls_fieldcat-fieldname   = 'VBELN'.
  ls_fieldcat-seltext_l = 'Order Number' .
  ls_fieldcat-col_pos     = 1.
  APPEND ls_fieldcat TO pt_fieldcat.

Read only

Former Member
0 Likes
1,369

My report list's order details. I press the set filter on the tool bar.

I select the order number to the filter criteria

Press copy

Select option =

Order number = xxx - a number I selected from the original report. Execute List contains no data

Read only

0 Likes
1,369

OK - I was thinking of filtering columns.

Try entering leading zeroes in the option.

rob

Read only

0 Likes
1,369

I tried that, it did not work.

Read only

Former Member
0 Likes
1,370

In the FIELDCAT, is the output length of the order number the same as in lt_output? I've tried this with one of my reports and get the same problem.

Rob

Read only

0 Likes
1,369

And it worked when I made that change.

Rob

Read only

0 Likes
1,369

the order number is 10 (LT_output-vbeln) slis-fieldname is 30

Read only

0 Likes
1,369

what was that change you made?

Read only

0 Likes
1,369

My report has HKONT (which is a 10 character field) in the internal table. I added:

  l_f_fieldcat-outputlen   = 10.

Rob