*&---------------------------------------------------------------------*
*& Include YABAP18_TEMP_TOP
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Include
*----------------------------------------------------------------------*
INCLUDE : <ICON>, OLE2INCL. " OLE STANDARD 공통구문
TYPE-POOLS: SSCR.
*----------------------------------------------------------------------*
* Tables
*----------------------------------------------------------------------*
TABLES : SSCRFIELDS. "선택화면의 필드
*----------------------------------------------------------------------*
* Types
*----------------------------------------------------------------------*
TYPES :
BEGIN OF STOCK_INVENTORY_S,
BWKEY TYPE BWKEY, "평가 영역
WERKS TYPE WERKS_D, "플랜트
MATNR TYPE MATNR, "자재 번호
CHARG TYPE CHARG_D, "배치 번호
ENDMENGE TYPE UC_QUANT, "FINAL QUANTITY
ANFMENGE TYPE UC_QUANT, "STARTING QUANTITY
MEINS TYPE MEINS, "기본 단위
SOLL TYPE UC_QUANT, "EXPECTED QUANTITY
HABEN TYPE UC_QUANT, "ACTUAL QUANTITY
MAKTX TYPE MAKTX, "자재 내역
END OF STOCK_INVENTORY_S.
DATA: GT_STOCK_INVENTORY_S TYPE TABLE OF STOCK_INVENTORY_S.
*----------------------------------------------------------------------*
* Contants 'Prefix all constants with CO_'
*----------------------------------------------------------------------*
CONSTANTS : CO_0(1) VALUE '0',
CO_1(1) VALUE '1',
CO_A(1) VALUE 'A',
CO_C(1) VALUE 'C',
CO_E(1) VALUE 'E',
CO_M(1) VALUE 'M',
CO_X(1) VALUE 'X'.
CONSTANTS : CO_TEMP(20) VALUE 'ZDCO_GB_TEMP'.
*----------------------------------------------------------------------*
* Field Symbols
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Range Value 'Prefix all constants with RA_'
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Internal Table & Variables
*----------------------------------------------------------------------*
* Use the follwing prefixes:
* GT_ : Internal tables
* GS_ : General work areas
* GV_ : Global Area Variance / Flags / Switchs
** Message
DATA : GV_MESSAGE TYPE STRING.
** Message
DATA : GT_MSG TYPE TABLE OF BAL_S_MSG, "처리 결과 메세지 처리
GS_MSG TYPE BAL_S_MSG. "처리 결과 메세지 처리
** Gobal internal Table
"Main.
DATA: BEGIN OF GT_OUTTAB OCCURS 0.
INCLUDE STRUCTURE ZCOTGB0060.
DATA: CELLTAB TYPE LVC_T_STYL.
DATA: END OF GT_OUTTAB.
DATA : GS_OUTTAB LIKE LINE OF GT_OUTTAB.
** Gobal Variance
DATA : GV_CHECK(1),
GV_ERROR(1). "에러 체크.
** Master Data internal Table
*----------------------------------------------------------------------*
* Macro
*----------------------------------------------------------------------*
DATA : GT_FCODE TYPE TABLE OF FCODE,
GS_FCODE TYPE FCODE.
DEFINE _FILL_EXCLUDE_FCODE.
CLEAR : GS_FCODE.
GS_FCODE = &1.
APPEND GS_FCODE TO GT_FCODE.
END-OF-DEFINITION.
DEFINE _SET_RANGES.
CLEAR &1.
&1-SIGN = &2.
&1-OPTION = &3.
&1-LOW = &4.
&1-HIGH = &5.
APPEND &1.
END-OF-DEFINITION.
*-- CLEAR 구문 MACOR
DEFINE _CLEAR.
CLEAR: &1, &1[].
END-OF-DEFINITION.
*----------------------------------------------------------------------*
* Search Help
*----------------------------------------------------------------------*
DATA : GT_HELP_F LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF GT_VALUE_T OCCURS 0,
FIELDNAME LIKE HELP_VALUE-FIELDNAME,
END OF GT_VALUE_T.
DATA : GT_VTAB LIKE HELP_VTAB OCCURS 0 WITH HEADER LINE.
*----------------------------------------------------------------------*
* Excel Upload
*----------------------------------------------------------------------*
CONSTANTS: "Web Storage ID( Excel Templete )
CO_TEMPLETE_ID TYPE WWWDATA-OBJID VALUE 'ZPPR0140'.
* Internal table to hold excel file data
DATA : GT_EXCEL LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*----------------------------------------------------------------------*
* BDC
*----------------------------------------------------------------------*
DATA : GT_BDCDATA LIKE TABLE OF BDCDATA WITH HEADER LINE,
GT_MESSTAB LIKE TABLE OF BDCMSGCOLL WITH HEADER LINE,
GS_BDC_OPT LIKE CTU_PARAMS .
*----------------------------------------------------------------------*
* SMARTFORMS
*----------------------------------------------------------------------*
DATA : GS_OUTPUT_OPTION TYPE SSFCOMPOP,
GS_PRINT_OPTION TYPE SSFCTRLOP,
GS_JOB_OUTPUT_INFO TYPE SSFCRESCL,
GS_FM_NAME TYPE RS38L_FNAM,
GS_RETURN TYPE BAPIRET2.
*----------------------------------------------------------------------*
* Alv Download Excel_OLE
*----------------------------------------------------------------------*
DATA : GV_OLE_EXCEL TYPE OLE2_OBJECT,
GV_OLE_BOOKS TYPE OLE2_OBJECT,
GV_OLE_FILE TYPE OLE2_OBJECT,
GV_OLE_SHEET TYPE OLE2_OBJECT,
GV_OLE_CELL TYPE OLE2_OBJECT,
GV_OLE_FONT TYPE OLE2_OBJECT,
GV_CPAGE TYPE I.
DATA : GV_FILENAME TYPE STRING,
GV_PATH TYPE STRING,
GV_FULLPATH TYPE STRING.
DATA : GV_CNTA TYPE I VALUE '4',
GV_CNTB TYPE I VALUE '1'.
DATA: BEGIN OF GT_OLE_DATA OCCURS 0,
F1 LIKE ALSMEX_TABLINE-VALUE,
F2 LIKE ALSMEX_TABLINE-VALUE,
F3 LIKE ALSMEX_TABLINE-VALUE,
F4 LIKE ALSMEX_TABLINE-VALUE,
F5 LIKE ALSMEX_TABLINE-VALUE,
F6 LIKE ALSMEX_TABLINE-VALUE,
F7 LIKE ALSMEX_TABLINE-VALUE,
F8 LIKE ALSMEX_TABLINE-VALUE,
F9 LIKE ALSMEX_TABLINE-VALUE,
F10 LIKE ALSMEX_TABLINE-VALUE,
F11 LIKE ALSMEX_TABLINE-VALUE,
F12 LIKE ALSMEX_TABLINE-VALUE,
F13 LIKE ALSMEX_TABLINE-VALUE,
F14 LIKE ALSMEX_TABLINE-VALUE,
F15 LIKE ALSMEX_TABLINE-VALUE,
F16 LIKE ALSMEX_TABLINE-VALUE,
F17 LIKE ALSMEX_TABLINE-VALUE,
F18 LIKE ALSMEX_TABLINE-VALUE,
F19 LIKE ALSMEX_TABLINE-VALUE,
F20 LIKE ALSMEX_TABLINE-VALUE,
F21 LIKE ALSMEX_TABLINE-VALUE,
F22 LIKE ALSMEX_TABLINE-VALUE,
F23 LIKE ALSMEX_TABLINE-VALUE,
F24 LIKE ALSMEX_TABLINE-VALUE,
F25 LIKE ALSMEX_TABLINE-VALUE,
F26 LIKE ALSMEX_TABLINE-VALUE,
F27 LIKE ALSMEX_TABLINE-VALUE,
F28 LIKE ALSMEX_TABLINE-VALUE,
F29 LIKE ALSMEX_TABLINE-VALUE,
F30 LIKE ALSMEX_TABLINE-VALUE,
END OF GT_OLE_DATA.
*----------------------------------------------------------------------*
* ZCO_GB_EXCEL_TO_ITAB Function을 위한 변수
*----------------------------------------------------------------------*
TYPE-POOLS: OLE2.
DATA: BEGIN OF GS_LJW,
ROW(6) TYPE N,
COL(6) TYPE N,
VALUE(255),
END OF GS_LJW.
* value of excel-cell
TYPES: TY_D_ITABVALUE(255), "TYPE ALSMEX_TABLINE-VALUE,
* internal table containing the excel data
TY_T_ITAB LIKE GS_LJW OCCURS 0, "TYPE ALSMEX_TABLINE OCCURS 0,
* line type of sender table
BEGIN OF TY_S_SENDERLINE,
LINE(4096) TYPE C,
END OF TY_S_SENDERLINE,
* sender table
TY_T_SENDER TYPE TY_S_SENDERLINE OCCURS 0.
CONSTANTS: GC_ESC VALUE '"'.
----------------------------------------------------------------------------------
Extracted by Mass Download version 1.4.6 - E.G.Mellodew. 1998-2015. Sap Release 701
Abap