Skip to Content
0
Former Member
Apr 16, 2008 at 02:07 PM

TOOLTIP problem with GRID_DISPLAY

54 Views

Hi,

i will test tooltip and write this:

TABLES: MARA.

TYPE-POOLS: SLIS.

*

TYPES: BEGIN OF GS_ITAB,

MATNR LIKE MARA-MATNR,

MATKL LIKE MARA-MATKL,

CLR_F TYPE SLIS_T_SPECIALCOL_ALV,

END OF GS_ITAB.

*

DATA: GT_ITAB TYPE TABLE OF GS_ITAB.

DATA: WA_ITAB TYPE GS_ITAB.

*

DATA: GS_LAYOUT TYPE SLIS_LAYOUT_ALV.

DATA: GT_FIELDCAT TYPE TABLE OF SLIS_FIELDCAT_ALV.

DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

DATA: GT_EXC TYPE TABLE OF SLIS_QINFO_ALV.

DATA: WA_EXC TYPE SLIS_QINFO_ALV.

DATA: WA_CLR_F TYPE SLIS_SPECIALCOL_ALV.

START-OF-SELECTION.

SELECT * FROM MARA UP TO 20 ROWS.

CLEAR: WA_ITAB.

MOVE-CORRESPONDING MARA TO WA_ITAB.

WA_CLR_F-FIELDNAME = 'MATNR'.

WA_CLR_F-COLOR-COL = 6.

WA_CLR_F-COLOR-INT = 0.

WA_CLR_F-COLOR-INV = 0.

APPEND WA_CLR_F TO WA_ITAB-CLR_F.

APPEND WA_ITAB TO GT_ITAB.

ENDSELECT.

GS_LAYOUT-COLTAB_FIELDNAME = 'CLR_F'.

*

CLEAR WA_FIELDCAT.

WA_FIELDCAT-REF_TABNAME = 'MARA'.

WA_FIELDCAT-REF_FIELDNAME = 'MATNR'.

WA_FIELDCAT-FIELDNAME = 'MATNR'.

WA_FIELDCAT-TABNAME = 'IT_ITAB'.

APPEND WA_FIELDCAT TO GT_FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-REF_TABNAME = 'MARA'.

WA_FIELDCAT-REF_FIELDNAME = 'MATKL'.

WA_FIELDCAT-FIELDNAME = 'MATKL'.

WA_FIELDCAT-TABNAME = 'IT_ITAB'.

APPEND WA_FIELDCAT TO GT_FIELDCAT.

WA_EXC-TYPE = CL_SALV_TOOLTIP=>C_TYPE_COLOR.

WA_EXC-VALUE = '600'.

WA_EXC-TEXT = 'Farbe 600'.

APPEND WA_EXC TO GT_EXC.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

  • CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IS_LAYOUT = GS_LAYOUT

IT_FIELDCAT = GT_FIELDCAT

IT_EXCEPT_QINFO = GT_EXC

TABLES

T_OUTTAB = GT_ITAB

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

when i use 'REUSE_ALV_LIST_DISPLAY' it does, what i want,

but when i use 'REUSE_ALV_GRID_DISPLAY' i don't get the tooltip.

Any idea, what mistake i do? For both i use the same code, only i comment the CALL-statement.

Regards, Dieter