<?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: Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217130#M767210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mae,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your requirement is not clear, do you need to create text file with data or invoke a batch file that creates text file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below sample code, it creates a text file "DOWNLOAD.TXT" in local hard disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: i_dat type table of string.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename                        = 'C:\download.txt'
  tables
    data_tab                        = i_dat
 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
   OTHERS                          = 22.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populate internal table I_DAT with data that has to be download to the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jan 2008 07:09:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-15T07:09:34Z</dc:date>
    <item>
      <title>Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217126#M767206</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;Does anybody knows a standard FM that creates a text file in the local hard drive in the given path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mae&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 06:52:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217126#M767206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T06:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217127#M767207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FM: &lt;STRONG&gt;GUI_DOWNLOAD&lt;/STRONG&gt; can download required data to local hard drive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 06:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217127#M767207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T06:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217128#M767208</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;Use function module &lt;STRONG&gt;GUI_EXEC&lt;/STRONG&gt; and in parameter give notepad.exe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217128#M767208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217129#M767209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this will call a .bat or .exe which is the one who will create the text file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a FM that will will trigger a file to create a text file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea regarding with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mae&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217129#M767209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217130#M767210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mae,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your requirement is not clear, do you need to create text file with data or invoke a batch file that creates text file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check below sample code, it creates a text file "DOWNLOAD.TXT" in local hard disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: i_dat type table of string.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename                        = 'C:\download.txt'
  tables
    data_tab                        = i_dat
 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
   OTHERS                          = 22.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populate internal table I_DAT with data that has to be download to the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217130#M767210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217131#M767211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FMs are&lt;/P&gt;&lt;P&gt;GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;WS_DOWNLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope dis helps&lt;/P&gt;&lt;P&gt;Reward if it does&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:10:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217131#M767211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217132#M767212</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;what i mean to say is that i need to trigger an executable program .exe or .bat...and this executable program will just responsible on creating the text file...&lt;/P&gt;&lt;P&gt;i have 3 parameter the PATH, ID, and Code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anybody knows a function module that will trigger an executable program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt; mae&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217132#M767212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217133#M767213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mae,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think you can use FM: &lt;STRONG&gt;SXPG_COMMAND_EXECUTE&lt;/STRONG&gt;. I guess you can find few samples here in SDN. Please check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217133#M767213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217134#M767214</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;it seems that the examples from this forum makes me confused on using this FM...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you explain how to use this FM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mae&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 07:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217134#M767214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T07:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217135#M767215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii,&lt;/P&gt;&lt;P&gt;check it step by step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) you fill the internal table for which you want to generate the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) store the file name with the file type in a variable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) call the function by pressing 'Pattren' button on the tool bar and write function name and it ll load code into your window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) set the parameter as shown below and execute the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will generate file according to your specified file location and type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BIN_FILESIZE = &lt;/P&gt;&lt;P&gt;filename = txtfile&lt;/P&gt;&lt;P&gt;filetype = 'ASC'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND = ' ' &lt;/P&gt;&lt;P&gt;write_field_separator = 'X'&lt;/P&gt;&lt;P&gt;confirm_overwrite = 'X'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;data_tab = it2_oh&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply if not clear &lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Maharshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 08:39:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/3217135#M767215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T08:39:30Z</dc:date>
    </item>
  </channel>
</rss>

