brunch

You can make anything
by writing

C.S.Lewis

by 동네아밥 Jul 08. 2021

ALV 스타일 컨트롤

LVC_S_STYL / LVC_T_STYL 테이블을 통해 개별 필드 제어

<CL_ALV_CONTROL>


LVC_S_STYL 스트럭처의 STYLE1은 사용했었는데

STYLE2, 3, 4는 뭐 하는 곳인가..라는 물음에서 시작해 도착


TYPE X (BYTE)를 그대로 사용하며

다른 문단의 항목들끼리 숫자를 덧셈해서 두 가지 이상의 속성을 더할 수 있다.

그러나 코딩할게 많아진다.


ex) 

DATA STYLE TYPE LVC_S_STYL.
STYLE-STYLE =  ALV_STYLE_COLOR_INT_KEY + ALV_STYLE_FONT_UNDERLINED.



가장 많이 쓰는 LVC_S_STYL-STYLE.

FCAT을 통한 일괄설정 말고, 필드별로 설정할 수 있게 되시겠다.

하지만 사용자가 되냐고 물어보면 안된다고 하자.


  Style

 ALV_STYLE_COLOR_BACKGROUND(4)                  TYPE X VALUE '00000001',
 ALV_STYLE_COLOR_HEADING(4)                     TYPE X VALUE '00000002',
 ALV_STYLE_COLOR_NORMAL(4)                      TYPE X VALUE '00000003',
 ALV_STYLE_COLOR_TOTAL(4)                       TYPE X VALUE '00000004',
 ALV_STYLE_COLOR_KEY(4)                         TYPE X VALUE '00000005',
 ALV_STYLE_COLOR_POSITIVE(4)                    TYPE X VALUE '00000006',
 ALV_STYLE_COLOR_NEGATIVE(4)                    TYPE X VALUE '00000007',
 ALV_STYLE_COLOR_GROUP(4)                       TYPE X VALUE '00000008',
 ALV_STYLE_COLOR_INT_BACKGROUND(4)              TYPE X VALUE '00000009',
 ALV_STYLE_COLOR_INT_HEADING(4)                 TYPE X VALUE '0000000A',
 ALV_STYLE_COLOR_INT_NORMAL(4)                  TYPE X VALUE '0000000B',
 ALV_STYLE_COLOR_INT_TOTAL(4)                   TYPE X VALUE '0000000C',
 ALV_STYLE_COLOR_INT_KEY(4)                     TYPE X VALUE '0000000D',
 ALV_STYLE_COLOR_INT_POSITIVE(4)                TYPE X VALUE '0000000E',
 ALV_STYLE_COLOR_INT_NEGATIVE(4)                TYPE X VALUE '0000000F',
 ALV_STYLE_COLOR_INT_GROUP(4)                   TYPE X VALUE '00000010',
 ALV_STYLE_COLOR_INV_BACKGROUND(4)              TYPE X VALUE '00000011',
 ALV_STYLE_COLOR_INV_HEADING(4)                 TYPE X VALUE '00000012',
 ALV_STYLE_COLOR_INV_NORMAL(4)                  TYPE X VALUE '00000013',
 ALV_STYLE_COLOR_INV_TOTAL(4)                   TYPE X VALUE '00000014',
 ALV_STYLE_COLOR_INV_KEY(4)                     TYPE X VALUE '00000015',
 ALV_STYLE_COLOR_INV_POSITIVE(4)                TYPE X VALUE '00000016',
 ALV_STYLE_COLOR_INV_NEGATIVE(4)                TYPE X VALUE '00000017',
 ALV_STYLE_COLOR_INV_GROUP(4)                   TYPE X VALUE '00000018',
 
 ALV_STYLE_FONT_BOLD(4)                         TYPE X VALUE '00000020',
 ALV_STYLE_FONT_BOLD_NO(4)                      TYPE X VALUE '00000040',
 
 ALV_STYLE_FONT_ITALIC(4)                       TYPE X VALUE '00000080',
 ALV_STYLE_FONT_ITALIC_NO(4)                    TYPE X VALUE '00000100',
 
 ALV_STYLE_FONT_UNDERLINED(4)                   TYPE X VALUE '00000200',
 ALV_STYLE_FONT_UNDERLINED_NO(4)                TYPE X VALUE '00000400',
 
 ALV_STYLE_ALIGN_LEFT_TOP(4)                    TYPE X VALUE '00000800',
 ALV_STYLE_ALIGN_CENTER_TOP(4)                  TYPE X VALUE '00001000',
 ALV_STYLE_ALIGN_RIGHT_TOP(4)                   TYPE X VALUE '00001800',
 ALV_STYLE_ALIGN_LEFT_CENTER(4)                 TYPE X VALUE '00002000',
 ALV_STYLE_ALIGN_CENTER_CENTER(4)               TYPE X VALUE '00002800',
 ALV_STYLE_ALIGN_RIGHT_CENTER(4)                TYPE X VALUE '00003000',
 ALV_STYLE_ALIGN_LEFT_BOTTOM(4)                 TYPE X VALUE '00003800',
 ALV_STYLE_ALIGN_CENTER_BOTTOM(4)               TYPE X VALUE '00004000',
 ALV_STYLE_ALIGN_RIGHT_BOTTOM(4)                TYPE X VALUE '00004800',
 
 ALV_STYLE_FONT_SYMBOL(4)                       TYPE X VALUE '00008000',
 ALV_STYLE_FONT_SYMBOL_NO(4)                    TYPE X VALUE '00010000',
 
 ALV_STYLE_CHECKBOX_NOT_CHECKED(4)              TYPE X VALUE '00020000',
 ALV_STYLE_CHECKBOX_CHECKED(4)                  TYPE X VALUE '00040000',
 ALV_STYLE_CHECKBOX_NO(4)                       TYPE X VALUE '00060000',
 
 ALV_STYLE_ENABLED(4)                           TYPE X VALUE '00080000',
 ALV_STYLE_DISABLED(4)                          TYPE X VALUE '00100000',
 
 ALV_STYLE_SINGLE_CLK_EVENT(4)                  TYPE X VALUE '00200000',
 ALV_STYLE_SINGLE_CLK_EVENT_NO(4)               TYPE X VALUE '00400000',
 
 ALV_STYLE_RADIO_NOT_CHECKED(4)                 TYPE X VALUE '00800000',
 ALV_STYLE_RADIO_CHECKED(4)                     TYPE X VALUE '01000000',
 ALV_STYLE_RADIO_NO(4)                          TYPE X VALUE '01800000',
 
 ALV_STYLE_F4(4)                                TYPE X VALUE '02000000',
 ALV_STYLE_F4_NO(4)                             TYPE X VALUE '04000000',
 
 ALV_STYLE_IMAGE(4)                             TYPE X VALUE '08000000',
 
 ALV_STYLE_NO_DELETE_ROW(4)                     TYPE X VALUE '10000000',
 
 ALV_STYLE_BUTTON(4)                            TYPE X VALUE '20000000',
 ALV_STYLE_BUTTON_NO(4)                         TYPE X VALUE '40000000',
 


개별 필드의 테두리 설정
  Style 2
 ALV_STYLE2_NO_BORDER_LEFT(4)                   TYPE X VALUE '00010000',
 ALV_STYLE2_NO_BORDER_RIGHT(4)                  TYPE X VALUE '00020000',
 ALV_STYLE2_NO_BORDER_TOP(4)                    TYPE X VALUE '00040000',
 ALV_STYLE2_NO_BORDER_BOTTOM(4)                 TYPE X VALUE '00080000',
 


  Style 3 ( WEBSTYLES ).
이건 웹구이에서 쓰이나보다. 
못먹는 건가보군


굳이.. 쓸 필요가 있나 싶다
  Style 4

 ALV_STYLE4_ZEBRA_ROW(4)                        TYPE X VALUE '00000001',
 ALV_STYLE4_STOP_MERGE(4)                       TYPE X VALUE '00000002',
 
 ALV_STYLE4_LINK(4)                             TYPE X VALUE '00000004',
 ALV_STYLE4_LINK_NO(4)                          TYPE X VALUE '00000008',
 


얘는 어따 넣어주는건지 감이 안온다.


  Column Styles
 LV_COL_STYLE_SORT_UP(4)                        TYPE X VALUE '00000001',
 LV_COL_STYLE_SORT_DOWN(4)                      TYPE X VALUE '00000002',
 LV_COL_STYLE_FILTER(4)                         TYPE X VALUE '00000004',
 LV_COL_STYLE_TOTAL(4)                          TYPE X VALUE '00000008',
 LV_COL_STYLE_SUBTOTAL(4)                       TYPE X VALUE '00000010',
 LV_COL_STYLE_CHARACTERISTIC(4)                 TYPE X VALUE '00000020',
 LV_COL_STYLE_KEYFIGURE(4)                      TYPE X VALUE '00000040',
 LV_COL_STYLE_KEY(4)                            TYPE X VALUE '00000080',
 LV_COL_STYLE_EXCEPTION(4)                      TYPE X VALUE '00000100',
 LV_COL_STYLE_SIGNED_KEYFIGURE(4)               TYPE X VALUE '00000200',
 LV_COL_STYLE_MERGE(4)                          TYPE X VALUE '00000400',
 LV_COL_STYLE_FIXED(4)                          TYPE X VALUE '00000800',
 LV_COL_STYLE_AUTO_VALUE(4)                     TYPE X VALUE '00001000',
 LV_COL_STYLE_NO_DISP(4)                        TYPE X VALUE '00002000',
 LV_COL_STYLE_HASREF(4)                         TYPE X VALUE '00004000',
 LV_COL_STYLE_AVERAGE(4)                        TYPE X VALUE '00008000',
 LV_COL_STYLE_MIN(4)                            TYPE X VALUE '00010000',
 LV_COL_STYLE_MAX(4)                            TYPE X VALUE '00020000',
 LV_COL_STYLE_L_SPACES(4)                       TYPE X VALUE '00040000'. 



작가의 이전글 ABAP 날짜 관련 FM
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari