메뉴 건너뛰기

SAP Korea Community

GRID

밤의화신 2017.04.04 09:12 조회 수 : 3475

DATA: BEGIN OF LT_DRDOWN OCCURS 10, DDTEXT LIKE DD07T-DDTEXT, DOMVALUE_L LIKE DD07T-DOMVALUE_L. DATA: END OF LT_DRDOWN. DATA: LS_DROPDOWN TYPE LVC_S_DROP. SELECT * INTO LT_DRDOWN FROM DD07T WHERE DOMNAME = 'AA' LOOP AT LT_DRDOWN. LS_DROPDOWN-HANDLE = '1'. LS_DROPDOWN-VALUE = LT_DRDOWN-DOMVALUE_L. APPEND LS_DROPDOWN TO LT_DROPDOWN. ENDLOOP. "엔터키를 칠때마다 CALL METHOD GV_GRID->REGISTER_EDIT_EVENT EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER. "값이 변경될때마다 CALL METHOD GV_GRID->REGISTER_EDIT_EVENT EXPORTING I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED. "리스트박스 정의 CALL METHOD GV_GRID->SET_DROP_DOWN_TABLE EXPORTING IT_DROP_DOWN = LT_DROPDOWN. "조회모드 CALL METHOD GV_GRID->SET_READY_FOR_INPUT EXPORTING I_READY_FOR_INPUT = 0. "편집모드 CALL METHOD GV_GRID->SET_READY_FOR_INPUT EXPORTING I_READY_FOR_INPUT = 1.



DATA LS_DROPDOWN TYPE LVC_S_DROP.

DATA LT_DROPDOWN TYPE LVC_T_DROP.


CLEAR GT_FIELDCAT.

GT_FIELDCAT-COL_POS = 5.

GT_FIELDCAT-FIELDNAME = 'TEXT'.

GT_FIELDCAT-TABNAME = 'GT_DISPLAY'.

GT_FIELDCAT-COLTEXT = 'CHECK'.

GT_FIELDCAT-DATATYPE = 'CHAR'.

GT_FIELDCAT-OUTPUTLEN = 10.

GT_FIELDCAT-DRDN_HNDL = '1'.

GT_FIELDCAT-EDIT = 'X'.

GT_FIELDCAT-LOWERCASE = 'X'.

APPEND GT_FIELDCAT.




CALL METHOD GV_GRID->SET_DROP_DOWN_TABLE

    EXPORTING

       IT_DROP_DOWN = LT_DORPWORN.


DATA GV_TARGET_CON TYPE REF TO CL_GUI_CONTAIONER.

DATA GV_DETAIL TYPE RET TO CL_GUI_HTML_VIEWER.

DATA GT_HTML(65535) OCCURS 1 WITH HEADER LINE.

DATA GV_URL TYPE CNDP_URL.


DATA LV_DESC  TYPE STRING.


CREATE OBJECT GV_DETAIL

    EXPORTING

          PARENT = GV_TARGET_CON.


CLEAR GT_HTML, GT_HTML[].


CONCATENATE '<FONT COLOR = BLUE>' '총 건수'

                              '&NBSP;:' T_TOTAL

                              '&NBSP;&NBSP;&NBSP;&NBSP;' 

                              'SUCCESS'

                             '&NBSP;:' T_SUCCESS

                             '&NBSP;&NBSP;&NBSP;&NBSP;'

                             'ERROR'

                             '&NBSP;:' T_ERROR

                  INTO LV_DESC

                  SEPARATED BY SPACE.

APPEND :

                 '<HTML><BODY TOPMARGIN = 0 LEFTMARGIN = 0 BGCOLOR = #EAE9D7>' TO GT_HTML,

                 '<TABLE BORDER = 0 WIDTH = 100% STYLE = ' ' FONT-SIZE:9PT' '>' TO GT_HTML,

                 '<TR VALIGN = MIDDLE>' TO GT_HTML,

                 '< TD>' TO GT_HTML,

                 LV_DESC TO GT_HTML,

                 '</TD>' TO GT_HTML,

                 '</TR>' TO GT_HTML,

                 '</TABLE></FONT></BODY></HTML>' TO GT_HTML.


* LOAD HTML DATA

CALL METHOD GV_DETIAL->LOAD_DATA

    IMPORTING

        ASSIGNED_URL = GV_URL

   CHANGING

        DATA_TABLE = GT_HTML[].

 

IF SY-SUBRC EQ 0.

    CALL METHOD GV_DETAIL->SHOW_URL

         EXPORTING

             URL = GV_URL.

ENDIF. 


DATA GT_RET LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.


REFRESH GT_RET.


DATA LT_RET LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.


CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

        TABNAME = 'DRAW'

        FIELDNAME = 'DOKNR'

        MULTIPLE_CHOICE = 'X'

   TABLES

       RETURN_TAB = LT_RET.


IF LT_RET[] IS NOT INITIAL.

    GT_RET[] = LT_RET[].

ENDIF.




번호 제목 글쓴이 날짜 조회 수
공지 자료실 업로드에 관련하여... [183] 보나 2009.11.05 340010
1358 NEPTUNE 솔루션 SAP 데이터를 FIORI로 보여주는 솔루션입니다. easy abap(김성준) 2018.09.07 622
1357 개발자 가이드 for SAP HANA STUDIO [2] file 얀웬리 2018.08.10 1086
1356 S4 HANA IDES 설치 따라하기 [2] easy abap(김성준) 2018.07.14 1058
1355 Transaction code naming [2] easy abap(김성준) 2018.02.12 1768
1354 User Exit 질문 [3] 푸딩딩 2017.04.17 4426
» GRID 밤의화신 2017.04.04 3475
1352 Next Generation ABAP Development (2007 영문 PDF) file 대략나 2016.12.20 3781
1351 Graphical Form Painter could not be called (FORMPAINTER_CREATE_WINDOW, ) [1] easy abap(김성준) 2016.11.22 3700
1350 PI/XI 7.0 Alert Config 영문 file cry6 2016.09.01 3501
1349 PI/XI 7.1 Troubleshooting Guide - 영문 file cry6 2016.09.01 3162
1348 Excel Macro 이용한 Table Layout file 아네사 2016.08.19 3680
1347 모든 CBO 테이블 엑셀 업로드 프로그램 [1] easy abap(김성준) 2016.08.17 4597
1346 LSMW example (FK01 - vendor master create ) [2] file cupycopy2000 2016.04.30 3678
1345 ABAP Debugging Tips and Tricks [4] file 아밥뽀 2016.03.31 4311
1344 ALV with IDA(Integrated Data Access ) 설명 및 한글 자료 있으신 분 있으신가요 ? [1] miss841 2016.01.19 4342
1343 ABAP 7.40 Quick Reference [5] easy abap(김성준) 2015.11.19 6342
1342 SAP NetWeaver Application Server ABAP 7.4 Overview and Product Highlight file easy abap(김성준) 2015.11.12 3770
1341 HANA 및 ABAP 프로그램 개발을 위한 이클립스(ECLIPSE) 설치하기 [7] file easy abap(김성준) 2015.09.30 6074
1340 CL_BCS를 이용한 E-Mail 즉시전송 [1] 사라다 2015.09.17 4945
1339 SAP NetWeaver as server 7.03 VMware 네트워크 설정 방법. file paran 2015.07.25 4298