hätte eine Lösung, aber sie funktioniert einfach nicht und ich weiß nicht warum...
Meine Tabelle wird ausgegeben, aber keine farbliche Kennzeichung auf dem gewünschten feld delta_t. 'Gt_tel_an_alv' ist meine globale interne Tabelle, die ausgegeben werden soll mit farblicher kennzeichnung bestimmter zellen
hier mein Coding:
FORM anzeigen.
DATA ls_fieldcat TYPE slis_fieldcat_alv.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
ls_layout TYPE slis_layout_alv.
DATA: str_anal LIKE LINE OF gt_tel_an_alv,
wa_color TYPE LINE OF slis_t_specialcol_alv.
DATA: BEGIN OF gt_outtab OCCURS 0.
INCLUDE STRUCTURE /tms/scon_anal_wa.
DATA: color TYPE slis_t_specialcol_alv.
DATA: END OF gt_outtab.
DATA: gt_outtab_wa LIKE LINE OF gt_outtab.
LOOP AT gt_tel_an_alv INTO str_anal.
MOVE-CORRESPONDING str_anal TO gt_outtab_wa.
INSERT gt_outtab_wa INTO TABLE gt_outtab.
ENDLOOP.
LOOP AT gt_outtab INTO gt_outtab_wa.
IF gt_outtab_wa-zust_time = '1'.
wa_color-fieldname = 'delta_t'.
wa_color-color-col = '6'.
APPEND wa_color TO gt_outtab_wa-color.
MODIFY gt_outtab FROM gt_outtab_wa.
ENDIF.
ENDLOOP.
REFRESH lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'SST_ID'.
ls_fieldcat-datatype = 'C'.
ls_fieldcat-seltext_l = 'Schnittstellenkennung'.
ls_fieldcat-seltext_m = 'Schnittstellenkennung'.
ls_fieldcat-seltext_s = 'Schnittstellenkennung'.
ls_fieldcat-reptext_ddic = 'SST_ID'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TEL_PAAR'.
ls_fieldcat-datatype = 'C'.
ls_fieldcat-seltext_l = 'Telegrammpaar'.
ls_fieldcat-seltext_m = 'Telegrammpaar'.
ls_fieldcat-seltext_s = 'Telegrammpaar'.
ls_fieldcat-reptext_ddic = 'TEL_PAAR'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'DELTA_T'.
ls_fieldcat-datatype = 'I'.
ls_fieldcat-seltext_l = 'DELTA_T'.
ls_fieldcat-seltext_m = 'DELTA_T'.
ls_fieldcat-seltext_s = 'DELTA_T'..
ls_fieldcat-reptext_ddic = 'DELTA_T'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TIME_START'.
ls_fieldcat-datatype = 'c'.
ls_fieldcat-seltext_l = 'Zeitstempel Telegramm 1'.
ls_fieldcat-seltext_m = 'Zeitstempel Telegramm 1'.
ls_fieldcat-seltext_s = 't Telegramm 1'.
ls_fieldcat-reptext_ddic = 'TIME_START'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TIME_END'.
ls_fieldcat-datatype = 'c'.
ls_fieldcat-seltext_l = 'Zeitstempel Telegramm 2'.
ls_fieldcat-seltext_m = 'Zeitstempel Telegramm 2'.
ls_fieldcat-seltext_s = 'Zeitstempel Telegramm 2'.
ls_fieldcat-reptext_ddic = 'TIME_END'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TEL_STRING'.
ls_fieldcat-datatype = 'c'.
ls_fieldcat-seltext_l = 'Telegrammsuchstring'.
ls_fieldcat-seltext_m = 'Telegrammsuchstring'.
ls_fieldcat-seltext_s = 'Telegrammsuchstring'.
ls_fieldcat-reptext_ddic = 'TEL_STRING'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TEL_ERROR'.
ls_fieldcat-datatype = 'c'.
ls_fieldcat-seltext_l = 'Telegrammfehler'.
ls_fieldcat-seltext_m = 'Telegrammfehler'.
ls_fieldcat-seltext_s = 'Telegrammfehler'.
ls_fieldcat-reptext_ddic = 'TEL_ERROR'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_layout-coltab_fieldname = 'COLOR'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = '/TMS/SCON_ANAL'
is_layout = ls_layout
it_fieldcat = lt_fieldcat
i_save = 'A'
TABLES
t_outtab = gt_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "anzeigen