‎2008 Oct 24 2:05 PM
Hi,
I am looking for the easiest way to upload a ".CSV" file from the application server and to save the the same file with another name in the same folder on the application server again.
At the moment I only find the way over datasets.
Is there another one?
Yes? Cool! - how?
Thanks in advance.
‎2008 Oct 24 2:48 PM
Hi ,
Use the Open dataset , READ DATASET and close dataset.
Regards,
Bharani
‎2008 Oct 24 2:44 PM
Use of DATASET is fairly easy - for what reason do you not want to use that?
‎2008 Oct 24 2:48 PM
Hi ,
Use the Open dataset , READ DATASET and close dataset.
Regards,
Bharani
‎2008 Oct 24 7:16 PM
hi Heiko,
The other posters are correct, particularly since you want to save a second file back to your application server. I tried many was, and the only successful option was to use OPEN DATASET ... CLOSE DATASET
DATA: dsn(40).
DATA: wa_itab like line of itab.
OPEN DATASET dsn FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT ITAB INTO wa_itab.
TRANSFER wa_itab TO dsn.
ENDLOOP.
ENDIF.
CLOSE DATASET dsn.
‎2008 Oct 28 2:51 PM
I found it.
To rename a file on the windows filesystem you have to use the SAP function 'SXPG_CALL_SYSTEM'.
It works.