********************************************************************
* System : ERP项目
* Module : SJ-
* ProgramID : ZIMA0024
* Program : 设计差旅费补偿收入导入
* Author :
* Date : 2014年11月22日
* Description : 设计差旅费补偿收入导入
********************************************************************
REPORT ZIMA0024 NO STANDARD PAGE HEADING MESSAGE-ID ZDEV .
**----------------------------------------------------------------------*
** ALV数据定义
**----------------------------------------------------------------------*
TYPE-POOLS :SLIS .
DATA : GS_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV ,
GS_EVENTS TYPE LINE OF SLIS_T_EVENT ,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV .
DATA : GT_FIELDCAT LIKE GS_FIELDCAT OCCURS 0 ,
GT_EVENTS LIKE GS_EVENTS OCCURS 0 .
DATA : GV_REPID LIKE SY -REPID .
DATA : GV_ALV_TITLE TYPE LVC_TITLE ,
GV_ALV_HEADER ( 20 ) TYPE C .
**----------------------------------------------------------------------*
** 数据定义
**----------------------------------------------------------------------*
TABLES : ZSCH_T024 .
DATA : S_B1 ( 5 ) TYPE N .
DATA : BEGIN OF GTD_001 OCCURS 0 .
INCLUDE TYPE ZSCH_T024 .
DATA : ZXH ( 10 ) . "序号
DATA :POST1 LIKE PROJ -POST1 .
DATA :KTEXT LIKE CSKT -KTEXT .
DATA :ZDQMC LIKE ZHR_DQT -ZDQMC .
DATA :ZF_ZBMC LIKE ZSCH_T001 -TXT60 .
DATA : END OF GTD_001 .
DATA : GTH_001 LIKE GTD_001 .
DATA : GTD_003 LIKE STANDARD TABLE OF ZSCH_T024 WITH HEADER LINE .
DATA ZFISTL LIKE ZSCH_T024 -FISTL .
DATA : ITAB LIKE ALSMEX_TABLINE OCCURS 0 .
DATA : WA_ITAB LIKE ALSMEX_TABLINE .
DATA :Y ( 255 ) TYPE C .
CLEAR :GTD_001 ,GTD_001[] ,GTH_001 ,GTD_003 ,GTD_003[] ,ZFISTL .
DATA : NUMBER TYPE I . "修改记录
DATA :SCH ( 8 ) TYPE C .
DATA :BEGDA LIKE ZTT_SWB_HEADER -ERFDT .
DATA :ERFDT LIKE ZTT_SWB_HEADER -ERFDT .
CLEAR :BEGDA ,ERFDT .
DATA :FNAME TYPE NAME_LAST .
DATA :P_PSPID LIKE PROJ -PSPID .
DATA :P_KTEXT LIKE FMFCTRT -BEZEICH .
DATA :ZZDQBM LIKE ZHR_DQ -ZDQBM .
DATA : DBTAB_SYNTAX TYPE STRING ,
DBTAB_SYNTAX1 TYPE STRING ,
DBTAB_SYNTAX2 TYPE STRING .
DATA ZN ( 10 ) .
CLEAR :ZZDQBM ,P_PSPID ,P_KTEXT ,ZN .
TYPE-POOLS VRM .
DATA : NAME TYPE VRM_ID ,
LIST TYPE VRM_VALUES ,
VALUE LIKE LINE OF LIST .
**----------------------------------------------------------------------*
** 选择屏幕
**----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK BLK01 WITH FRAME TITLE TEXT - 002 .
PARAMETERS : OFFICE RADIOBUTTON GROUP G1 DEFAULT 'X' MODIF ID B01 ,
TXT RADIOBUTTON GROUP G1 MODIF ID B01 .
SELECTION-SCREEN END OF BLOCK BLK01 .
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT - 001 .
PARAMETERS : P_FNAME LIKE RLGRAP -FILENAME OBLIGATORY . " 文件路径
SELECTION-SCREEN END OF BLOCK BLK1 .
*******************************BEGIN*********************************************
DATA : L_EXIST .
* p_fname ='D\333.xls'.
CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
EXPORTING
FNAME = P_FNAME
IMPORTING
EXIST = L_EXIST
* ISDIR =
* FILESIZE =
EXCEPTIONS
FILEINFO_ERROR = 1
OTHERS = 2 .
IF SY -SUBRC <> 0 OR L_EXIST <> 'X' .
MESSAGE I398 ( 00 )
* System : ERP项目
* Module : SJ-
* ProgramID : ZIMA0024
* Program : 设计差旅费补偿收入导入
* Author :
* Date : 2014年11月22日
* Description : 设计差旅费补偿收入导入
********************************************************************
REPORT ZIMA0024 NO STANDARD PAGE HEADING MESSAGE-ID ZDEV .
**----------------------------------------------------------------------*
** ALV数据定义
**----------------------------------------------------------------------*
TYPE-POOLS :SLIS .
DATA : GS_FIELDCAT TYPE LINE OF SLIS_T_FIELDCAT_ALV ,
GS_EVENTS TYPE LINE OF SLIS_T_EVENT ,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV .
DATA : GT_FIELDCAT LIKE GS_FIELDCAT OCCURS 0 ,
GT_EVENTS LIKE GS_EVENTS OCCURS 0 .
DATA : GV_REPID LIKE SY -REPID .
DATA : GV_ALV_TITLE TYPE LVC_TITLE ,
GV_ALV_HEADER ( 20 ) TYPE C .
**----------------------------------------------------------------------*
** 数据定义
**----------------------------------------------------------------------*
TABLES : ZSCH_T024 .
DATA : S_B1 ( 5 ) TYPE N .
DATA : BEGIN OF GTD_001 OCCURS 0 .
INCLUDE TYPE ZSCH_T024 .
DATA : ZXH ( 10 ) . "序号
DATA :POST1 LIKE PROJ -POST1 .
DATA :KTEXT LIKE CSKT -KTEXT .
DATA :ZDQMC LIKE ZHR_DQT -ZDQMC .
DATA :ZF_ZBMC LIKE ZSCH_T001 -TXT60 .
DATA : END OF GTD_001 .
DATA : GTH_001 LIKE GTD_001 .
DATA : GTD_003 LIKE STANDARD TABLE OF ZSCH_T024 WITH HEADER LINE .
DATA ZFISTL LIKE ZSCH_T024 -FISTL .
DATA : ITAB LIKE ALSMEX_TABLINE OCCURS 0 .
DATA : WA_ITAB LIKE ALSMEX_TABLINE .
DATA :Y ( 255 ) TYPE C .
CLEAR :GTD_001 ,GTD_001[] ,GTH_001 ,GTD_003 ,GTD_003[] ,ZFISTL .
DATA : NUMBER TYPE I . "修改记录
DATA :SCH ( 8 ) TYPE C .
DATA :BEGDA LIKE ZTT_SWB_HEADER -ERFDT .
DATA :ERFDT LIKE ZTT_SWB_HEADER -ERFDT .
CLEAR :BEGDA ,ERFDT .
DATA :FNAME TYPE NAME_LAST .
DATA :P_PSPID LIKE PROJ -PSPID .
DATA :P_KTEXT LIKE FMFCTRT -BEZEICH .
DATA :ZZDQBM LIKE ZHR_DQ -ZDQBM .
DATA : DBTAB_SYNTAX TYPE STRING ,
DBTAB_SYNTAX1 TYPE STRING ,
DBTAB_SYNTAX2 TYPE STRING .
DATA ZN ( 10 ) .
CLEAR :ZZDQBM ,P_PSPID ,P_KTEXT ,ZN .
TYPE-POOLS VRM .
DATA : NAME TYPE VRM_ID ,
LIST TYPE VRM_VALUES ,
VALUE LIKE LINE OF LIST .
**----------------------------------------------------------------------*
** 选择屏幕
**----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK BLK01 WITH FRAME TITLE TEXT - 002 .
PARAMETERS : OFFICE RADIOBUTTON GROUP G1 DEFAULT 'X' MODIF ID B01 ,
TXT RADIOBUTTON GROUP G1 MODIF ID B01 .
SELECTION-SCREEN END OF BLOCK BLK01 .
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT - 001 .
PARAMETERS : P_FNAME LIKE RLGRAP -FILENAME OBLIGATORY . " 文件路径
SELECTION-SCREEN END OF BLOCK BLK1 .
*******************************BEGIN*********************************************
DATA : L_EXIST .
* p_fname ='D\333.xls'.
CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
EXPORTING
FNAME = P_FNAME
IMPORTING
EXIST = L_EXIST
* ISDIR =
* FILESIZE =
EXCEPTIONS
FILEINFO_ERROR = 1
OTHERS = 2 .
IF SY -SUBRC <> 0 OR L_EXIST <> 'X' .
MESSAGE I398 ( 00 )