보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

사용자 삽입 이미지

사용자 삽입 이미지

Posted by SAP HANA Brian.

댓글을 달아 주세요



SQL Reporting  서비스를 이용하여 레포트를 구축할 수 있는 메뉴얼 임

Posted by SAP HANA Brian.

댓글을 달아 주세요

사용자 삽입 이미지

위와 같은 레이아웃이 나오도록 테이블을 생성하고 프로그램을 개발한다.


* 프로그램 소스
==========================================================================
입력-저장 기능이 없는 테이블의 데이타만 단순하게 조회하는 로직만 포함 함
==========================================================================

*&---------------------------------------------------------------------*
*& Report  ZOOM9990
*&
*&---------------------------------------------------------------------*

INCLUDE zoom9990top.    " global Data
INCLUDE zoom9990scr.    " Selection-Screen
INCLUDE zoom9990alv.    " ALV
INCLUDE zoom9990ent.    " Event
INCLUDE zoom9990o01.    " PBO-Modules
INCLUDE zoom9990i01.    " PAI-Modules
INCLUDE zoom9990f01.    " Form



*&----------------------------------------------------------*
*& Include ZOOM9990TOP
*&
*&----------------------------------------------------------*
REPORT  zoom9990.
TABLES: ztoo9990.

TYPE-POOLS : slis .

INCLUDE <icon>.
INCLUDE <color>.

DATA:  gt_data         LIKE zsoo9990   OCCURS 0 WITH HEADER LINE.

FIELD-SYMBOLS: <data>  TYPE zsoo9990.



*&---------------------------------------------------------------------*
*&  Include           ZOOM9990SCR
*&---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

  PARAMETERS:      pa_org     LIKE ztoo9990-ekorg OBLIGATORY,  "구매조직코드
                   pa_brand   LIKE ztoo9990-brand OBLIGATORY,  "브랜드
                   pa_saisj   LIKE ztoo9990-saisj OBLIGATORY,  "년도
                   pa_saiso   LIKE ztoo9990-saiso OBLIGATORY.  "시즌

SELECT-OPTIONS :   so_matnr   FOR ztoo9990-matnr, "스타일
                   so_lifnr   FOR ztoo9990-lifnr, "거래처
                   so_reqdt   FOR ztoo9990-reqdt. "입고예정일

SELECTION-SCREEN END OF BLOCK b1.




*&---------------------------------------------------------------------*
*&  Include           ZPPR9050ALV
*&---------------------------------------------------------------------*
CLASS: lcl_alv_grid_0100       DEFINITION DEFERRED.

*& 상수를 선언한다.
DATA: gc_container_0100   TYPE scrfname VALUE 'CONTAINER_0100'.

*& 변수를 선언한다.
DATA: gv_container        TYPE scrfname VALUE space.

*& Alv관련 구조체/IT를 선언한다.
DATA: gs_scroll           TYPE lvc_s_stbl,
      gs_fieldcat         TYPE lvc_s_fcat.

*& 100화면
DATA: gs_grid_0100        TYPE REF TO lcl_alv_grid_0100,
      gt_sort_0100        TYPE lvc_t_sort,
      gs_layout_0100      TYPE lvc_s_layo,
      gs_variant_0100     TYPE disvariant,
      gt_exclude_0100     TYPE ui_functions,
      gt_fieldcat_0100    TYPE lvc_t_fcat,
      gs_container_0100   TYPE REF TO cl_gui_custom_container.

*----------------------------------------------------------------------*
*       CLASS lcl_alv_grid_0100  DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_alv_grid_0100 DEFINITION INHERITING FROM cl_gui_alv_grid.
  PUBLIC SECTION.
    METHODS: set_optimize_all_cols_0100,
             set_cursor_0100  IMPORTING row     TYPE i
                                        col     TYPE i,
             set_fixed_column_0100,
             set_row_resize_0100.
ENDCLASS.                    " lcl_alv_grid_0100 DEFINITION

*----------------------------------------------------------------------*
*       CLASS lcl_alv_grid_0100  IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_alv_grid_0100 IMPLEMENTATION.
  METHOD set_optimize_all_cols_0100.
    CALL METHOD me->optimize_all_cols
         EXPORTING
              include_header    = 1.
  ENDMETHOD.                    " set_optimize_all_cols_0100
*
  METHOD set_cursor_0100.
    CALL METHOD me->set_current_cell_base
         EXPORTING
              row              = row
              col              = col.
  ENDMETHOD.                    " set_cursor_0100
*
  METHOD set_fixed_column_0100.
    CALL METHOD me->set_fixed_cols
         EXPORTING
              cols            = 4.
  ENDMETHOD.                    " set_fixed_column_0100
*
  METHOD set_row_resize_0100.
    CALL METHOD me->set_resize_rows
         EXPORTING
              enable          = 1.
  ENDMETHOD.                    " set_row_resize_0100
ENDCLASS.                    " lcl_alv_grid_0100 IMPLEMENTATION



*&---------------------------------------------------------------------*
*&  Include           ZOOM9990ENT
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&    START-OF-SELECTION
*&---------------------------------------------------------------------*
START-OF-SELECTION.

  PERFORM read_data_from_ztoo9990.  "데이타 Select

*&---------------------------------------------------------------------*
*&    END-OF-SELECTION
*&---------------------------------------------------------------------*
END-OF-SELECTION.
  CALL SCREEN '0100'.



*&---------------------------------------------------------*
***INCLUDE ZOOM9990O01 .
*&---------------------------------------------------------*
*&---------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------*

MODULE status_0100 OUTPUT.
  SET PF-STATUS '0100'.
  SET TITLEBAR '0100'.

ENDMODULE.                 " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*
*&      Module  INIT_CONTAINER_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module INIT_CONTAINER_0100 output.
  CHECK gs_container_0100 IS INITIAL.

  PERFORM create_init_0100.
endmodule.                 " INIT_CONTAINER_0100  OUTPUT



*----------------------------------------------------------------------*
***INCLUDE ZOOM9990I01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  EXIT_0100  INPUT
*&---------------------------------------------------------------------*
MODULE exit_0100 INPUT.

  CASE sy-ucomm.
    WHEN '&BACK' OR '&CANC' OR '&EXIT'.
      LEAVE TO SCREEN 0.
  ENDCASE.

ENDMODULE.                 " EXIT_0100  INPUT




*----------------------------------------------------------------------*
***INCLUDE ZOOM9990F01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Form  READ_DATA_FROM_ZTOO9990
*&---------------------------------------------------------------------*

FORM read_data_from_ztoo9990 .

  CLEAR: gt_data[].

  SELECT ekorg  brand  saisj  saiso
         matnr  zseqnr datim  lifnr  lifnr
         reqty  meins  reqdt
  INTO  CORRESPONDING FIELDS OF TABLE gt_data
*   INTO  TABLE gt_data
  FROM  ztoo9990
  WHERE ekorg = pa_org
  AND   brand = pa_brand
  AND   saisj = pa_saisj
  AND   saiso = pa_saiso.


  LOOP AT gt_data  ASSIGNING <data>.
    PERFORM search_lifnr_name  USING <data>-lifnr   "거래처코드
                     CHANGING <data>-lifnm.       "거래처명
  ENDLOOP.

ENDFORM.                    " READ_DATA_FROM_ZTOO9990

*&---------------------------------------------------------------------*
*&      Form  CREATE_INIT_0100
*&---------------------------------------------------------------------*

FORM create_init_0100 .
  CLEAR: gs_layout_0100, gt_fieldcat_0100[], gt_exclude_0100[],
           gt_sort_0100[].

  CREATE OBJECT gs_container_0100
    EXPORTING
      container_name = gc_container_0100.

  CREATE OBJECT gs_grid_0100
    EXPORTING
      i_parent = gs_container_0100.

  gs_layout_0100-cwidth_opt = 'X'.
  gs_layout_0100-zebra = 'X'.
  gs_layout_0100-sel_mode = 'D'.

  gs_variant_0100-report = sy-repid.

  PERFORM build_fieldcat_0100.
  PERFORM exclude_tb_functions  CHANGING gt_exclude_0100.

  CALL METHOD gs_grid_0100->set_table_for_first_display
    EXPORTING
      is_layout            = gs_layout_0100
      it_toolbar_excluding = gt_exclude_0100
      is_variant           = gs_variant_0100
      i_save               = 'A'
    CHANGING
      it_fieldcatalog      = gt_fieldcat_0100
      it_sort              = gt_sort_0100
      it_outtab            = gt_data[].

  CALL METHOD gs_grid_0100->register_edit_event
    EXPORTING
      i_event_id = cl_gui_alv_grid=>mc_evt_modified.

  CALL METHOD gs_grid_0100->set_toolbar_interactive.

ENDFORM.                    " CREATE_INIT_0100
*&---------------------------------------------------------------------*
*&      Form  BUILD_FIELDCAT_0100
*&---------------------------------------------------------------------*

FORM build_fieldcat_0100 .
  DATA:   ls_fcat             TYPE slis_fieldcat_alv,
          lt_fcat             TYPE slis_t_fieldcat_alv.

  CLEAR: lt_fcat[], gt_fieldcat_0100[].

  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = 'GT_DATA'
      i_inclname             = sy-repid
    CHANGING
      ct_fieldcat            = lt_fcat
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.

  LOOP AT lt_fcat  INTO ls_fcat.
    CLEAR: gs_fieldcat.
    MOVE-CORRESPONDING ls_fcat  TO gs_fieldcat.

    CASE gs_fieldcat-fieldname.

      WHEN 'EKORG'.
        gs_fieldcat-outputlen = '4'.
        ls_fcat-seltext_l = '구매조직'.
      WHEN 'BRAND'.
        gs_fieldcat-outputlen = '2'.
        ls_fcat-seltext_l = '브랜드'.
      WHEN 'SAISJ'.
        gs_fieldcat-outputlen = '4'.
        ls_fcat-seltext_l = '년도'.
      WHEN 'SAISO'.
        gs_fieldcat-outputlen = '1'.
        ls_fcat-seltext_l = '시즌'.
      WHEN 'MATNR'.
        gs_fieldcat-outputlen = '10'.
        ls_fcat-seltext_l = '스타일'.
      WHEN 'ZSEQNR'.
        gs_fieldcat-outputlen = '2'.
        ls_fcat-seltext_l = '차수'.
      WHEN 'LIFNR'.
        gs_fieldcat-outputlen = '10'.
        ls_fcat-seltext_l = '거래처코드'.
      WHEN 'LIFNM'.
        gs_fieldcat-outputlen = '20'.
        ls_fcat-seltext_l = '거래처명'.
      WHEN 'REQTY'.
        gs_fieldcat-outputlen = '13'.
        ls_fcat-seltext_l = '수량'.
      WHEN 'MEINS'.
        gs_fieldcat-outputlen = '3'.
        ls_fcat-seltext_l = '단위'.
      WHEN 'REQDT'.
        gs_fieldcat-outputlen = '8'.
        ls_fcat-seltext_l = '입고예정일'.
      WHEN OTHERS.
        DELETE lt_fcat INDEX sy-tabix.
        CONTINUE.

    ENDCASE.

    gs_fieldcat-scrtext_l = ls_fcat-seltext_l.
    gs_fieldcat-colddictxt = 'L'.

    APPEND gs_fieldcat  TO gt_fieldcat_0100.
  ENDLOOP.

ENDFORM.                    " BUILD_FIELDCAT_0100
*&---------------------------------------------------------------------*
*&      Form  EXCLUDE_TB_FUNCTIONS
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      <--P_GT_EXCLUDE_0100  text
*----------------------------------------------------------------------*
FORM exclude_tb_functions  CHANGING pt_exclude  TYPE ui_functions.
  DATA: ls_exclude             TYPE ui_func.

  ls_exclude = cl_gui_alv_grid=>mc_fc_detail.
  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_fc_find.
*  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_check.
  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
*  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
*  APPEND ls_exclude TO pt_exclude.
*
*  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
*  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_fc_refresh.
*  APPEND ls_exclude TO pt_exclude.
*
*  ls_exclude = cl_gui_alv_grid=>mc_fc_sort_asc.
*  APPEND ls_exclude TO pt_exclude.
*
*  ls_exclude = cl_gui_alv_grid=>mc_fc_sort_dsc.
*  APPEND ls_exclude TO pt_exclude.
*
  ls_exclude = cl_gui_alv_grid=>mc_fc_print.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_graph.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_views.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_mb_export.
*  APPEND ls_exclude TO pt_exclude.

*  ls_exclude = cl_gui_alv_grid=>mc_mb_filter.
*  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
  APPEND ls_exclude TO pt_exclude.

  ls_exclude = cl_gui_alv_grid=>mc_fc_info.
  APPEND ls_exclude TO pt_exclude.


ENDFORM.                    " EXCLUDE_TB_FUNCTIONS
*&---------------------------------------------------------------------*
*&      Form  SEARCH_LIFNR_NAME
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_<DATA>_LIFNR  text
*      <--P_<DATA>_LIFNM  text
*----------------------------------------------------------------------*
FORM search_lifnr_name  USING    p_gt_data_lifnr
                        CHANGING p_gt_data_lifnm.

  DATA: l_name1 LIKE lfa1-name1.

  SELECT SINGLE name1
    INTO l_name1
    FROM lfa1
    WHERE lifnr = p_gt_data_lifnr.

  IF sy-subrc = 0.
    MOVE l_name1 TO p_gt_data_lifnm.
  ENDIF.

ENDFORM.                    " SEARCH_LIFNR_NAME

Posted by SAP HANA Brian.

댓글을 달아 주세요

사용자 삽입 이미지

사용자 삽입 이미지
Posted by SAP HANA Brian.

댓글을 달아 주세요

사용자 삽입 이미지
Posted by SAP HANA Brian.

댓글을 달아 주세요

사용자 삽입 이미지
Posted by SAP HANA Brian.

댓글을 달아 주세요

사용자 삽입 이미지

사용자 삽입 이미지


사용자 삽입 이미지
Posted by SAP HANA Brian.

댓글을 달아 주세요

1)     트랜잭션 코드 SE11 입력 - Maintenance 할 테이블 명 입력

2)     메뉴 - 유틸리티 테이블유지보수생성기 선택

사용자 삽입 이미지



   
사용자 삽입 이미지

3)     권한그룹 권한그룹제외 선택

4)     Function 그룹 : 개발클래스 명 입력

5)     유지보수 유형 한단계 마스터성

              두단계 그리드와 입력폼 두개로 존재

6)     화면유지보수 : 상단 화면번호찾기클릭하면 자동으로 번호가셋팅 된다

7)     상단 생성버튼 클릭

8)     트랜잭션코드 SE93 입력 후 엔터

-       내역입력 후 오브젝트 “Transaction with parameters” 선택

 

사용자 삽입 이미지
 

9)     트랜잭션텍스트 입력 , 트랜잭션 “SM30” 입력

화면필드 : VIEWNAME, UPDATE 선택

: ZTIM0010(테이블명), ‘X’ 입력


사용자 삽입 이미지

Posted by SAP HANA Brian.

댓글을 달아 주세요

  1. 2014.01.13 18:06  댓글주소  수정/삭제  댓글쓰기

    비밀댓글입니다