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

Folder creation in a given path

Former Member
0 Likes
1,347

Hi all,

i would like to create folder dynamically in the given path(This is a selection screen field) and this should be irrespective of operating system.If any methods or function modules which serve this purpose

please let me know.

Thanks,

Ram.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,153

Hi,

Use FM:- SO_FOLDER_INSERT_API1 -


Create a folder in a application server.

9 REPLIES 9
Read only

Former Member
0 Likes
1,153

Hi,

Use method DIRECTORY_CREATE of the class CL_GUI_FRONTEND_SERVICES.

Regards

Karthik D

Read only

Former Member
0 Likes
1,153

This message was moderated.

Read only

Former Member
0 Likes
1,153

This message was moderated.

Read only

Former Member
0 Likes
1,153

Hi,

In class CL_GUI_FRONTEND_SERVICES, method DIRECTORY_CREATE and give the directory name to that method.

Regards,

Jyothi CH.

Read only

0 Likes
1,153

Hi All,

Actually I have a requirement to create a folder either on Application server or any other File servers.

not on the frond end.

Thanks,

Ram

Read only

0 Likes
1,153

>

> Hi All,

>

> Actually I have a requirement to create a folder either on Application server or any other File servers.

> not on the frond end.

>

> Thanks,

> Ram

This is why we insist thread starters to give all possible details in the question, now its waste of time for you and others as well.

Regards

Karthik D

Read only

Former Member
0 Likes
1,153

hi

try this

REPORT ZCREATEDIRPRE .

Parameters: p_dirnm like RLGRAP-FILENAME.

CALL FUNCTION 'GUI_CREATE_DIRECTORY'

EXPORTING

DIRNAME = p_dirnm

EXCEPTIONS

FAILED = 1

OTHERS = 2

.

Read only

Former Member
0 Likes
1,154

Hi,

Use FM:- SO_FOLDER_INSERT_API1 -


Create a folder in a application server.

Read only

0 Likes
1,153

Hello,

I think the FM given by Rahul is available on SolMan servers and not plain ECC servers.

You can try using the code below.

DATA: COMMAND(200).
DATA: BEGIN OF TABL OCCURS 0,
LINE(255),
END OF TABL.

command = 'mkdir C:\temp\team1'.
CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND ID 'TAB' FIELD TABL-*SYS*.

It is specific to a Windows App server. But you can put the appropriate unix command for Unix servers

The OS type can be checked with sy-opsys