diff --git a/.abapgit.xml b/.abapgit.xml new file mode 100644 index 0000000..7c0506a --- /dev/null +++ b/.abapgit.xml @@ -0,0 +1,10 @@ + + + + + E + /src/ + PREFIX + + + diff --git a/src/package.devc.xml b/src/package.devc.xml new file mode 100644 index 0000000..31848fc --- /dev/null +++ b/src/package.devc.xml @@ -0,0 +1,10 @@ + + + + + + 샘플 예제 소스 + + + + diff --git a/src/zsample001.prog.abap b/src/zsample001.prog.abap new file mode 100644 index 0000000..4a2507f --- /dev/null +++ b/src/zsample001.prog.abap @@ -0,0 +1,70 @@ +*&---------------------------------------------------------------------* +*& Report ZTEST007 +*&---------------------------------------------------------------------* +*& +*&---------------------------------------------------------------------* +REPORT ZSAMPLE001. + + +selection-screen begin of line. +* 1. 결과수정 +parameters: p_r1 radiobutton group g1 default 'X' user-command disp. +selection-screen comment 3(10) text-bel for field p_r1. +* 2. 금액수정 +selection-screen position 25. +parameters: p_r2 radiobutton group g1. +selection-screen comment 27(10) text-amt for field p_r2. +*... +selection-screen end of line. + + + +selection-screen begin of block fram3 with frame title text-003. " 실행범위표 +selection-screen begin of line. +selection-screen comment (79) text-c01 modif id gr1. +" 1) 회사코드 2) 영업문서(10) 3) 고객번호(10) 4) 지도코사(09) +selection-screen end of line. +selection-screen begin of line. +selection-screen comment (79) text-c02 modif id gr1. +" 6) 결과분류(08) 8) 프로젝트번호(10) 9) E, S, C, A 7) 취소문서번호(10) +selection-screen end of line. + +selection-screen begin of line. +selection-screen comment (79) text-c05 modif id gr1. " 8) 전기 일자(08) 9) 취소 일자(08) +selection-screen end of line. +selection-screen end of block fram3. + + + +selection-screen begin of block fram4 with frame title text-003. " 실행범위표 +selection-screen begin of line. +selection-screen comment (79) text-c01 modif id gr2. " 1) 회사코드 2) 영업문서(10) 3) 고객번호(10) 4) 지도코사(09) +selection-screen end of line. +selection-screen begin of line. +selection-screen comment (79) text-c03 modif id gr2. " 5) 전문등록금액 6) 원부수량 7) 1회 원부액 +selection-screen end of line. +selection-screen end of block fram4. + + +at selection-screen output. + perform process_for_pbo. + + + +form process_for_pbo . +*--> Screen Show / Hide + perform control_scr. +endform. " PROCESS_FOR_PBO + +form control_scr . + loop at screen. + if p_r1 eq 'X' and ( screen-group1 = 'GR2' or screen-group1 = 'GR3' ). + screen-active = '0'. + endif. + if p_r2 eq 'X' and ( screen-group1 = 'GR1' or screen-group1 = 'GR3' ). + screen-active = '0'. + endif. +* ... + modify screen. + endloop. +endform. " CONTROL diff --git a/src/zsample001.prog.xml b/src/zsample001.prog.xml new file mode 100644 index 0000000..1dde1a1 --- /dev/null +++ b/src/zsample001.prog.xml @@ -0,0 +1,63 @@ + + + + + + ZSAMPLE001 + 1 + E + X + X + + + + I + 003 + 엑셀파일 포멧 + 17 + + + I + AMT + 금액수정 + 14 + + + I + BEL + 전표수정 + 14 + + + I + C01 + 1) 회사코드 + 14 + + + I + C02 + 5) 전표번호(01) + 21 + + + I + C03 + 5) 전표통화금액 + 19 + + + I + C05 + 8) 전기일자(08) + 21 + + + R + Dynamic Selection Screen + 24 + + + + + diff --git a/src/zsample002.prog.abap b/src/zsample002.prog.abap new file mode 100644 index 0000000..c0044fe --- /dev/null +++ b/src/zsample002.prog.abap @@ -0,0 +1,6 @@ +*&---------------------------------------------------------------------* +*& Report ZSAMPLE002 +*&---------------------------------------------------------------------* +*& +*&---------------------------------------------------------------------* +REPORT ZSAMPLE002. diff --git a/src/zsample002.prog.xml b/src/zsample002.prog.xml new file mode 100644 index 0000000..f566531 --- /dev/null +++ b/src/zsample002.prog.xml @@ -0,0 +1,21 @@ + + + + + + ZSAMPLE002 + 1 + E + X + X + + + + R + GOS - in background + 19 + + + + + diff --git a/src/zsample003.prog.abap b/src/zsample003.prog.abap new file mode 100644 index 0000000..6a62bd0 --- /dev/null +++ b/src/zsample003.prog.abap @@ -0,0 +1,108 @@ +*&---------------------------------------------------------------------* +*& Report ZSAMPLE003 +*&---------------------------------------------------------------------* +*& +*&---------------------------------------------------------------------* +REPORT ZSAMPLE003. + +TYPE-POOLS: slis. + +DATA: gt_sflight TYPE TABLE OF sflight. +DATA: gs_layout TYPE slis_layout_alv. +DATA: gt_event TYPE slis_t_event. +DATA: gs_event TYPE slis_alv_event. + +gs_event-name = slis_ev_data_changed. +gs_event-form = 'DATA_CHANGED'. +APPEND gs_event TO gt_event. + +*====================================================================* +* SELECTION * +*====================================================================* + +SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight. + +* ENABLE EDIT +gs_layout-edit = 'X'. + +* Call ABAP List Viewer (ALV) +CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' + EXPORTING + i_callback_program = sy-repid + i_callback_user_command = 'USER_COMMAND' + i_structure_name = 'SFLIGHT' + is_layout = gs_layout + it_events = gt_event + i_callback_top_of_page = 'TOP-OF-PAGE1' + TABLES + t_outtab = gt_sflight. + +*---------------------------------------------------------------------* +* Form DATA_CHANGED +*---------------------------------------------------------------------* + +FORM data_changed USING er_data_changed + TYPE REF TO cl_alv_changed_data_protocol. + + DATA ls_stable TYPE lvc_s_stbl VALUE 'XX'. + + FIELD-SYMBOLS: TYPE REF TO cl_gui_alv_grid, + TYPE lvc_s_modi, + LIKE LINE OF gt_sflight. + + ASSIGN ('(SAPLSLVC_FULLSCREEN)GT_GRID-GRID') TO . + CHECK IS BOUND. + + READ TABLE er_data_changed->mt_mod_cells + ASSIGNING + INDEX 1. + CHECK sy-subrc IS INITIAL. + + READ TABLE gt_sflight + ASSIGNING + INDEX -row_id. + CHECK sy-subrc IS INITIAL. + + -seatsmax = 999. + ->refresh_table_display( is_stable = ls_stable ). + +ENDFORM. " DATA_CHANGED + +*---------------------------------------------------------------------* +* Form TOP-OF-PAGE1 +*---------------------------------------------------------------------* + +FORM top-of-page1. + + DATA: header TYPE slis_t_listheader, + wa TYPE slis_listheader. + +* TITLE AREA + wa-typ = 'S'. + wa-info = 'ALV TEST'. + APPEND wa TO header. + + wa-typ = 'S'. + wa-info = '------------------------------'. + APPEND wa TO header. + + wa-typ = 'S'. + WRITE sy-datum TO wa-info MM/DD/YYYY. + CONCATENATE 'DATE:' wa-info INTO wa-info SEPARATED BY space. + APPEND wa TO header. + + wa-typ = 'S'. + CONCATENATE 'USER:' '유리선율' INTO wa-info SEPARATED BY space. + APPEND wa TO header. + + wa-typ = 'S'. + CONCATENATE 'PROG:' sy-repid INTO wa-info SEPARATED BY space. + APPEND wa TO header. + +* LOGO + CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' + EXPORTING + it_list_commentary = header + i_logo = 'ENJOYSAP_LOGO'. + +ENDFORM. " top-of-page1 diff --git a/src/zsample003.prog.xml b/src/zsample003.prog.xml new file mode 100644 index 0000000..38277ef --- /dev/null +++ b/src/zsample003.prog.xml @@ -0,0 +1,21 @@ + + + + + + ZSAMPLE003 + 1 + E + X + X + + + + R + ALV TIP + 17 + + + + +