<?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 Problems with class CL_GUI_FRONTEND_SERVICES in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547027#M248660</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 already searched for a solution in the forum, but haven't found anything yet.&lt;/P&gt;&lt;P&gt;I use the method to check if a directory exists and the one to list the files. The user can specify the directory on the Appl.-Server via SELECTION-SCREEN. First the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_EXIST
  EXPORTING
    DIRECTORY            = l_unixpath
  RECEIVING
    RESULT               = l_count_unixdir
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    WRONG_PARAMETER      = 3
    NOT_SUPPORTED_BY_GUI = 4
    others               = 5.

CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_LIST_FILES
  EXPORTING
    DIRECTORY            = l_unixpath
  CHANGING
    file_table           = l_itab_unixdir
    count                = helpvar
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    WRONG_PARAMETER      = 3
    NOT_SUPPORTED_BY_GUI = 4
    others               = 5.

IF l_count_unixdir = 'X'.
  WRITE: / 'Directory Exists'.
  READ TABLE l_itab_unixdir INDEX 1 INTO l_unixdir.
  WRITE:/ helpvar.
  WRITE:/ l_unixdir.
  WRITE
ELSE.
  WRITE:/ 'Directory not found'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my problem:&lt;/P&gt;&lt;P&gt;l_unixpath is '/', the result is: Directory exists, but helpvar is 0, l_itab_unixdir is empty;&lt;/P&gt;&lt;P&gt;l_unixpath is '/usr/sap/', the result is: Directory not found &amp;lt;b&amp;gt;(but the directory exists!)&amp;lt;/b&amp;gt;;&lt;/P&gt;&lt;P&gt;l_unixpath is 'c:/', the result is: Directory exists, helpvar is 47, l_unixdir is "Documents and Settings".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why it's working with the Windows-Path but not with Unix? Thanks for your answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Aug 2006 12:29:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-02T12:29:34Z</dc:date>
    <item>
      <title>Problems with class CL_GUI_FRONTEND_SERVICES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547027#M248660</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 already searched for a solution in the forum, but haven't found anything yet.&lt;/P&gt;&lt;P&gt;I use the method to check if a directory exists and the one to list the files. The user can specify the directory on the Appl.-Server via SELECTION-SCREEN. First the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_EXIST
  EXPORTING
    DIRECTORY            = l_unixpath
  RECEIVING
    RESULT               = l_count_unixdir
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    WRONG_PARAMETER      = 3
    NOT_SUPPORTED_BY_GUI = 4
    others               = 5.

CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_LIST_FILES
  EXPORTING
    DIRECTORY            = l_unixpath
  CHANGING
    file_table           = l_itab_unixdir
    count                = helpvar
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    WRONG_PARAMETER      = 3
    NOT_SUPPORTED_BY_GUI = 4
    others               = 5.

IF l_count_unixdir = 'X'.
  WRITE: / 'Directory Exists'.
  READ TABLE l_itab_unixdir INDEX 1 INTO l_unixdir.
  WRITE:/ helpvar.
  WRITE:/ l_unixdir.
  WRITE
ELSE.
  WRITE:/ 'Directory not found'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my problem:&lt;/P&gt;&lt;P&gt;l_unixpath is '/', the result is: Directory exists, but helpvar is 0, l_itab_unixdir is empty;&lt;/P&gt;&lt;P&gt;l_unixpath is '/usr/sap/', the result is: Directory not found &amp;lt;b&amp;gt;(but the directory exists!)&amp;lt;/b&amp;gt;;&lt;/P&gt;&lt;P&gt;l_unixpath is 'c:/', the result is: Directory exists, helpvar is 47, l_unixdir is "Documents and Settings".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why it's working with the Windows-Path but not with Unix? Thanks for your answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 12:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547027#M248660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-02T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with class CL_GUI_FRONTEND_SERVICES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547028#M248661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Becose that class is for presentation server. You can't use it with application server.&lt;/P&gt;&lt;P&gt;Try FM F4_DXFILENAME_TOPRECURSION, may be helps.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2006 12:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547028#M248661</guid>
      <dc:creator>LucianoBentiveg</dc:creator>
      <dc:date>2006-08-02T12:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with class CL_GUI_FRONTEND_SERVICES</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547029#M248662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Luciano bentivegna&lt;/P&gt;&lt;P&gt;thank you for your answer.&lt;/P&gt;&lt;P&gt;i am trying&lt;/P&gt;&lt;P&gt;"CL_GUI_FRONTEND_SERVICES "&lt;/P&gt;&lt;P&gt;for application layer .&lt;/P&gt;&lt;P&gt;so when ever i an checking the method "DIRECTORY_EXIST" even tho directory exist also the result value is space .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 10:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-class-cl-gui-frontend-services/m-p/1547029#M248662</guid>
      <dc:creator>Balu483</dc:creator>
      <dc:date>2016-03-11T10:05:04Z</dc:date>
    </item>
  </channel>
</rss>

