<?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: Reg Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993967#M707203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer this INDEPENDENT SUBROUTINE (FORM)&lt;/P&gt;&lt;P&gt;in which we pass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) old file name&lt;/P&gt;&lt;P&gt;b) new file name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it will rename the file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This will work in WINDOWS Operating system)&lt;/P&gt;&lt;P&gt;(we can modify it very little for other OS also_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. just copy paste in new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------" /&gt;&lt;P&gt;PERFORM MYRENAME USING 'D:\CCC.TXT' 'DDD.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form myrename USING oldfile newfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : pm(200) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '/C REN ' oldfile newfile&lt;/P&gt;&lt;P&gt;INTO PM separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_RUN'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;COMMAND = 'CMD'&lt;/P&gt;&lt;P&gt;PARAMETER = pm&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CD =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RETURNCODE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "myrename&lt;/P&gt;&lt;P&gt;*************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can rename the File in this way also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_RENAME                       .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_COPY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    SOURCE               = 'C:\Test.txt'&lt;/P&gt;&lt;P&gt;    DESTINATION          = 'C:\Test_CP.txt'&lt;/P&gt;&lt;P&gt;    OVERWRITE            = SPACE&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    CNTL_ERROR           = 1&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI         = 2&lt;/P&gt;&lt;P&gt;    WRONG_PARAMETER      = 3&lt;/P&gt;&lt;P&gt;    DISK_FULL            = 4&lt;/P&gt;&lt;P&gt;    ACCESS_DENIED        = 5&lt;/P&gt;&lt;P&gt;    FILE_NOT_FOUND       = 6&lt;/P&gt;&lt;P&gt;    DESTINATION_EXISTS   = 7&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR        = 8&lt;/P&gt;&lt;P&gt;    PATH_NOT_FOUND       = 9&lt;/P&gt;&lt;P&gt;    DISK_WRITE_PROTECT   = 10&lt;/P&gt;&lt;P&gt;    DRIVE_NOT_READY      = 11&lt;/P&gt;&lt;P&gt;    NOT_SUPPORTED_BY_GUI = 12&lt;/P&gt;&lt;P&gt;    others               = 13&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;data: rc type i.&lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_DELETE&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME             =  'C:\Test.txt'&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    RC                   = rc&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    FILE_DELETE_FAILED   = 1&lt;/P&gt;&lt;P&gt;    CNTL_ERROR           = 2&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI         = 3&lt;/P&gt;&lt;P&gt;    FILE_NOT_FOUND       = 4&lt;/P&gt;&lt;P&gt;    ACCESS_DENIED        = 5&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR        = 6&lt;/P&gt;&lt;P&gt;    NOT_SUPPORTED_BY_GUI = 7&lt;/P&gt;&lt;P&gt;    WRONG_PARAMETER      = 8&lt;/P&gt;&lt;P&gt;    others               = 9&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&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;vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2007 10:19:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-31T10:19:20Z</dc:date>
    <item>
      <title>Reg Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993964#M707200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Can any one tell me what Function Module is used to rename the existing file name (excel,csv or txt file) on presentation server?&lt;/P&gt;&lt;P&gt;&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;Shalini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2007 09:59:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993964#M707200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-31T09:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993965#M707201</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;Try this FM - KCD_CSV_FILE_TO_INTERN_CONVERT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'SAP_CONVERT_TO_TEX_FORMAT'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_field_seperator = ','&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;i_tab_sap_data = itab&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;i_tab_converted_data = itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search path for '.CSV'.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;filename = path&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;data_tab = itab1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message e016(z4).&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just follow below logic in your custom report ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Call SAP standard Report which return .xls file,&lt;/P&gt;&lt;P&gt;2. Download it on local presentation server internally (ws_download) on fix file path,&lt;/P&gt;&lt;P&gt;3. Call SAP std FM - 'SAP_CONVERT_TO_TEX_FORMAT' as describe and download it on fixed path on presentation server,&lt;/P&gt;&lt;P&gt;4. Upload file for second report from step no. 3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2007 10:03:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993965#M707201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-31T10:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993966#M707202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Shalini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you have to do in two steps. First call method FILE_COPY (to make a copy with the new name) than FILE_DELETE (to delete the original). Both are in class CL_GUI_FRONTEND_SERVICES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2007 10:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993966#M707202</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-31T10:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993967#M707203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer this INDEPENDENT SUBROUTINE (FORM)&lt;/P&gt;&lt;P&gt;in which we pass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) old file name&lt;/P&gt;&lt;P&gt;b) new file name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it will rename the file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This will work in WINDOWS Operating system)&lt;/P&gt;&lt;P&gt;(we can modify it very little for other OS also_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. just copy paste in new program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------" /&gt;&lt;P&gt;PERFORM MYRENAME USING 'D:\CCC.TXT' 'DDD.TXT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form myrename USING oldfile newfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : pm(200) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '/C REN ' oldfile newfile&lt;/P&gt;&lt;P&gt;INTO PM separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_RUN'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;COMMAND = 'CMD'&lt;/P&gt;&lt;P&gt;PARAMETER = pm&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CD =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RETURNCODE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "myrename&lt;/P&gt;&lt;P&gt;*************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can rename the File in this way also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_RENAME                       .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_COPY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    SOURCE               = 'C:\Test.txt'&lt;/P&gt;&lt;P&gt;    DESTINATION          = 'C:\Test_CP.txt'&lt;/P&gt;&lt;P&gt;    OVERWRITE            = SPACE&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    CNTL_ERROR           = 1&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI         = 2&lt;/P&gt;&lt;P&gt;    WRONG_PARAMETER      = 3&lt;/P&gt;&lt;P&gt;    DISK_FULL            = 4&lt;/P&gt;&lt;P&gt;    ACCESS_DENIED        = 5&lt;/P&gt;&lt;P&gt;    FILE_NOT_FOUND       = 6&lt;/P&gt;&lt;P&gt;    DESTINATION_EXISTS   = 7&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR        = 8&lt;/P&gt;&lt;P&gt;    PATH_NOT_FOUND       = 9&lt;/P&gt;&lt;P&gt;    DISK_WRITE_PROTECT   = 10&lt;/P&gt;&lt;P&gt;    DRIVE_NOT_READY      = 11&lt;/P&gt;&lt;P&gt;    NOT_SUPPORTED_BY_GUI = 12&lt;/P&gt;&lt;P&gt;    others               = 13&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;data: rc type i.&lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_DELETE&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME             =  'C:\Test.txt'&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    RC                   = rc&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    FILE_DELETE_FAILED   = 1&lt;/P&gt;&lt;P&gt;    CNTL_ERROR           = 2&lt;/P&gt;&lt;P&gt;    ERROR_NO_GUI         = 3&lt;/P&gt;&lt;P&gt;    FILE_NOT_FOUND       = 4&lt;/P&gt;&lt;P&gt;    ACCESS_DENIED        = 5&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR        = 6&lt;/P&gt;&lt;P&gt;    NOT_SUPPORTED_BY_GUI = 7&lt;/P&gt;&lt;P&gt;    WRONG_PARAMETER      = 8&lt;/P&gt;&lt;P&gt;    others               = 9&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&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;vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2007 10:19:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-function-module/m-p/2993967#M707203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-31T10:19:20Z</dc:date>
    </item>
  </channel>
</rss>

