Code: Alles auswählen.
method HANDLE_DATA_CHANGED.
perform HANDLE_DATA_CHANGED using ER_DATA_CHANGED.
endmethod. "HANDLE_DATA_CHANGED
Code: Alles auswählen.
data: LS_CHANGED type LVC_S_MODI,
LV_MODE type RAW4,
LV_WEEK type I,
LV_ROW type I.
field-symbols:
<ALV_OUT> type TY_ALV_OUT,
<CELLTAB> type LVC_S_STYL.
read table GT_ALV_OUT assigning <ALV_OUT> index LS_CHANGED-ROW_ID.
case LS_CHANGED-FIELDNAME.
when 'Feld1'.
if LS_CHANGED-VALUE is not initial.
<ALV_OUT>-Feld1 = LS_CHANGED-VALUE.
LV_WEEK = LS_CHANGED-VALUE(2).
if LV_WEEK ge '52'.
perform FEHLER using 'C' 'Kalenderwoche existiert nicht'
changing <ALV_OUT>.
else.
read table <ALV_OUT>-CELLTAB assigning <CELLTAB> with key FIELDNAME = 'Feld1' .
<CELLTAB>-STYLE = LV_MODE.
loop at <ALV_OUT>-CELLTAB assigning <CELLTAB2> where STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
perform WARNUNG_ZEILE using 'C' 'prüfen Kalenderwoche zum Jahr'
changing <ALV_OUT>.
exit.
endloop.
if SY-SUBRC is not initial.
<ALV_OUT>-ICON_STAT = ''.
<ALV_OUT>-BEMERK = ''.
endif.
endif.
endif.
when 'Feld2'.
if LS_CHANGED-VALUE is not initial.
<ALV_OUT>-Feld2 = LS_CHANGED-VALUE.
LV_WEEK = LS_CHANGED-VALUE(2).
if LV_WEEK ge '52'.
perform FEHLER using 'C' 'Kalenderwoche existiert nicht'
changing <ALV_OUT>.
else.
read table <ALV_OUT>-CELLTAB assigning <CELLTAB> with key FIELDNAME = 'Feld2' .
<CELLTAB>-STYLE = LV_MODE.
loop at <ALV_OUT>-CELLTAB assigning <CELLTAB2> where STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
perform WARNUNG_ZEILE using 'C' 'prüfen Kalenderwoche zum Jahr'
changing <ALV_OUT>.
exit.
endloop.
if SY-SUBRC is not initial.
<ALV_OUT>-ICON_STAT = ''.
<ALV_OUT>-BEMERK = ''.
endif.
endif.
endif.
endcase.
perform ALV_REFRESH.
Code: Alles auswählen.
data: LS_STABLE type LVC_S_STBL.
LS_STABLE-ROW = 'X'.
LS_STABLE-COL = 'X'.
call method GO_ALV->REFRESH_TABLE_DISPLAY
exporting
IS_STABLE = LS_STABLE
I_SOFT_REFRESH = 'X'
exceptions
FINISHED = 1
others = 2.
call method CL_GUI_CFW=>FLUSH.
Code: Alles auswählen.
call method GO_ALV->SET_TABLE_FOR_FIRST_DISPLAY
exporting
I_STRUCTURE_NAME = 'Z_MEINE_ALV'
IS_LAYOUT = LS_LAYOUT
IS_VARIANT = LS_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
changing
IT_OUTTAB = GT_ALV_OUT[]
IT_FIELDCATALOG = LT_FIELDCAT[].
Code: Alles auswählen.
call method er_data_changed->modify_style
exporting i_fieldname = 'Feld1'
i_row_id = LWA_MOD_CELL-row_id
i_style = cl_gui_alv_grid=>mc_style_disabled.