cancel
Showing results for 
Search instead for 
Did you mean: 

Create a folder on the local machine

Former Member
0 Kudos

Hi experts,

I have a Web Dynpro in which I transfer an xstring to a file on the local machine:

OPEN DATASET lv_down_pfad_2 FOR OUTPUT IN BINARY MODE.

TRANSFER ls_upload_tabelle-file_value TO lv_down_pfad_2.

CLOSE DATASET lv_down_pfad_2.

the value of lv_down_pfad is C:\TEMP\

No i want to create a furser folder in the temp-folder. P.e. C:\TEMP\TEST

Is this possible in a Web Dynpro, and if so, how is it possible?

Thanks and greats.

Stephan

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This isn't really a web dynpro question since you are working with the file system of the application server. That is what you intended with the coding you have here - to write to the file system of the Application Server and not the Frontend machine?

The DATASET commands can't be used to create folders. You will need to setup an operating system command and call it. You can read more about the process here:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c4/3a6047505211d189550000e829fbbd/frameset.htm

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/0971e1543b11d1898e0000e8322d00/frameset.htm

Former Member
0 Kudos

Hello, Thomas. I think he's telling about presentation server, not application. Am I right, Stephan?

You could have used default sap gui folder for this, but from WD you can't even know where it is. And js is not allowed...

Interesting question!))

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Hello, Thomas. I think he's telling about presentation server, not application. Am I right, Stephan?

That's why I asked, becuase I was suspecious of the c:\ as well. Although on a Windows Based Application server that certainly is possible. However if he is talking about the presentation/frontend server then the DATASET commands aren't the way to go either. I think we need Stephan to clarify the situation.

Former Member
0 Kudos

Hi Constantin and Thomas,

Constantin are right, I want to create a folder on the presentation server, not on the application server.

I can't use the default sap gui folder, because it should be possible to start the Web Dynpro-Application on a System without a sap gui-installation.

the path i posted was not the whole path.

here is the excatly path, with the IP from the frontend-system:
10.10.50.106\c$\temp\

so is there no way to create automaticly a subfolder in the temp-folder when I push a button in the web dynpro, in which I can transer my file?

Thanks a lot

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Its seems a little odd that all of you desktop machines would have open/write enabled shares on the c drive - but I suppose if that is the case then you could use the Application Server to write to them. If you are following this approach, my earlier advice is applies. An external command should be able to create a directory using the same file share access.

Normally such file share access wouldn't be open (becuase of the huge security risks). You would have to do everything through the web browser instead of the application server. You would write files using FileDownload or ATTACH_FILE_TO_RESPONSE. In 7.01 we have ACFUpDownload and ACFExecute. With ACFExecute you could call a batch script that would create directories for you.

Former Member
0 Kudos

Thank you very much for helping me.

Greats

Answers (0)