08-20-2010 10:16 AM
Hi Alll,
CALL FUNCTION 'UPLOAD_FILES'
EXPORTING
I_TRUNCLEN = ' '
I_FILETYPE =
I_XPC =
TABLES
FILE_ALL =
TAB_FILE =
EXCEPTIONS
ERROR_FILE = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
what we have to fill in all these parameters
in file all does I have to provide all the file names using comma or only a space.
08-20-2010 1:49 PM
Hi Ravi, i think you need to upload the files to table 'TAB_FILE' and not in 'FILE_ALL'.
check below code.
data :lt_rlgrap type table of rlgrap,
ls_rlgrap type rlgrap.
data : lv_xpc type RF02B-BANKXFPR value 'X'.
DATA : lt_itab TYPE standard table of BUT000.
data : asc type RLGRAP-FILETYPE value 'ASC'.
PARAMETERS : p_file type rlgrap-filename default '<path>'.
" above is to select the single file.
" if you want to select multiple files the use select-options.
ls_rlgrap-filename = p_file.
append ls_rlgrap to lt_rlgrap.
" lt_rlgrap will hold the all files which you have selected
CALL FUNCTION 'UPLOAD_FILES'
EXPORTING
* I_TRUNCLEN = ' '
i_filetype = asc
i_xpc = lv_xpc
tables
file_all = lt_itab "data will be uploaded to this internal table
tab_file = lt_rlgrap.
Hope this is useful.
Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:19 PM
Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:22 PM
08-20-2010 1:49 PM
Hi Ravi, i think you need to upload the files to table 'TAB_FILE' and not in 'FILE_ALL'.
check below code.
data :lt_rlgrap type table of rlgrap,
ls_rlgrap type rlgrap.
data : lv_xpc type RF02B-BANKXFPR value 'X'.
DATA : lt_itab TYPE standard table of BUT000.
data : asc type RLGRAP-FILETYPE value 'ASC'.
PARAMETERS : p_file type rlgrap-filename default '<path>'.
" above is to select the single file.
" if you want to select multiple files the use select-options.
ls_rlgrap-filename = p_file.
append ls_rlgrap to lt_rlgrap.
" lt_rlgrap will hold the all files which you have selected
CALL FUNCTION 'UPLOAD_FILES'
EXPORTING
* I_TRUNCLEN = ' '
i_filetype = asc
i_xpc = lv_xpc
tables
file_all = lt_itab "data will be uploaded to this internal table
tab_file = lt_rlgrap.
Hope this is useful.
Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:19 PM
Edited by: Kishore Kumar Vemula on Aug 20, 2010 6:22 PM
08-20-2010 2:07 PM
Thanks Kishore,
Your answer helped me to solve my requirement.
Thanks