안녕하세요 초보 ABAP 개발자입니다.
기존에 REUSE_ALV_GRID_DISPLAY' 으로 구현된 ALV 에서 CELL 값 변경시 해당 CELL의 값을 체크해서 색상을 변경 시킬려고 하는데 잘 되지 않아 질문드립니다.
*----- TYPE-POOLS
TYPE-POOLS SLIS.
*----- LIST VIEWER
DATA : EVENTCAT TYPE SLIS_T_EVENT WITH HEADER LINE,
SELFIELD TYPE SLIS_SELFIELD.
DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_2 TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_IN LIKE LINE OF FIELDCAT,
FIELDCAT_IN2 LIKE LINE OF FIELDCAT.
DATA : SORT TYPE SLIS_T_SORTINFO_ALV,
SORT_IN LIKE LINE OF SORT .
DATA : COL_POS TYPE I,
G_LAYOUT_S TYPE SLIS_LAYOUT_ALV .
**********************************************************************
FORM START_GRID_DISPLAY .
GS_GRIDSET-EDT_CLL_CB = 'X'.
G_LAYOUT_S-COLTAB_FIELDNAME = 'CELLSCOL'.
* CLEAR GV_DCHECK .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_GRID_SETTINGS = GS_GRIDSET
IS_LAYOUT = G_LAYOUT_S
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = ALV_VARIANT
IT_EVENTS = GT_EVENTS[]
IT_FIELDCAT = FIELDCAT
IT_SORT = SORT
TABLES
T_OUTTAB = IT_LT[].
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
******************************************************************************
FORM MARK_CHANGED_A USING
RR_DATA_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL
RS_MOD_CELLS TYPE LVC_S_MODI.
DATA : P_SELFIELD TYPE SLIS_SELFIELD.
READ TABLE IT_LT INDEX RS_MOD_CELLS-ROW_ID.
IF GV_PAN1 NE IT_LT-FOB.
CLEAR GS_SCOL.
GS_SCOL-FNAME = 'PAN'.
GS_SCOL-COLOR-COL = 6.
* GS_SCOL-COLOR-INT = 0.
GS_SCOL-COLOR-INV = 1.
APPEND GS_SCOL TO GT_SCOL.
INSERT LINES OF GT_SCOL INTO TABLE IT_LT-CELLSCOL.
MODIFY IT_LT INDEX RS_MOD_CELLS-ROW_ID.
CALL METHOD RR_DATA_CHANGED->MODIFY_CELL
EXPORTING
I_ROW_ID = RS_MOD_CELLS-ROW_ID
I_FIELDNAME = 'CELLSCOL'
I_VALUE = GT_SCOL..
REFRESH GT_SCOL.
PERFORM USER_COMMAND USING 'RE' P_SELFIELD. -> 강제 REFRESH
ENDIF.
********************************************************************
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
LS_SELFIELD TYPE SLIS_SELFIELD .
DATA : LS_SELFIELD1 TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
WHEN 'INS' .
CLEAR IT_LT .
IT_LT-ZHOSNM = P_ZHOSNM .
IT_LT-AEDAT = P_AEDAT .
IT_LT-PTEXT = GV_PTEXT .
APPEND IT_LT .
LS_SELFIELD-REFRESH = 'X'.
LS_SELFIELD-COL_STABLE = 'X'.
LS_SELFIELD-ROW_STABLE = 'X'.
WHEN 'DEL'.
DELETE IT_LT WHERE MARK = 'X'.
IF SY-SUBRC <> 0 .
MESSAGE E000 WITH TEXT-013 .
ENDIF .
LS_SELFIELD-REFRESH = 'X'.
LS_SELFIELD-COL_STABLE = 'X'.
LS_SELFIELD-ROW_STABLE = 'X'.
WHEN OTHERS.
LS_SELFIELD-REFRESH = 'X'.
LS_SELFIELD-COL_STABLE = 'X'.
LS_SELFIELD-ROW_STABLE = 'X'.
ENDCASE .
ENDFORM . "USER_COMMAND
이런식으로 구현해봤는데 반영이 되질 않습니다.ㅠㅠ
고수님들 도움 부탁드리겠습니다.