Application Development 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: 

Filter Function problems on ALV report. [Resolved]

Former Member
0 Kudos

Hi,

I developed an ALV report by using function as below:

 CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              I_CALLBACK_PROGRAM = G_REPID
*            I_CALLBACK_PF_STATUS_SET = status_set
*            I_CALLBACK_USER_COMMAND  = USER_COMMAND
              I_STRUCTURE_NAME = 'T_BSIK'
              IS_LAYOUT        = GS_LAYOUT
              IT_FIELDCAT      = GT_FIELDCAT[]
         TABLES
              T_OUTTAB    = TAB_BSIK.

And this ALV custom report is referenced from standard function FBL5N.

After i completed this report, i made an comparision of FBL5N and my custom report.

When I apply the filter function, for example, on the document type, I cannot input 2 characters in the document type field under the filter function. The field length is only 1 character. Similar case results on the field document date.

While the standard function FBL5N works very nice.

What should i do to make the filter function of my own ALV report as the same as the standard function FBL5N do?

Thanks in advance.

Lala

Message was edited by:

Hoo lala

3 REPLIES 3

Former Member
0 Kudos

In my ALV output, when I go for filtering, it provides space for only one character to enter for filtering. Pls help me.

My code for FIELDCAT_INIT:

FORM FIELDCAT_INIT tables RT_FIELDCAT.
...

CLEAR LS_FIELDCAT.
  LS_FIELDCAT-COL_POS   =  3.
  LS_FIELDCAT-FIELDNAME = 'BLART'.
  LS_FIELDCAT-TABNAME   = 'TAB_BSIK'.
  LS_FIELDCAT-SELTEXT_L = 'Document Type'.
  APPEND LS_FIELDCAT TO  RT_FIELDCAT.

...
endform.

Thanks in advance

0 Kudos

Oh, i found where the problem is...

add below 2 statements, then the question is resolved.

  LS_FIELDCAT-ref_fieldname = ****
  LS_FIELDCAT-ref_tabname = ***

FORM FIELDCAT_INIT tables RT_FIELDCAT.
...
 
CLEAR LS_FIELDCAT.
  LS_FIELDCAT-COL_POS   =  3.
  LS_FIELDCAT-FIELDNAME = 'BLART'.
  LS_FIELDCAT-TABNAME   = 'TAB_BSIK'.
  LS_FIELDCAT-SELTEXT_L = 'Document Type'.
  LS_FIELDCAT-ref_fieldname = 'BLART'.
  LS_FIELDCAT-ref_tabname = 'BSIK'.
  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
 
...
endform.

Fine now.

Lala

Former Member
0 Kudos

[Resolved]