<?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: validate file path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216410#M475300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding the old open dataset to your AT-SELECTION-SCREEN event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Open dataset p_file for output in TEXT MODE.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E000...&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2007 07:59:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-03T07:59:46Z</dc:date>
    <item>
      <title>validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216409#M475299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am sending a file to AL11, i need to validate file path which is in selection screen parameter &lt;/P&gt;&lt;P&gt;can u suggest any possabilities&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rassheed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 07:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216409#M475299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T07:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216410#M475300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding the old open dataset to your AT-SELECTION-SCREEN event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Open dataset p_file for output in TEXT MODE.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E000...&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 07:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216410#M475300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T07:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216411#M475301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rasheed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           Try this  Instead of using AL11,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CG3Y To Save a file From Application server to Presentation server directly.&lt;/P&gt;&lt;P&gt;CG3Z To Save a file From Presentation server to Application server directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 07:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216411#M475301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T07:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216412#M475302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Threre are some Function Modules which work on application server directory, try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Read directories of an application server
  CALL FUNCTION 'RZL_READ_DIR'
       EXPORTING
            name           = directory
            nrlines        = 1
       TABLES
            file_tbl       = file_table
       EXCEPTIONS
            argument_error = 1
            not_found      = 2
            send_error     = 3
            OTHERS         = 4.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Which return the list of files in such a directory. Look also at Function Group SAL3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 08:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216412#M475302</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-05-03T08:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216413#M475303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;    At u r selection screen if u r using FM :  F4_FILENAME , then it will automatically opens the bwowser, then u dont have to worry abt file validation.&lt;/P&gt;&lt;P&gt;    if u r sending file to AS, using opendataset......... then if file doesnt exists in the AS then it will automatically create it and if file already exists in AS then it will replace that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful..&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;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 08:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216413#M475303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: validate file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216414#M475304</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;&lt;/P&gt;&lt;P&gt;You could simply try opening it. If sy-subrc &amp;lt;&amp;gt; 0, then you know that the path/filename is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters:
p_filename ....
at selection-screen.

OPEN DATASET p_filename FOR INPUT IN TEXT MODE.
 
if sy-subrc = 8.
  message 'file not found' type i.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: dl_file TYPE ibipparms-path.    " File name
  CONSTANTS: c_dir       TYPE  rlgrap-filename.
 
* F4 filename for Application server
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
      EXPORTING
        directory        = c_dir
        filemask         = ' '
      IMPORTING
        serverfile       = dl_file
      EXCEPTIONS
        canceled_by_user = 1
        OTHERS           = 2.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE e000 WITH 'Error while getting the file name'(006).
      EXIT.
    ELSE.
      p_file =  dl_file.
    ENDIF.
 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check this FM DX_FILE_EXISTENCE_CHECK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To validate the path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check these links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2890781"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2322239"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3328018"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rk Pasupuleti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 08:15:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-file-path/m-p/2216414#M475304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T08:15:23Z</dc:date>
    </item>
  </channel>
</rss>

