<?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: Generating file name with date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491885#M839747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please let me know the error UR getting ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 10:32:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-05T10:32:11Z</dc:date>
    <item>
      <title>Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491880#M839742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to create via ABAP a file name with date in it. Normaly my script must run but the script won't run. Please help. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data = sy-datum.  " = data set to sys date&lt;/P&gt;&lt;P&gt;data+6(2) = '01'. " = first day of month&lt;/P&gt;&lt;P&gt;data = data - 1.  " = last day of last month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;file name creation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;p_filename+0(21) = '/sapio/flatfiles/xxx/'. " = first part of file name&lt;/P&gt;&lt;P&gt;p_filename&lt;EM&gt;21(6) = data&lt;/EM&gt;0(6). " = second part of file name&lt;/P&gt;&lt;P&gt;p_filename+27(15) = '_XXXX_XXXXX.csv'. " = last part of file name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491880#M839742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T09:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491881#M839743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Concatenate name and date into the file name ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date = data+0(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate '/sapio/flatfiles/xxx/' v_date '_XXXX_XXXXX.csv' into&lt;/P&gt;&lt;P&gt;                    p_filename.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:54:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491881#M839743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T09:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491882#M839744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I try it with your hints but now I got a save error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
program conversion_routine.
* Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rsldpsel.
* Global code used by conversion rules
*$*$ begin of global - insert your declaration only below this line  *-*
* TABLES: ...
* DATA:   ...
data: data like sy-datum.
*$*$ end of global - insert your declaration only before this line   *-*
* -------------------------------------------------------------------
form compute_flat_file_filename
     using p_infopackage type rslogdpid
  changing p_filename    like rsldpsel-filename
           p_subrc       like sy-subrc.
*       Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line        *-*

* Datum wird gebaut
data = sy-datum.  " = data set to actual date
data+6(2) = '01'. " = first day of month
data = data - 1.  " = last day of month before
v_date = data+0(6).

* Dateiname wird gebaut
p_filename = '/sapio/flatfiles/XXX/'v_date'_XXXX_XXXX.csv'.

p_subrc = 0.
*$*$ end of routine - insert your code only before this line         *-*
endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491882#M839744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491883#M839745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U need to Concatenate ...  using the below statement .. and then use &lt;/P&gt;&lt;P&gt;p_filename&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate '/sapio/flatfiles/xxx/' v_date '_XXXX_XXXXX.csv' into&lt;/P&gt;&lt;P&gt;p_filename.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491883#M839745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491884#M839746</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 try but error again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* create file name
CONCATENATE '/sapio/flatfiles/xxx/'v_date'_xxxx_xxxxx.csv' INTO p_filename.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Franke on Mar 5, 2008 11:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491884#M839746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491885#M839747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please let me know the error UR getting ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491885#M839747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491886#M839748</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 click on the save button and afterwards a error occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax check produced errors in the form routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmm ... need help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 10:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491886#M839748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T10:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Generating file name with date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491887#M839749</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 found the error. I replaced v_date with data and the error doesn't occurred again. Hope that is the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 13:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generating-file-name-with-date/m-p/3491887#M839749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T13:59:31Z</dc:date>
    </item>
  </channel>
</rss>

