Skip to Content
0
Former Member
Jul 11, 2007 at 07:44 AM

Dump in ALV filtering (right click filtering)

264 Views

Hello!

We are creating an ALV grid report, using the reusable ALV functions. Everything is working just fine, until we are trying to filter one field in the ALV report (field of type QUAN). The "regular" filter is working just fine (by pressing the filter button), but when using the mouse right-click menu "set filter" we are getting a dump 'OBJECTS_NOT_CHARLIKE'.

I investigated the problem and found that the problem comes from the way the function "REUSE_ALV_FIELDCATALOG_MERGE', returns the field catalog structure.

Here is a sample code I wrote:

  • in def include

DATA: BEGIN OF gs_sloc_alv,

omeng LIKE vbbe-omeng,

quan0 LIKE zsloc-quantity,

END OF gs_sloc_alv.

  • in prc include

CALL FUNCTION ' REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-cprog

i_internal_tabname = 'GS_SLOC_ALV'

i_inclname = 'ZALV_TEST_DEF'

CHANGING

ct_fieldcat = gt_fc.

The 2 fields in structure gs_sloc_alv are in reference to the same type of domain (MENG15) the only difference is that vbbe is a table and zsloc is a structure. The function returns a field catalog with 2 lines. The first (that was referenced to the table) is identified correctly as of DATATYPE QUAN, INTYPE P and INTLEN 000015. The second line is problematic, and is identified as DATATYPE UNIT, INTYPE C and INTLEN 000003.

I have no idea why the use of a table or a structure as such an impact on the behavior of the function, does anyone has any clue about this?

Thanks,

Jacob Fishberg.