Application Development 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: 

DIRECTORY_CREATE in CL_GUI_FRONTEND_SERVICES with other user

andreas_bonhfer
Explorer
0 Kudos

Hello,

we are using the method DIRECTORY_CREATE in CL_GUI_FRONTEND_SERVICES.

I suppose that for directory creation the logged in windows user is taken and the OS checks the access rights to the desired function, in this case Creation of a new directory.

Is it possible to use another "OS user" within this function or a similar function which allows to hand over a special user ?

Background is, that the directory creation should be possible only out of SAP and not via e.g. the Windows Explorer.

Thanks for all tipps and hints,

Best regards

Andreas

2 REPLIES 2

Clemenss
Active Contributor
0 Kudos

Hi Andreas,

this is not possible. CL_GUI_FRONTEND_SERVICES works through SAPGUI, it will use the user that started the SAPGUI. If you want to keep the ueser away from the file, then let SAP write (and later read) it on the SAP server. You may provide a download where the user can see the file, any modification not harming later processing.

Regards

Clemens

Former Member
0 Kudos

Hi,

Before executing a function in CL_GUI_FRONTEND SERVICES a check needs to be done, wether a GUI is available and if the method is supported for the active GUI. If the methods are called from a batch program or an unsupported GUI is used, an exception will be raised.

regards.