<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating folder in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228054#M769996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand you want to check and then create a directory at the Application Server and &lt;STRONG&gt;not create a Windows directory&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this by calling an external command (via a function module) configured in transaction SM69. Use FM &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check if the direcory already exists, you can use FM &lt;STRONG&gt;EPS_GET_DIRECTORY_LISTING&lt;/STRONG&gt;. Then to create it, first in SM69 you create a command (or better ask the Basis team to do it for you if you are not sure) like &lt;STRONG&gt;mkdir &amp;lt;dir&amp;gt;&lt;/STRONG&gt; if you are running Windows OS or &lt;STRONG&gt;/bin/sh/ mkdir &amp;lt;dir&amp;gt;&lt;/STRONG&gt; if you are running UNIX where &amp;lt;dir&amp;gt; is the new directory name that you want to create. After this step, from your program call function &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt; with the Import Parameter &lt;STRONG&gt;COMMANDNAME&lt;/STRONG&gt; = the name of new script created in SM69 in the first step as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Dec 2007 13:03:47 GMT</pubDate>
    <dc:creator>Sougata</dc:creator>
    <dc:date>2007-12-30T13:03:47Z</dc:date>
    <item>
      <title>Creating folder in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228051#M769993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't find a way of creating a folder in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the class CL_GUI_FRONTEND_SERVICES only works in the foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naama&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Dec 2007 12:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228051#M769993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-30T12:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folder in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228052#M769994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naama,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the class name suggests &lt;STRONG&gt;CL_GUI_FRONTEND_SERVICES&lt;/STRONG&gt; so its methods will only succeed if the frontend (gui) is available otherwise not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to create a &lt;U&gt;windows directory&lt;/U&gt; on your local machine &lt;STRONG&gt;it must be run on foreground&lt;/STRONG&gt; so that &lt;U&gt;SAPGUI (frontend) is available&lt;/U&gt; when its run. There is no other way to achieve this as it does not make any sense to do so anyway as a background process if you think about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Dec 2007 12:38:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228052#M769994</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-12-30T12:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folder in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228053#M769995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to check if a directory exits and create a directory,&lt;/P&gt;&lt;P&gt;in the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naama&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Dec 2007 12:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228053#M769995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-30T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folder in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228054#M769996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand you want to check and then create a directory at the Application Server and &lt;STRONG&gt;not create a Windows directory&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this by calling an external command (via a function module) configured in transaction SM69. Use FM &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check if the direcory already exists, you can use FM &lt;STRONG&gt;EPS_GET_DIRECTORY_LISTING&lt;/STRONG&gt;. Then to create it, first in SM69 you create a command (or better ask the Basis team to do it for you if you are not sure) like &lt;STRONG&gt;mkdir &amp;lt;dir&amp;gt;&lt;/STRONG&gt; if you are running Windows OS or &lt;STRONG&gt;/bin/sh/ mkdir &amp;lt;dir&amp;gt;&lt;/STRONG&gt; if you are running UNIX where &amp;lt;dir&amp;gt; is the new directory name that you want to create. After this step, from your program call function &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt; with the Import Parameter &lt;STRONG&gt;COMMANDNAME&lt;/STRONG&gt; = the name of new script created in SM69 in the first step as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Dec 2007 13:03:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228054#M769996</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-12-30T13:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating folder in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228055#M769997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi General,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a widespread knowledge gap about SAP: SAP R/3 and later is a so-called client-server-system. That means, SAP system is running on a server (with access to server directories). Files on the server are generally read and written by ABAP DATASET´commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL_GUI_FRONTEND_SERVICES has the GUI in it's name. GUI means Graphical User Interface. This is the SAPGUI running on your local PC (client). The GUI has access to your local PC files, so has CL_GUI_FRONTEND_SERVICES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All background processes are running on the SAP server without any access to any PC. So there is no active GUI that can communicate to CL_GUI_FRONTEND_SERVICES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your SAP system runs on windows server, your PC may have access to the SAP server directories. But still the server access will go with , OPEN, READ DATASET, TRANSFER TO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those are technical restrictions you can not ignore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Dec 2007 13:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-folder-in-background/m-p/3228055#M769997</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-12-30T13:27:00Z</dc:date>
    </item>
  </channel>
</rss>

