09-04-2014 3:42 PM
Hello Experts,
Im using reuse_alv to display my internal table:
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename
filetype = 'ASC'
TABLES
data_tab = ta_csv.
IF sy-subrc <> 0.
MESSAGE 'Lokale Datei nicht gefunden oder Zugriff gescheitert'
TYPE 'E'.
EXIT.
ENDIF.
DATA: BEGIN OF st_csv_data,
vkorg TYPE vkorg,
matnr TYPE matnr,
preis(10) TYPE c,
END OF st_csv_data.
LOOP AT ta_csv INTO v_record.
IF sy-tabix = 1.
CONTINUE.
ENDIF.
SPLIT v_record AT ';'
INTO st_csv_data-vkorg
st_csv_data-matnr
st_csv_data-preis.
MOVE: st_csv_data-vkorg TO wa_csv_data-vkorg,
st_csv_data-matnr TO wa_csv_data-matnr,
st_csv_data-preis TO wa_csv_data-preis.
APPEND wa_csv_data TO ta_csv_data.
ENDLOOP.
v_repid = sy-repid.
v_layout-zebra = 'X'.
v_layout-edit = 'X'.
v_layout-colwidth_optimize = 'X'.
v_grid_title = text-t02.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_grid_title = v_grid_title
i_save = 'A'
i_structure_name = 'zst_preisupload'
is_layout = v_layout
i_callback_pf_status_set = 'STANDARD'
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = ta_csv_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
and I'd like to have cells in th grid being colored in case there are empty or there are not digits inside.
Until now I only foud some example solutions hot to do this static...could you may be give some advise for that case?
09-04-2014 4:07 PM
Hi Denis,
Not sure how you will do it with individual cells, but if you have a look at sap demo program BCALV_TEST_COLORS they use this same Function Module as you i.e. for the same case.
Hope this helps you.