<?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: Calling FM in methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848527#M667359</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;Don't call the FM inside the method instead call static method GUI_DOWNLOAD of global class CL_GUI_FRONTEND_SERVICES. You can call this directly without instantiating the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    call method cl_gui_frontend_services=&amp;gt;gui_download
      exporting
        filename                = ldf_fullpath
        filetype                = 'ASC'
      changing
        data_tab                = gt_outtab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        not_supported_by_gui    = 22
        error_no_gui            = 23
        others                  = 24.

  if sy-subrc is not initial.
* handle exceptions here...e.g. RAISE EXCEPTION xxx
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2007 13:19:12 GMT</pubDate>
    <dc:creator>Sougata</dc:creator>
    <dc:date>2007-10-01T13:19:12Z</dc:date>
    <item>
      <title>Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848523#M667355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to call a GUI_download function module inside a method.&lt;/P&gt;&lt;P&gt;But after executing it is throwing an error message stating that FM does not exists or exceptions raised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chaitanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 12:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848523#M667355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T12:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848524#M667356</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;Uncomment the EXCEPTIONS part &amp;amp; handle the sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check in debug mode, which exception is raised.&lt;/P&gt;&lt;P&gt;You might not have some authorization to download on a specific directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 12:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848524#M667356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T12:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848525#M667357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the inputs....&lt;/P&gt;&lt;P&gt;the exceptions have been taken care but the problem is that the FM itself is not getting executed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how to debug now??? &lt;/P&gt;&lt;P&gt;As soon as it reaches to the calling point it comes out saying that the FM does not exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 12:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848525#M667357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T12:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848526#M667358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems you are on 4.6B or lower version. Use WS_DOWNLOAD instead of GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 13:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848526#M667358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T13:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848527#M667359</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;Don't call the FM inside the method instead call static method GUI_DOWNLOAD of global class CL_GUI_FRONTEND_SERVICES. You can call this directly without instantiating the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    call method cl_gui_frontend_services=&amp;gt;gui_download
      exporting
        filename                = ldf_fullpath
        filetype                = 'ASC'
      changing
        data_tab                = gt_outtab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        no_authority            = 5
        unknown_error           = 6
        header_not_allowed      = 7
        separator_not_allowed   = 8
        filesize_not_allowed    = 9
        header_too_long         = 10
        dp_error_create         = 11
        dp_error_send           = 12
        dp_error_write          = 13
        unknown_dp_error        = 14
        access_denied           = 15
        dp_out_of_memory        = 16
        disk_full               = 17
        dp_timeout              = 18
        file_not_found          = 19
        dataprovider_exception  = 20
        control_flush_error     = 21
        not_supported_by_gui    = 22
        error_no_gui            = 23
        others                  = 24.

  if sy-subrc is not initial.
* handle exceptions here...e.g. RAISE EXCEPTION xxx
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 13:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848527#M667359</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-10-01T13:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848528#M667360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sougata,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!!!!!!!!!!!!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chaitanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 13:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848528#M667360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T13:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848529#M667361</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 tired your code and now I am getting an error message saying Error when opening the RFC connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinldy advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 13:46:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848529#M667361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T13:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling FM in methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848530#M667362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the value of sy-subrc after the method  &amp;lt;i&amp;gt;cl_gui_frontend_services=&amp;gt;gui_download&amp;lt;/i&amp;gt; is called?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 02:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-fm-in-methods/m-p/2848530#M667362</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-10-02T02:30:51Z</dc:date>
    </item>
  </channel>
</rss>

