Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create directory on application server via class/fm?

Former Member
0 Likes
2,424

Hello,

I am generating files with output which i want to write to the application server in a directory which i want to create thru the program.

I dont want to use system commands (SM69)

Does anyone know if this is possible?

Regards,

Peter

Hello,

I am generating files with output which i want to write to the application server in a directory which i want to create thru the program.

I dont want to use system commands (SM69)

Does anyone know if this is possible?

Regards,

Peter

5 REPLIES 5
Read only

Former Member
0 Likes
1,875

Use function module as WBMR_CREATE_APPL_FOLDER.

Else. Use Download function module and give the path.

Following you can able to create the folder.

Reward points if helpful.

Regards,

Sankar.

Read only

1,875

Wrong FM as it creates new folder in Mime-Repository. It is nothing to do with "directory on application server"

Read only

Former Member
0 Likes
1,875

thanks for the answer, although this is asking for a transport request. Which i dont want ofcourse, any other ideas

Read only

Former Member
1,875

Hello,

I have used the following code to accomplish this:

data: l_temppath(150),

l_imagepath(150),

l_commands(500).

l_temppath = 'file path and name'

concatenate 'mkdir' l_imagepath into l_commands separated by ' '.

open dataset l_temppath for output in text mode filter l_commands

encoding default.

close dataset l_temppath.

Regards

Greg Kern

Read only

jmodaal
Active Contributor
0 Likes
1,875

Hello,

I would not recommend to do so. The usual procedure for this is to ask the basis team to create a folder. Best location for this is a file server that is mounted to the SAP system. On single instance systems it can also be located on the application server - depending on the size of the data that is used (because of the risk to stop the whole SAP system by flooding the file system).

To work with the folder a logical file / path should be used.

In a nutshell: even if you maybe find a function module that enables you to create a directory - bypassing the admins - I would not do it that way.