<?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: Shorten path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092990#M1972076</link>
    <description>&lt;A href="https://answers.sap.com/users/1091/sandrarossi.html"&gt;Sandra Rossi&lt;/A&gt; , Its Done!</description>
    <pubDate>Wed, 02 Oct 2019 09:50:00 GMT</pubDate>
    <dc:creator>former_member1716</dc:creator>
    <dc:date>2019-10-02T09:50:00Z</dc:date>
    <item>
      <title>Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092972#M1972058</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I select the document using method &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;which gives me the path to the folder type STRING.Then I read the file using Function Module : TEXT_CONVERT_XLS_TO_SAP &lt;/P&gt;
  &lt;P&gt;which has an importing parameter i_filename type RLGRAP-FILENAME , length limited to 128 CHAR.&lt;/P&gt;
  &lt;P&gt;Sometimes the path can be longer than 128 Char and like this the prg does not find the file.&lt;/P&gt;
  &lt;P&gt;Do you know a way to shorten the path or read the file path entirely?&lt;/P&gt;
  &lt;P&gt;Please let me know!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092972#M1972058</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-09-30T11:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092973#M1972059</link>
      <description>&lt;P&gt;Hello &lt;A href="https://answers.sap.com/users/406365/johnu951.html"&gt;Jonathan Blavatsky&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Recommend you to Kindly stick to the file path less than 128 Characters,&lt;/P&gt;&lt;P&gt;You can try using &lt;STRONG&gt;GUI_UPLOAD FM &lt;/STRONG&gt;but not sure if its supports all File formats&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092973#M1972059</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-09-30T11:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092974#M1972060</link>
      <description>&lt;P&gt;I cant get it to work with XLS&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092974#M1972060</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-09-30T12:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092975#M1972061</link>
      <description>&lt;P&gt;You may define a drive which points to a directory (Windows Explorer "map network drive"), that will shorten the path.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:24:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092975#M1972061</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-09-30T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092976#M1972062</link>
      <description>&lt;P&gt;can you please elaborate a little more&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092976#M1972062</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-09-30T12:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092977#M1972063</link>
      <description>&lt;P&gt;&lt;A href="https://www.google.com/search?q=Windows+Explorer+%22map+network+drive%22"&gt;https://www.google.com/search?q=Windows+Explorer+"map+network+drive"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 12:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092977#M1972063</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-09-30T12:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092978#M1972064</link>
      <description>&lt;P&gt;your root problem is because that function module only accept a path up to 128 characters. you may use upload using gui_upload and BIN file type, then read the file detail with XML class or transformations...or else you should change to CSV file or xlsx.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 13:09:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092978#M1972064</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-09-30T13:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092979#M1972065</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;if you provide an answer where GUI_Upload can upload an excel file,I will accept your answer ,but as far as I have searched and tried there is problem with data convertion&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Oct 2019 08:11:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092979#M1972065</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-10-01T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092980#M1972066</link>
      <description>&lt;P&gt;Hello &lt;A href="https://answers.sap.com/users/406365/johnu951.html"&gt;Jonathan Blavatsky&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Try the below Code, This should work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM receive_file .
* Function to Provide F4 for receiving the file
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = s_fname.

*Get the File path to local variable
gw_fname = s_fname.
*Receive the data into an Internal Table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gw_fname
filetype = 'DAT'
TABLES
data_tab = gt_upload
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
ENDFORM.

Try the below steps for formatting the file that you want to load.
1) Prepare the Excel file first with the data in CSV format.
2) Now copy the data from Excel file and paste it in Note pad (Along with Column Name)
3) Paste the Text File as DAT format in your machine
4) Now load your DAT file into the program.

Note: Your GT_UPLOAD Internal table should have the same structure as the File with Data Type   String for all columns. Later you process the Internal table to the required Data type by      passing the Values to Another Internal table which is defined with actual Data Type.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092980#M1972066</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-10-01T09:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092981#M1972067</link>
      <description>&lt;P&gt;have tried it like this,it does not work,the characters are all wrong and it has only one column ,instead of all the columns that I have already specified from the structure&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092981#M1972067</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-10-01T10:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092982#M1972068</link>
      <description>&lt;P&gt;sorry but this is not a solution to provide to the client,since not all clients will change the directory of their pc's&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 10:07:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092982#M1972068</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-10-01T10:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092983#M1972069</link>
      <description>&lt;P&gt;Sorry maybe I was clear...I will not do any process manually.The goal is to select the file using open file dialog and then call this FM...which turns the data into Binay format...not what I want.the goal to simply select the file and upload it programatically.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 12:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092983#M1972069</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-10-01T12:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092984#M1972070</link>
      <description>&lt;P&gt;Just duplicate TEXT_CONVERT_XLS_TO_SAP and increase the length of the parameter.&lt;/P&gt;&lt;P&gt;Duplication of such a simple function module is not an issue, as it's not important to apply future patches.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 13:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092984#M1972070</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-01T13:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092985#M1972071</link>
      <description>&lt;P&gt;It is not logic what you request:  "then call this FM"   if it does not work it will never work until somebody change the code inside. And I am pretty sure it will never append. &lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;You could use Abap2xls  &lt;/P&gt;&lt;P&gt;You could copy the function group &amp;amp; the function module to change the size of the file (the code used the FM GUI_UPLOAD, and this FM used a string)&lt;/P&gt;&lt;P&gt;You could create your own code based on the classes used in this FM &lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 05:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092985#M1972071</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-10-02T05:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092986#M1972072</link>
      <description>&lt;P&gt;not the best solution,but its a solution.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 08:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092986#M1972072</guid>
      <dc:creator>former_member2492</dc:creator>
      <dc:date>2019-10-02T08:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092987#M1972073</link>
      <description>&lt;A href="https://answers.sap.com/users/949/satishkumarbalasubramanian.html"&gt;Satish Kumar Balasubramanian&lt;/A&gt; It's important that you move your comment (the 4 steps) into your answer (people rarely read the comments).</description>
      <pubDate>Wed, 02 Oct 2019 08:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092987#M1972073</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-02T08:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092988#M1972074</link>
      <description>&lt;P&gt;Thanks for the comment &lt;A href="https://answers.sap.com/users/1091/sandra.rossi.html"&gt;Sandra Rossi&lt;/A&gt;, Just Did it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 08:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092988#M1972074</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-10-02T08:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092989#M1972075</link>
      <description>&lt;P&gt;I'm surprised: couldn't you just edit your answer, instead of adding a new one?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 09:38:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092989#M1972075</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-02T09:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092990#M1972076</link>
      <description>&lt;A href="https://answers.sap.com/users/1091/sandrarossi.html"&gt;Sandra Rossi&lt;/A&gt; , Its Done!</description>
      <pubDate>Wed, 02 Oct 2019 09:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092990#M1972076</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-10-02T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Shorten path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092991#M1972077</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/949/satishkumarbalasubramanian.html"&gt;Satish Kumar Balasubramanian&lt;/A&gt; Nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 12:38:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/shorten-path/m-p/12092991#M1972077</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-02T12:38:08Z</dc:date>
    </item>
  </channel>
</rss>

