*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* TYPES: BEGIN OF ty_out, kokrs TYPE KOKRS, kostl TYPE KOSTL, spras TYPE SPRAS, kstxt TYPE KTEXT, kltxt TYPE KLTXT, dtabc TYPE DATAB, dtbic TYPE DATBI, prctr TYPE PRCTR, ktext TYPE KTEXT, ltext TYPE LTEXT, dtabp TYPE DATAB, dtbip TYPE DATBI, prsem TYPE PRCTR, txtsh TYPE RSTXTSH, txtmd TYPE RSTXTMD, dtabs TYPE DATAB, dtbis TYPE DATBI, color(4) TYPE C, END OF ty_out. DATA: gt_out TYPE STANDARD TABLE OF ty_out, gs_out LIKE LINE OF gt_out. *----------------------------------------------------------------------* * FORM PROCESS_DATA * *----------------------------------------------------------------------* FORM process_data. LOOP AT [...] IF [...]. gs_out-color = 'C610'. ENDIF. APPEND gs_out TO gt_out. CLEAR gs_out. ENDLOOP. ENDFORM. "process_data *----------------------------------------------------------------------* * FORM OUTPUT_ALV * *----------------------------------------------------------------------* FORM output_alv. TYPE-POOLS SLIS. DATA: ls_layout TYPE SLIS_LAYOUT_ALV, lt_fieldcat TYPE SLIS_T_FIELDCAT_ALV. PERFORM build_fielcat CHANGING lt_fieldcat. ls_layout-info_fieldname = 'COLOR'. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = SY-CPROG I_CALLBACK_USER_COMMAND = 'USER_COMMAND' I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' I_BACKGROUND_ID = 'ALV_BACKGROUND' IS_LAYOUT = ls_layout IT_FIELDCAT = lt_fieldcat TABLES T_OUTTAB = gt_out. ENDFORM. "output_alv
lunedì 30 marzo 2015
Righe colorate nelle tabelle ALV
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento