Tengo el siguiente codigo, pero no me carga los datos en el archivo, favor si pueden ayudarme a corregir el error
gracias
TABLES: ZTHR_USUA_EMPL,PA0001,PA0002,PA0032.
DATA: BEGIN OF T_DATA1 OCCURS 0,
T_BURKS LIKE ZTHR_USUA_EMPL-BUKRS,
T_PERNR LIKE ZTHR_USUA_EMPL-PERNR,
T_ORGEH LIKE PA0001-ORGEH,
T_NACHN LIKE PA0002-NACHN,
T_VORNA LIKE PA0002-VORNA,
T_GEBNR LIKE PA0032-GEBNR,
T_ZIMNR LIKE PA0032-ZIMNR,
END OF T_DATA1.
DATA: BEGIN OF T_CORREO OCCURS 100,
var type string,
END OF T_CORREO.
SELECT
ZTHR_USUA_EMPL~BUKRS
ZTHR_USUA_EMPL~PERNR
PA0001~ORGEH
PA0002~NACHN
PA0002~VORNA
PA0032~GEBNR
PA0032~ZIMNR
INTO TABLE T_DATA1
FROM ZTHR_USUA_EMPL
INNER JOIN PA0001 ON
ZTHR_USUA_EMPL~PERNR = PA0001~PERNR
AND endda ='99991231'
INNER JOIN PA0002 ON
ZTHR_USUA_EMPL~PERNR = PA0002~PERNR
AND PA0002~endda ='99991231'
INNER JOIN PA0032 ON
ZTHR_USUA_EMPL~PERNR = PA0032~PERNR
AND PA0032~endda ='99991231'.
* *WHERE ZTHR_USUA_EMPL~BUKRS IN S_TSOC
* AND ZTHR_USUA_EMPL~PERNR IN S_TEMPL.
CONCATENATE T_DATA1-T_ORGEH T_DATA1-T_NACHN T_DATA1-T_PERNR INTO T_CORREO-VAR.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
* BIN_FILESIZE = ' '
* CODEPAGE = ' '
FILENAME = 'D:\Users\Ialcala\My Documents\Irua\txt\prueba.txt'
FILETYPE = 'ASC'
* ITEM = ' '
* MODE = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* FILEMASK_MASK = ' '
* FILEMASK_TEXT = ' '
* FILETYPE_NO_CHANGE = ' '
* FILEMASK_ALL = ' '
* FILETYPE_NO_SHOW = ' '
* SILENT = 'S'
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
* IMPORTING
* ACT_FILENAME =
* ACT_FILETYPE =
* FILESIZE =
* CANCEL =
TABLES
DATA_TAB = t_correo
* FIELDNAMES =
* EXCEPTIONS
* INVALID_FILESIZE = 1
* INVALID_TABLE_WIDTH = 2
* INVALID_TYPE = 3
* NO_BATCH = 4
* UNKNOWN_ERROR = 5
* GUI_REFUSE_FILETRANSFER = 6
* OTHERS = 7
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.