<?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: Dynamic loading dates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498736#M1747016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that a combination of TVARVC table and an Abap code will do the trick.&lt;/P&gt;&lt;P&gt;But i am for now stuck how to set it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jun 2013 10:04:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-06-13T10:04:51Z</dc:date>
    <item>
      <title>Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498734#M1747014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;I have a complex requirment in BW, I am looking for a way to automate some laoding filters, I tought that an abap code will help me in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Lets' say we are in period 006.2013. I would like to load all the previous periods limited to the current year one by one until the current period as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;001.2013&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;002.2013&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;003.2013&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;004.2013&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;005.2013&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;006.2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;I think that an abap code and/or SM36 events will help me to schedule process chains. what do you think? Any other ideas based on your own experiences?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Thanks for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 08:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498734#M1747014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-13T08:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498735#M1747015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you would like to play with a variant ?&amp;nbsp; with the TVARVc table ? with an Abap code ?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where do you want to use this value ?&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;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 09:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498735#M1747015</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2013-06-13T09:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498736#M1747016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that a combination of TVARVC table and an Abap code will do the trick.&lt;/P&gt;&lt;P&gt;But i am for now stuck how to set it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 10:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498736#M1747016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-13T10:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498737#M1747017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would like to put that into a selection screen of a specific report ?&amp;nbsp; or you would like to create a job ?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 10:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498737#M1747017</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2013-06-13T10:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498738#M1747018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This process is to be applied to BW infocubes.&lt;/P&gt;&lt;P&gt;So it's better to go with the second option which is creatings a job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 10:40:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498738#M1747018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-13T10:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498739#M1747019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For my point of view the better is to create 12 jobs with two steps. &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First step is an Abap program, that check if a variable of the TVARV is empty or not&lt;/LI&gt;&lt;LI&gt;Second step is the transaction with the variable of the TVARV&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before that, you have to create a job to manage this variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to be more clear.&lt;/P&gt;&lt;P&gt;In the TVARVc, you create twelve variable : 001, 002, 003 .....&amp;nbsp; &lt;/P&gt;&lt;P&gt;001 will contain (for today) 001.2013&lt;/P&gt;&lt;P&gt;002 will contain (for today) 002.2013 &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;007 will contain (for today) //nothing//&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contains of this variable are uptaded by a specific job, that runs at the first day of the month (you could schedul that in the SM36/SM37 trans.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code could look like that (I didn't control the code in SAP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : IS_TVARVC like tvarvc ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w_field(20) type c.&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;field&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 12 times.&lt;/P&gt;&lt;P&gt;&amp;nbsp; if sy-tabix gt sy-datum+4(2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; clear IS_TVARVc-LOW.&lt;/P&gt;&lt;P&gt;&amp;nbsp; else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; concatenate sy-tabix+0(3) sy-datum+0(4) into IS_TVARVC-low.&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&amp;nbsp; concatenate 'MY_FIELD_' sy-tabix into w_field.&lt;/P&gt;&lt;P&gt;&amp;nbsp; assign (w_field) to &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp; check sy-subrc eq space.&lt;/P&gt;&lt;P&gt;&amp;nbsp; update tvarvc .... where name eq &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first step of the job, run a simple program could look like that : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters P_MONTH(3) type c.&lt;/P&gt;&lt;P&gt;data : w_field(20) type c,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w_low type tvarv_val.&lt;/P&gt;&lt;P&gt;field-symbols : &amp;lt;field&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'MY_FIELD_' p_month into w_field.&lt;/P&gt;&lt;P&gt;assign (w_field) to &amp;lt;field&amp;gt;.&lt;/P&gt;&lt;P&gt;check sy-subrc eq space.&lt;/P&gt;&lt;P&gt;select single low &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into w_low&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from tvarvc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where name eq &amp;lt;field&amp;gt; .&lt;/P&gt;&lt;P&gt;if w_low eq space.&lt;/P&gt;&lt;P&gt;message e...(..).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the program will stop with an error, so the second step of the job will never run.&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;P&gt;It's little bit complex, I hope you will find something inside &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1495/images/emoticons/happy.gif"&gt;&lt;/SPAN&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;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 13:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498739#M1747019</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2013-06-13T13:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498740#M1747020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Frédéric &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1495/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 16:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-loading-dates/m-p/9498740#M1747020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-13T16:39:39Z</dc:date>
    </item>
  </channel>
</rss>

