Hi all,
i am stucked at one point while uploading file from desktop to application server.
I have uploaded multiple files but not able to save them with different names. when i upload files i have to save them dynamically with their names.for ex:
if i have uploaded 3 files together..abc.txt,,abc1.txt,,abc2.txt...
then they should save at server with their names...but
the logic that i have built is appending all the data in one file..
the logic of my code is::;
DATA: BEGIN OF t_itab OCCURS 0,
file(1000) type c,
END OF t_itab.
select-options l_file for rlgrap-filename no intervals.
loop at l_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = l_file-low
FILETYPE = 'ASC'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
TABLES
data_tab = t_itab
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
open dataset in_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT t_itab.
TRANSFER t_itab TO in_file .
ENDLOOP.
if sy-subrc eq 0.
write:/ 'success'.
endif.
CLOSE DATASET in_file.
endloop.
this is the logic that i have built. its working good but appending the data into one file...
plz can anyone should suggest the corrections for that..means to say the logic..
thanks in advance