<?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 Splitting a filepath(along with filename) into two fields inside program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149066#M992161</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 need an urgent help here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a selection screen parameter that has filepath+filename together (e.g. &lt;/P&gt;&lt;P&gt;C:\Documents and Settings\xyz\Desktop\test1.txt). So, I want to split it into 2 parts inside my program 1st for the filepath (i.e. 'C:\Documents and Settings\xyz\Desktop\') and 2nd for the filename (i.e. 'test1.txt').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help how to do it dynamically. I think we need to use string operators for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2008 13:10:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-24T13:10:47Z</dc:date>
    <item>
      <title>Splitting a filepath(along with filename) into two fields inside program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149066#M992161</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 need an urgent help here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a selection screen parameter that has filepath+filename together (e.g. &lt;/P&gt;&lt;P&gt;C:\Documents and Settings\xyz\Desktop\test1.txt). So, I want to split it into 2 parts inside my program 1st for the filepath (i.e. 'C:\Documents and Settings\xyz\Desktop\') and 2nd for the filename (i.e. 'test1.txt').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help how to do it dynamically. I think we need to use string operators for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:10:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149066#M992161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a filepath(along with filename) into two fields inside program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149067#M992162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the fm &lt;STRONG&gt;SO_SPLIT_FILE_AND_PATH&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Zsplit_filename .

PARAMETERS: FILENAME TYPE RLGRAP-FILENAME .

DATA: STRIPPED TYPE RLGRAP-FILENAME.
DATA: FILE_PATH TYPE RLGRAP-FILENAME.


CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
FULL_NAME = FILENAME
IMPORTING
STRIPPED_NAME = STRIPPED
FILE_PATH = FILE_PATH
* EXCEPTIONS
* X_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149067#M992162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a filepath(along with filename) into two fields inside program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149068#M992163</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;Reverse the whole file path first.&lt;/P&gt;&lt;P&gt;Take sub string upto '\'.&lt;/P&gt;&lt;P&gt;Again reverse the substring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna Gaikwad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149068#M992163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting a filepath(along with filename) into two fields inside program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149069#M992164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohammed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much.. You solved my issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-a-filepath-along-with-filename-into-two-fields-inside-program/m-p/4149069#M992164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:22:00Z</dc:date>
    </item>
  </channel>
</rss>

