<?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: Error looping function gui_upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086222#M1971389</link>
    <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; I'm sure the function cannot be executed in background or automatic processing.&lt;/P&gt;&lt;P&gt;because I try to execute the subroutine using BDC and it's generating the same error. BUT if I do it manually, it works like a charm.&lt;/P&gt;&lt;P&gt;Because it's the nature of GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;: &lt;/P&gt;&lt;P&gt;as I expected, this article below showed that any gui function cannot be used in background. So how do I upload images to se78 automatically?&lt;/P&gt;&lt;P&gt;I also tried to call this function using SAP PI, whether using SOAP to RFC or file to RFC but whenever it reaches the function, it's always being cancelled.&lt;/P&gt;&lt;P&gt; this is so confusing.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/questions/3288523/a-function-module-that-can-replace-guiupload.html"&gt;https://answers.sap.com/questions/3288523/a-function-module-that-can-replace-guiupload.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 02:42:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-12-11T02:42:30Z</dc:date>
    <item>
      <title>Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086212#M1971379</link>
      <description>&lt;P&gt;dear Experts,&lt;/P&gt;
  &lt;P&gt;I tried to upload bmp image to se78 using:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  perform import_bitmap_bds
                  in program saplstxbitmaps
                            using    filename
                                     name
                                     'GRAPHICS'     "Object
                                     'BMAP'         "ID
                                     'BMON'         "BMON : B/W, BCOL: Color image
                                     'BMP'          "Extension
                                     title
                                     space
                                     space
                                     'X'
                            changing l_docid
                                     l_resolution.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This sub routine is called in loop. &lt;/P&gt;
  &lt;P&gt;So I have for example 2 files bmp and I loop those 2 files and upload them to se78 using above sub routine, the problem is whenever I upload the second one, a read file error occured everytime.&lt;/P&gt;
  &lt;P&gt;What seems to be the problem?&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Error&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 09:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086212#M1971379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-10T09:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086213#M1971380</link>
      <description>&lt;P&gt;Can you explain what happens exactly when there is a "read file error"?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:02:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086213#M1971380</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-12-10T10:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086214#M1971381</link>
      <description>&lt;P&gt;I read somewhere that the PERFORM ... IN PROGRAM is now a BAD PRACTICE and should not be used anymore &lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086214#M1971381</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-12-10T10:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086215#M1971382</link>
      <description>&lt;P&gt;hi Sandra the error:&lt;/P&gt;&lt;H3&gt;Error opening file &lt;/H3&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086215#M1971382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-10T10:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086216#M1971383</link>
      <description>&lt;P&gt;Hi fred is there other way to upload bmp to se78 using abap?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:11:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086216#M1971383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-10T10:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086217#M1971384</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt; It's in the ABAP documentation that PERFORM shouldn't be used (obsolete), and PERFORM IN PROGRAM &lt;EM&gt;really&lt;/EM&gt; should be used! (obsolete and bad practice).&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086217#M1971384</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-12-10T10:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086218#M1971385</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sam.indra2&lt;/SPAN&gt; You could look at the code of the FORM and see how SAP did it.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:17:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086218#M1971385</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-12-10T10:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086219#M1971386</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; already did and it's just throw that error , just can't figured it out why, if I upload them one by one then it's no problem.&lt;/P&gt;&lt;P&gt;it seems that maybe it cannot be used in a loop, because it's too fast to process.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086219#M1971386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-10T10:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086220#M1971387</link>
      <description>&lt;P&gt;or maybe the filename is wrong&lt;/P&gt;&lt;P&gt;or maybe you have not the authorization to read it at OS level &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086220#M1971387</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-12-10T10:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086221#M1971388</link>
      <description>&lt;P&gt;More precisely, forms is an obsolete technology, people shouldn't create subroutines anymore, PERFORM is not obsolete because there are still subroutines in old programs. What is obsolete is PERFORM subr(prog), which should be replaced with PERFORM subr IN PROGRAM prog.&lt;/P&gt;&lt;P&gt;(but it could be argued that some programs might contain some old technologies, and improvements would require the creation of subroutines by force...)&lt;/P&gt;&lt;P&gt;NB: &lt;SPAN class="mention-scrubbed"&gt;sam.indra2&lt;/SPAN&gt; I still don't understand if the error produces a short dump or something else...&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;I looked at the standard code, the concerned line is below (message TD811 = "Error opening file &amp;amp;")&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;message e811 with p_filename.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which is executed after function module GUI_UPLOAD if it returns the exception file_open_error.&lt;/P&gt;&lt;P&gt;Conclusion: in your custom program, if the variable filename contains an incorrect path, it will send this error. Or maybe it's because the file is locked at Windows level (just close the file before running the ABAP program).&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:28:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086221#M1971388</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-12-10T10:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086222#M1971389</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; I'm sure the function cannot be executed in background or automatic processing.&lt;/P&gt;&lt;P&gt;because I try to execute the subroutine using BDC and it's generating the same error. BUT if I do it manually, it works like a charm.&lt;/P&gt;&lt;P&gt;Because it's the nature of GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;: &lt;/P&gt;&lt;P&gt;as I expected, this article below showed that any gui function cannot be used in background. So how do I upload images to se78 automatically?&lt;/P&gt;&lt;P&gt;I also tried to call this function using SAP PI, whether using SOAP to RFC or file to RFC but whenever it reaches the function, it's always being cancelled.&lt;/P&gt;&lt;P&gt; this is so confusing.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/questions/3288523/a-function-module-that-can-replace-guiupload.html"&gt;https://answers.sap.com/questions/3288523/a-function-module-that-can-replace-guiupload.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 02:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086222#M1971389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-11T02:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086223#M1971390</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/83615/sam.indra2.html"&gt;Sam Indra&lt;/A&gt; I'm confused too, it's no more a matter of looping.&lt;/P&gt;&lt;P&gt;Now that you're talking about BDC (in background mode) or background, I confirm that GUI_UPLOAD cannot work in background, no workaround. But I don't understand why you said that in the loop it used to work for the first file.&lt;/P&gt;&lt;P&gt;If you want to access files without connection to SAP GUI, you may for instance store the files on the application server (if the files originally come from a user's laptop, the user has to transfer it to the server in dialog, before you run your program).&lt;/P&gt;&lt;P&gt;If you want to import files from any location into SE78, Unfortunately, there is no other solution than copying the code of the subroutine import_bitmap_bds of program saplstxbitmaps (essentially it's made of four parts: GUI_UPLOAD, SAPSCRIPT_CONVERT_BITMAP_BDS, write to BDS via CL_BDS_DOCUMENT_SET, insert table STXBITMAPS), and rewrite the GUI_UPLOAD section, for instance with OPEN DATASET, etc. if the file is on the application server. Unfortunately, there is no other solution than writing directly to the table STXBITMAPS.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 05:58:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086223#M1971390</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-12-11T05:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error looping function gui_upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086224#M1971391</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; yes I tried to do it manually using loop in se38 custom program, but when upload the second one, it's prompted with a read error message, and second try was using bdc where it failed from the start.&lt;/P&gt;&lt;P&gt;I also tried to make a BDC for se78, it works actually BUT unfortunately I have to open the folder manually and click the import image menu and cannot be done with any short cut that resulted =%_GC 118 22 value in BDC which means it's unreachable.&lt;/P&gt;&lt;P&gt;The project description is to upload the bmp files to SAP that later be used in adobe form report. But the uploaded process should be done automatically. &lt;/P&gt;&lt;P&gt;Yes re-writing the entire code may be the last option I could think off. But still open with another ways of doing this, if any.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 06:32:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-looping-function-gui-upload/m-p/12086224#M1971391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-11T06:32:36Z</dc:date>
    </item>
  </channel>
</rss>

