*&---------------------------------------------------------------------*
*& Report ZWUFEIDOWNLOAD
*&
*&---------------------------------------------------------------------*
*&
*&
wufei
*&---------------------------------------------------------------------*
*& Report
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZWUFEIDOWNLOAD.
*
*REPORT ZREPORTDOWN .
TABLES:TRDIR,TEXTPOOL.
DATA: BEGIN OF TTAB OCCURS 50.
INCLUDE STRUCTURE TEXTPOOL.
DATA: END OF TTAB.
DATA CODE(255) OCCURS 10.
DATA:PGNAME LIKE RLGRAP-FILENAME,LNCNT TYPE I,SLGTH TYPE I,PFNAME(80),
COMMENT(40).
DATA:BEGIN OF PGTAB OCCURS 100.
INCLUDE STRUCTURE TRDIR.
DATA:END OF PGTAB.
DATA:BEGIN OF FILELIST OCCURS 0,
PGNAME LIKE
RLGRAP-FILENAME,
DESCTXT(80),
CNAM LIKE
TRDIR-CNAM,
CDAT LIKE
SY-DATUM,
END OF
FILELIST.
SELECT-OPTIONS IPGNAME FOR TRDIR-NAME.
PARAMETERS:PATHNAME LIKE RLGRAP-FILENAME.
DATA SS(1).
DATA TOTAL_COUNTER TYPE I.
DATA: PERCENT TYPE P DECIMALS 2.
DATA MSGTXT(60).
DATA PPERCENT_S(10).
DESCRIBE TABLE IPGNAME LINES LNCNT.
IF LNCNT = 0.
SELECT * FROM TRDIR INTO TABLE PGTAB WHERE NAME
LIKE
'Z%
'.
ELSE.
SELECT * FROM TRDIR INTO TABLE PGTAB WHERE NAME
IN IPGNAME.
ENDIF.
*REPORT ZREPORTDOWN .
TABLES:TRDIR,TEXTPOOL.
DATA: BEGIN OF TTAB OCCURS 50.
DATA: END OF TTAB.
DATA CODE(255) OCCURS 10.
DATA:PGNAME LIKE RLGRAP-FILENAME,LNCNT TYPE I,SLGTH TYPE I,PFNAME(80),
DATA:BEGIN OF PGTAB OCCURS 100.
DATA:END OF PGTAB.
DATA:BEGIN OF FILELIST OCCURS 0,
SELECT-OPTIONS IPGNAME FOR TRDIR-NAME.
PARAMETERS:PATHNAME LIKE RLGRAP-FILENAME.
DATA
DATA
DATA: PERCENT TYPE P DECIMALS 2.
DATA
DATA
DESCRIBE TABLE IPGNAME LINES LNCNT.
IF LNCNT = 0.
ELSE.
ENDIF.
*SLGTH = STRLEN( PATHNAME ) - 1.
*SS = PATHNAME+SLGTH(1).
*IF SS NE '\'.
* SLGTH = SLGTH + 1.
* WRITE '\' TO
PATHNAME+SLGTH.
*ENDIF.
*SLGTH = SLGTH + 1.
DESCRIBE TABLE PGTAB LINES TOTAL_COUNTER.
*SS = PATHNAME+SLGTH(1).
*IF SS NE '\'.
*
*
*ENDIF.
*SLGTH = SLGTH + 1.
DESCRIBE TABLE PGTAB LINES TOTAL_COUNTER.
LOOP AT PGTAB.
ENDLOOP.
CLEAR PGNAME.
CONCATENATE PATHNAME 'FILELIST.TXT' INTO PGNAME.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME
= PGNAME
FILETYPE
= 'DAT'
TABLES
DATA_TAB
= FILELIST
EXCEPTIONS
FILE_OPEN_ERROR
= 1
FILE_WRITE_ERROR
= 2
INVALID_FILESIZE
= 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE
= 5.
CLEAR PGNAME.
CONCATENATE PATHNAME 'FILELIST.TXT' INTO PGNAME.
*****&&&&&DELETE TABLE VALUE&&&&&*****
*&-------------------------------------------------------------------- -*
*&
*&-------------------------------------------------------------------- -*
*
*--------------------------------------------------------------------- -*
*
*
*--------------------------------------------------------------------- -*
FORM CALL_INDICATOR.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
ENDFORM.