Hello,
I have a webdynpro that basically does some logic with some data and at the end of this logic I have a requirement to download a file to a users local directory (e.g., c:\temp\testdir) without them having to answer prompts to save/open.
This code saves my excel file but it saves it to my downloads area and NOT c:\temp ..... it saves it with the filename c_temp_gotcha.xls and it prompts the user "Do you want to open or save"
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'c:\temp\gotcha.xls'
i_content = xstr
i_mime_type = 'EXCEL'
i_in_new_window = abap_false
i_in_place = abap_false.
I want to specific the directory (hardcoding is fine) so it does not just save to my downloads folder and I don't want it to prompt the user. I see lots of posts on SCN, but I cannot find the answer to this.
Does anyone know the answer or have an alternative way of doing this ... I just want to save the file to a directory ... simple, right?? Specifics and sample code would be appreciated. thx!!