09-15-2014 6:58 AM
Hi,
I am uploading a file in application server using open data set. The application server path is given in the selection screen. How can i name the file dynamically while it is getting uploaded in the application server?
09-15-2014 7:29 AM
Hi,
Thanks for the reply.
But the condition here is, multiple pdf are being generated and i have to give seperate names to each pdf and then upload it into al11.
09-15-2014 7:19 AM
Hi Sri,
You can give it any name you want for a new file, so you just need to concatenate the path with whatever you want to name the file whatever you want, ie:
*concatenates path + constant "/myfile/" + system date
lv_file = |{ p_path }/myfile/{ sy-datum }|.
OPEN DATASET lv_file FOR OUTPUT.
09-15-2014 7:23 AM
Hi Shristi,
Put your condition before your open dataset code
If sy-name = x.
v_file = whatever name you want.
Endif.
OPEN DATASET v_file FOR OUTPUT IN TEXT MODE.
Thanks.
09-15-2014 7:29 AM
Hi,
Thanks for the reply.
But the condition here is, multiple pdf are being generated and i have to give seperate names to each pdf and then upload it into al11.
09-15-2014 7:40 AM
Hi Shristi,
So multiple pdf is displaying data from different internal tables right?
CASE 'PDF1'.
file = 'X'
OPEN DATASET v_file FOR OUTPUT IN TEXT MODE.
TRANSFER `1234567890` TO file.
CLOSE DATASET file.
CASE 'PDF2'.
OPEN DATASET v_file FOR OUTPUT IN TEXT MODE.
file = 'y'.
TRANSFER `1234567890` TO file.
CLOSE DATASET file.
and so on.
09-15-2014 7:42 AM
Regards,
Philip.
09-15-2014 7:47 AM
As I said, you can concatenate whatever you want to file name. You can concatenate sy-uname / sy-uzeit as mention before (just don't forget to use get time before this or you may have same uzeit and even this is not guaranteed), or you can create a counter variable and concatenate this counter as well (guaranteed you will not have same filename)
09-15-2014 10:24 AM