<?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: Batch job variant in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092412#M1507351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Salai's reply is correct, if your process looks at the complete previous month, then it must be scheduled at the beginning of the following month. Then there is no problem with delayed execution and variant values.&lt;/P&gt;&lt;P&gt;It's not directly ABAP related anyway, so please properly close this thread now.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jul 2010 11:27:47 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-07-09T11:27:47Z</dc:date>
    <item>
      <title>Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092407#M1507346</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;&lt;/P&gt;&lt;P&gt;we have defined a batch job that runs at the end of every month. i.e before 24 hrs on 30th of evry month. The batch job creates invoices for the period from 1st -30th of every month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the variant,we have defined the date as variable and selected the option" last day of month". I think this option means that the date range is 1st onwards till 30th of the mothh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for example we want to create invoices for the monh of june. so as scheduled, the batch job will run on 30th June before 24 hrs . But for any reason the batch job stops running due to any dump etc and after anaylsing the problem,we run the batch job again but let's say at 00.25 hrs (1st July), then the date selected for the batch re run  is 1st july--1st july and the date settings of 1st june to 30th june is lost and so none of the invoices for the month of june are created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advice how to solve this date problem so that even if the batch job fails and the job is run again on the next day (1st day of july), then the date in the variant shud consider the last month dates (i.e from 1st till 30th jun)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 17:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092407#M1507346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T17:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092408#M1507347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  For that you have to write code which fill up date range automatically. No need to write date in variant it will done by code and have to keep check if sy-datum is between 1 - 28 then consider get previous month last date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_date like sy-datum,&lt;/P&gt;&lt;P&gt;         v_mon(2) type c.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;s_datum-sign = 'I'&lt;/P&gt;&lt;P&gt;s_datum-option = 'BT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-datum+4(2) &amp;lt; '30'.&lt;/P&gt;&lt;P&gt;v_mon =  sy-datum+4(2).&lt;/P&gt;&lt;P&gt;same do for year if month is 01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_mon = v_mon - 1.&lt;/P&gt;&lt;P&gt;concatenate sy-datum(4) '1' v_mon into sy-datum.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '1' sy-datum(6) into v_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_date-low = v_date&lt;/P&gt;&lt;P&gt;s_date-high = sy-datum&lt;/P&gt;&lt;P&gt;append s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just exaple u have make changes as per your requirment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 17:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092408#M1507347</guid>
      <dc:creator>mukundkansara</dc:creator>
      <dc:date>2010-07-08T17:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092409#M1507348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you are not getting dump any more. Then go for a temporary variant for the required month like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

BEGDA = First day of the previous month.
ENDDA = Last day of the previous month.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the job is over , move back to your original variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 18:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092409#M1507348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T18:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092410#M1507349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should schedule the job on the first day of everymonth at 00:30 am and set the date in the variant to "last date of previous month"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 19:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092410#M1507349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092411#M1507350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukund,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply.Actaully Iam an SD consultant. I need to know where to do the coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if the the Batch job name is A and it calls program zxy. Then are you saying to do the coding in zxy with no date in the variant of job zxy ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 04:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092411#M1507350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T04:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092412#M1507351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Salai's reply is correct, if your process looks at the complete previous month, then it must be scheduled at the beginning of the following month. Then there is no problem with delayed execution and variant values.&lt;/P&gt;&lt;P&gt;It's not directly ABAP related anyway, so please properly close this thread now.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092412#M1507351</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-07-09T11:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092413#M1507352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are right  that is what i mean. But you can also follow Salai's reply. But it will work for few hours. and if you make changes to code then you dont need to add date in variant, program will automatically consider it. Now you decide which one is better option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092413#M1507352</guid>
      <dc:creator>mukundkansara</dc:creator>
      <dc:date>2010-07-09T11:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092414#M1507353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you dont need to add date in variant, program will automatically consider it. Now you decide which one is better option.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that's incorrect!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A job scheduled month-end -in the way Salai advised- need never be adjusted: it reads the factory-calendar, you know? As for variants - like here in report SDBILLDL - you can use date-variables in variants ... - again, no adjustment necessary!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-variant/m-p/7092414#M1507353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T11:51:04Z</dc:date>
    </item>
  </channel>
</rss>

