*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* DATA: BEGIN OF gt_out OCCURS 0, [...] n_vers TYPE I, [...] END OF gt_out. DATA: tot_n_real TYPE I, tot_c(8) TYPE C. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* PARAMETERS: pa_num TYPE I. *----------------------------------------------------------------------* * FORM OUTPUT_ALV * *----------------------------------------------------------------------* FORM output_alv. DATA: lv_grid_title TYPE LVC_TITLE, lt_fieldcat_alv TYPE SLIS_T_FIELDCAT_ALV, ls_fieldcat_alv TYPE SLIS_FIELDCAT_ALV. CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING I_PROGRAM_NAME = SY-CPROG I_INTERNAL_TABNAME = 'GT_OUT' I_INCLNAME = SY-CPROG CHANGING CT_FIELDCAT = lt_fieldcat_alv. IF pa_num > tot_n_real. ls_fieldcat_alv-emphasize = 'C610'. tot_c = tot_n_real. CONDENSE tot_c. CONCATENATE '(' tot_c ')' INTO lv_grid_title. CONCATENATE TEXT-014 lv_grid_title INTO lv_grid_title SEPARATED BY SPACE. ENDIF. ls_fieldcat_alv-seltext_l = 'N. colli da versare'(004). MODIFY lt_fieldcat_alv FROM ls_fieldcat_alv TRANSPORTING emphasize seltext_l WHERE fieldname = 'N_VERS'. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = SY-CPROG I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE' I_BACKGROUND_ID = 'ALV_BACKGROUND' I_GRID_TITLE = lv_grid_title IT_FIELDCAT = lt_fieldcat_alv I_SAVE = 'A' TABLES T_OUTTAB = gt_out. ENDFORM.
giovedì 3 dicembre 2015
Colonne colorate nelle tabelle ALV
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento