Calculating next month for December month

Hi,
I am able to get the value for a measures in which one measure calculates value for month selected through prompt and another measure calculates values based on next month.
So I have restriced measure 1 like this in where condition
MONTH_V.MONTH_IN_YEAR_NUM=@Prompt('2. Month :','A','Prompt\Month',Mono,Constrained)
Second measure I have restricted like this
MONTH_V.MONTH_IN_YEAR_NUM=(to_number(Substr(@Prompt('2. Month :','A','Prompt\Month',Mono,Constrained),1,2))+1)
This works perfectly alright.
I have prompt for year also. So when I select December - 08 then the calculation goes wrong, since MONTH_IN_YEAR_NUM=13 and there is no corresponding record for 13.
So my question here is can I use CASE statement for this.
MONTH_V.MONTH_IN_YEAR_NUM=
(CASE WHEN (to_number(Substr(@Prompt('2. Month :','A','Prompt\Month',Mono,Constrained),1,2))<>12 THEN
(to_number(Substr(@Prompt('2. Month :','A','Prompt\Month',Mono,Constrained),1,2))+1)
ELSE 1
AND
MONTH_V.MONTH_YEAR=
CASE WHEN (to_number(Substr(@Prompt('2. Month :','A','Prompt\Month',Mono,Constrained),1,2))<>12 THEN
(@Prompt('3. Year :','N','Prompt\Year', mono ,constrained)
ELSE
(to_number(@Prompt('3. Year :','N','Prompt\Year', mono ,constrained)+1)

Hi,
Create 2 condition objects with prompt in universe. one for current month and another for next month from current month.
In report take data from 2 data providers. One for current month and one for next month and apply the corresponding conditions and also take the corresponding measures.
Hope this will help you.
Regards,
Rakesh K

Similar Messages

  • Function Module for calculating NEXT MONTH's start date and End date

    Hi Friends,
    I want a function module which could calculate the next months start date and end date...
    Say my input will be like 01.01.2006(start date) it should return
    01.02.2006 and 28.02.2006...
    IS there any FM for this ... or how to go about this scenario ???
    thanks in advance
    Cheers,
    R.Kripa

    Hi kripa,
    1. There is no DIRECT Way.
    2. We have to do in 2 steps.
    3. See this code (just copy paste in new program)
       U can use its FORM anywhere in your program,
       for getting the desired dates.
    4.
    REPORT abc.
    DATA : sdate TYPE sy-datum,
           edate TYPE sy-datum.
    PARAMETERS : dt TYPE sy-datum DEFAULT sy-datum.
    PERFORM getdt USING dt sdate edate.
    WRITE :/ sdate , edate.
    INDEPENDENT FORM
    FORM getdt USING orgdate stdate enddate.
      DATA : mydate TYPE sy-datum.
      CALL FUNCTION 'HR_PSD_DATES_ADD_MONTHS'
        EXPORTING
          v_date             = orgdate
          V_MONTHS           = 1
       IMPORTING
         E_DATE             = mydate
       EXCEPTIONS
         NOT_POSITIVE       = 1
         OTHERS             = 2
      CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
        EXPORTING
          iv_date             = mydate
        IMPORTING
          ev_month_begin_date = stdate
          ev_month_end_date   = enddate.
    ENDFORM.                    "getdt
    regards,
    amit m.

  • MDX to fetch record from 1st of current month to 5th of next month and same for previous year

    In my date dimension I have a attribute CalendarDate. I do have a hierarchy [Date].[Year].[Quarter].[Month].[CalendarDate] as well. I need to fetch data starting from 1st working day of current month to 5th working day of next month by MDX. I do have a attribute
    to filter working day as IsWorkingDay. How can we get a dynamic MDX that will find the current month first and than it will filter the record from 1st working day of current month to 5th working day of next month. And same for the previous year same month
    to compare.
    Thanks in advance!
    Palash

    Hi P,
    You can use a calculated member to dynamically add all the days in the current month and the first 5 in the following month.  You will need to change measure, cube and hierarchy names.
    with member measures.ThisMonthAnd5 as 
    sum([Date].[Year].parent.children,Measures.[Sales])
    +sum(Head([Date].[Year].parent.nextmember.children,5),Measures.[Sales])
    select 
    {Measures.[Sales]
    ,Measures.ThisMonthAnd5
    } on 0,
    non empty [Date].[Year].[CalendarDate]  
    on 1
    from MyCube
    Richard

  • Selection variable for next month in RFPERIOD_OPEN in closing cockpit

    Hi,
    we would like to use RFPERIOD_OPEN in the closing cockpit in order to open the next period on D-10 automatically. I would like to use the selection variables of the closing cockpit in the program variant in order to avoid unnecessary variant maintenance every month.
    Unfortunately I cannot find a variable for the next month. There is only SAP_FAST_CLOSE_PERIOD_P. Do you know if it is possible to base a calculation logic to derive the next period from SAP_FAST_CLOSE_PERIOD_P.
    Thanks!
    Kind regards,
    Mariya

    Thanks! I checked it, but the appearance of months and order is okay in T247.
    Any other ideas?
    I thought I read somewhere that this is a bug but can´t remember where I found that bug hint.

  • Scheduling agreement delivery schedule not continue for a next month.

    Hi.!
    What are the setting I have to maintain so that delivery schedules are transmitted OR used for particular month not beyond that.(means not required to continue for next month.)
    Thanks and regards,
    Prashant

    Hi,
    You can limit the validity to date (e.g. 31.12.2008) you want in "Source list" via t-code ME01, then after 01.01.2009 system will generate the planned orders instead of the schedule lines in SA.
    Regards
    Tao

  • Hi,i just bought the Creative cloud membership and i would want to know why is t one year policy and you payed alot of money and still pay for the next month? Annual means yearly right ? why do i have to pay another next month.

    Hi i just want to know i bought the creative cloud and photoshop and premiere. All those and it said annual meaning i have to pay for the next year right? But why did it said that i have to pay for the next month? What happens  when i didn't pay the next month ?

    You may buy an annual subscription and pay monthly, or a straight monthly subscription... and, being a subscription, if you stop paying the software stops working
    If you want a one time payment, and you can use 3+ year old software, go to Creative Suite 6

  • Problem with next month for DateNavigator in DynPage

    Hi
    I have a problem with using the DateNavigator in DynPage.
    I can not navigate to the previous/next month by using the event onNavigate();
    The following is my code
        public void doProcessBeforeOutput() throws PageException {
           IPageContext pagecontext = this.getPageContext();
           Form form = this.getForm();
           DateNavigator dn = new DateNavigator(pagecontext);
           dn.setId("myDateNavigator1");
           dn.setMonthsPerColumn(1);
           dn.setMonthsPerRow(1);
           dn.setCenteredMonth(3);
           dn.setOnNavigate("myOnNavigate");
           form.addComponent(dn);
         public void onMyOnNavigate(Event event){
              DateNavigatorNavigationEvent nvEvent = (DateNavigatorNavigationEvent) event;
              DateNavigator dn = (DateNavigator)this.getComponentByName(nvEvent.getComponentName());
              if ("next".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(4);
              if ("previous".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(2);
    Does anybody know what is the problem with it? Or konw how to control the navigation?
    Thank you for help.
    Best Regards
    Zhou

    Hi
    I have a problem with using the DateNavigator in DynPage.
    I can not navigate to the previous/next month by using the event onNavigate();
    The following is my code
        public void doProcessBeforeOutput() throws PageException {
           IPageContext pagecontext = this.getPageContext();
           Form form = this.getForm();
           DateNavigator dn = new DateNavigator(pagecontext);
           dn.setId("myDateNavigator1");
           dn.setMonthsPerColumn(1);
           dn.setMonthsPerRow(1);
           dn.setCenteredMonth(3);
           dn.setOnNavigate("myOnNavigate");
           form.addComponent(dn);
         public void onMyOnNavigate(Event event){
              DateNavigatorNavigationEvent nvEvent = (DateNavigatorNavigationEvent) event;
              DateNavigator dn = (DateNavigator)this.getComponentByName(nvEvent.getComponentName());
              if ("next".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(4);
              if ("previous".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(2);
    Does anybody know what is the problem with it? Or konw how to control the navigation?
    Thank you for help.
    Best Regards
    Zhou

  • In flex charts the label for next month get dropped

    I found for DatatTimeAxis if you set disabledRanges to the last date of the month the label for next month gets dropped using property labelUnits='months". Any ideas? Below is the code:
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the DateTimeAxis class. -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   public var stockDataAC:ArrayCollection=new ArrayCollection([{date: "2005, 6, 1",
                             close: 30}, {date: "2005, 7, 31", close: 25}, {date: "2005, 8, 3",
                             close: 40}, {date: "2005, 9, 4", close: 30}, {date: "2005, 10, 5",
                             close: 50}, {date: "2005, 11, 6", close: 43}]);
                   private var d:Date=new Date("7/31/2005");
                   [Bindable]
                   private var offDays:Array=[d];
                   public function myParseFunction(s:String):Date
                        // Get an array of Strings from the comma-separated String passed in.
                        var a:Array=s.split(",");
                        // Create the new Date object. Subtract one from
                        // the month property because months are zero-based in
                        // the Date constructor.
                        var newDate:Date=new Date(a[0], a[1] - 1, a[2]);
                        return newDate;
              ]]>
         </mx:Script>
         <mx:Panel title="DateTimeAxis Example"
                     height="100%"
                     width="100%">
              <mx:LineChart id="mychart"
                               height="100%"
                               width="100%"
                               paddingRight="5"
                               paddingLeft="5"
                               showDataTips="true"
                               dataProvider="{stockDataAC}">
                   <mx:horizontalAxis>
                        <mx:DateTimeAxis dataUnits="days"
                                             parseFunction="myParseFunction"
                                             disabledRanges="{offDays}"
                                             labelUnits="months"/>
                   </mx:horizontalAxis>
                   <mx:verticalAxis>
                        <mx:LinearAxis baseAtZero="false"/>
                   </mx:verticalAxis>
                   <mx:series>
                        <mx:LineSeries yField="close"
                                          xField="date"
                                          displayName="AAPL"/>
                   </mx:series>
              </mx:LineChart>
         </mx:Panel>
    </mx:Application>

    I found your posted code to be messed up. I fixed it and could not see your problem.
    Here is the fixed code.
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the DateTimeAxis class. -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   public var stockDataAC:ArrayCollection=new ArrayCollection([
                     {date: "2005, 6, 1", close: 30},
                     {date: "2005, 7, 31", close: 25},
                     {date: "2005, 8, 3", close: 40},
                     {date: "2005, 9, 4", close: 30},
                     {date: "2005, 10, 5", close: 50},
                     {date: "2005, 11, 6", close: 43}]);
                   private var d:Date=new Date(2005,8,31);
                   [Bindable]
                   private var offDays:Array=[d];
                   public function myParseFunction(s:String):Date
                        // Get an array of Strings from the comma-separated String passed in.
                        var a:Array=s.split(",");
                        // Create the new Date object. Subtract one from
                        // the month property because months are zero-based in
                        // the Date constructor.
                        var newDate:Date=new Date(a[0], a[1] - 1, a[2]);
                        return newDate;
              ]]>
         </mx:Script>
         <mx:Panel title="DateTimeAxis Example"
                     height="100%"
                     width="100%">
              <mx:LineChart id="mychart"
                               height="100%"
                               width="100%"
                               paddingRight="5"
                               paddingLeft="5"
                               showDataTips="true"
                               dataProvider="{stockDataAC}">
                   <mx:horizontalAxis>
                        <mx:DateTimeAxis dataUnits="days"
                                             parseFunction="myParseFunction"
                                             disabledRanges="{offDays}"
                                             labelUnits="months"/>
                   </mx:horizontalAxis>
                   <mx:verticalAxis>
                        <mx:LinearAxis baseAtZero="false"/>
                   </mx:verticalAxis>
                   <mx:series>
                        <mx:LineSeries yField="close"
                                          xField="date"
                                          displayName="AAPL"/>
                   </mx:series>
              </mx:LineChart>
         </mx:Panel>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • How to keep showing items created in current month for 5more days only in the next month by OOB functionality only

    Hi,
    I have a Time Reporting site where users log in their time twice a month.This site uses only Out Of Box functionality. There is no scope for coding in my site.
    In the list i have created a view which shows the Time Report of the user logged in for the current month only.
    There is a new requirement : Current month's Time Report should be visible to the users in the next month for 5 starting days of the month only so that users can edit this month's Time Report in the next month's 1st 5days incase they forget to edit it in
    the current month.
    e.g: If i am absent on the last day of the month , my time report for this month(March) should be visible for 5 days in April so that i can stiil edit March's time report. However after 5days the Time Report for March should not be visible. After 5days only
    April's time report will be visible when submitted(April's time report).
    Please can anybody help me out with this.
    Regards ,
    Guru

    Hi Guru, you have a couple of options: 1) set a retention schedule through the list's settings> Information Management Policy Settings. Where the start date < start date + 35.
    2) create a view and filter by the date like above.
    These aren't perfect scenarios, but will get you close to what you want.
    cameron rautmann

  • After downloading the new 6.0, I cannot seem to sync with my Google calendar.  It will give me a schedule for a few weeks but if I ask for what's going on next month, it will take forever to come up and then say "no events scheduled." What's up?

    After downloading 6.0 on my ihpone 4 I am having trouble syncing events on my google calendar.  If I pick a day next month it will take forever to come up and then say "no event scheduled."  Can I just go back to the old operating system?   I'm not using any of the new 6.features anyway.

    Hi, beth.lau.gr.
    Thank you for visiting Apple Support Communities.  
    I understand you have been experiencing issues with your iPhone restarting and showing you a blue screen.  I wont be able to give you an exact answer as to why this is happening.  However, this is the most relevant troubleshooting article for this issue.  This article also provides options to reach out to us via phone for additional assistance.  
    If your iOS device restarts, displays the Apple logo, or powers off while you're using it
    http://support.apple.com/en-us/HT203899
    Cheers, 
    Jason H.  

  • How to get back money paid for next month subscrit...

    Inspite of cancelling automatic subscription,skype has charged subscription for next month.please help to revert it back.

    Hi,
    https://support.skype.com/en/faq/FA1881/How-do-I-c​ancel-my-subscription ?
    https://support.skype.com/en/faq/FA297/How-do-I-re​quest-a-refund ?
    https://support.skype.com/en/faq/FA1170/How-can-I-​contact-Skype-Customer-Service ?
    Hth
    On ne regarde pas l'avenir dans un rétroviseur !
    IMac Intel Core i3 3.2 GHz - RAM 12 GB - OS 10.10.3
    Skype 7.8.391
    Logitech usb headset or Jabra 250 bt

  • To get Current,Last, Next months data for Efashion report

    To Create a report with the user input prompt on Year and Month:
    If user select year as 2005 and month as 2 (Feb), revenue should be displayed for previous Month (Jan) and next month (March) of selected year.
    Sample output should looks as below.
    Year : 2005
    State
    Prev Month - Jan
    Current Month - Feb
    Next Month - Mar
    AAA
    $100
    $100
    $600
    BBB
    $200
    $400
    $200
    CCC
    $300
    $300
    $300
    I have created dimensions in universe premonth=(@Select(Time period\Month) -1) & Nextmonth=@Select(Time period\Month) +1) & taken 3 dataproviders from efashion universe .these are not working for year ends

    Hi
    solution found, taken 3 data providers & added below filters for 2 &3 data providers
    DP2
    @Select(Time period\Year)=iif(@Prompt('Enter Month','N','Time period\Month',,)=12,@Prompt('Enter Year','A','Time period\Year',,)+1,@Prompt('Enter Year','A','Time period\Year',,))
    @Select(Time period\Month)=iif(@Prompt('Enter Month','N','Time period\Month',,)=12,1,@Prompt('Enter Month','N','Time period\Month',,)+1)
    DP3
    @Select(Time period\Year)=iif(@Prompt('Enter Month','N','Time period\Month',,)=1,@Prompt('Enter Year','A','Time period\Year',,)-1,@Prompt('Enter Year','A','Time period\Year',,))
    @Select(Time period\Month)=iif(@Prompt('Enter Month','N','Time period\Month',,)=1,12,@Prompt('Enter Month','N','Time period\Month',,)-1)
    Thanks

  • How to control the depreciation for revaluation from next month ?

    Dear all,
    I post current year ord. depreciation revaluation via trx. ABAW (Bal. Sheet Revaluation), and the general ledger will be updated after depreciation run.
    In our client, the scenario is  AFAB (dep run) --> ABAW (revaluation) --> AFAB (dep repeat run).
    Now my problem is I want the revaluation value be depreciated next month and the second AFAB just for general ledger posting.   I have set the period control '11'(next month) for revaluation but  it doesn't work, the second AFAB still generates both G/L and depreciation posting.
    How can I control the revaluation depreciation from next month?
    Thanks for your help.

    Hi,
    we have used a different approach. We run two separate depreciation areas:
    01 - ordinary depreciation
    03 - revaluation
    We maintain two complete streams of data. 01 is linked to the original acquisition value of the asset and depreciates normally.
    03 is linked to the revaluation. Each month we recalculate the replacement value, revalue the accumulated depreciation and then run depreciation using transaction AFAB.
    I don't think it will work in the way you described.
    Kind regards,
    Rudolf

  • Leaving for Europe next month

    We're leaving fro Europe next month & e both have I'pads mine 1st generation & his 2nd generation bith 32gb. We also have I'phones mine the 5 & his the 4S.
    What do we need to do or get before leaving so our equipment works in Italy & Greece.

    You do not need converters anymore. All you need are adapters. The converters are heavy brick type things. I learned the hard way and carried one to Europe and didn't need it once.
    You will need adapters as Tone Fox said. They are very small and convenient. You can also buy an all in one, though with all your equipment, you might consider two, especially if you also will be charging cameras. Many of the all-in-ones also have one or two usb ports which are very handy charging ipods while you are also charging ipads, etc.
    Wuzradioman's Apple solution sounds good, too. I wasn't aware that it came with adapters, too. I also was not aware that some parts of Greece have a different system. Most all-in-ones have have three prongs one for USA/Aus, another for the UK, and another for southern Europe which I always thought included all of the countries.
    You might want to google your ques. regarding areas in Greece, and if not successful, try the Greek Embassy in your area.
    Also, if you do take pictures, (and as great as the newer ipads are they cannot take the place of a camera and ipads 1 and 2 are definitely not good cameras) you might want to buy Apple's camera connection kit at $29.99. You'll be able to upload pictures from your camera with your usb cable or with an sd card reader that's included to your ipads so you can better look at and share your pictures while you travel. I recently was sent pictures that were taken with iphone 5. If I try to blow them up the tiniest bit to see them better, the grain is horrible!
    I haven't been to Greece, though I've heard it's beautiful! And you'll never get the quality of pictures you'd hope to get in Italy without a digital point and shoot or a digital slr (dslr.) Check out reviews of cameras. You can get a decent camera for very little. And sd cards usually go on sale fairly often at places like Best Buy. (An 8gb sd card that is usually is $24.99 is often $12.99. I'd recommend a case for those and as each one is filled, add the pictures to your ipad. DO NOT format or reformat it (same thing and pictures will be gone.) As security, save each as an external until you get home and get all pictures on your computer at home. (If you have or borrow and older point and shoot be aware that many of the newer sd cards so not work on those so make sure you check. And all of these things are much lesss expensive in the USA (if that's where you are than in Europe.)
    http://store.apple.com/us/product/MC531ZM/A/apple-ipad-camera-connection-kit
    Enjoy Europe!

  • Actual activity cost should be planned for the next month

    Hi,
    I need the solution like this. Our fiscal year April to March. We want the actual activity prices of the April should be planned for the May month. And may month actual prices should be planned for the next month. Like that we want use our activity prices.
    For this where we have to configure and what transaction codes we have to run in month end.
    please guide me
    Sateesh

    Srikanth,
    I know KP26 will be maintained for plan values.
    This month actual should be planned for next month. and next month actuals should be planned for coming month.
    Please guide me where i have to confiure this type of requirement.
    Sateesh

Maybe you are looking for

  • Insert rows in pages

    How do you add rows in a table in "pages" on an iPad?

  • Question about imported file

    Hi, I was taking a look to the tutorial provided by the otn web site about TopLink and I saw that we have to import the source.jar file. I'm working with JBuilder and I have imported as a library toplink.jar, antlr.jar and xerces.jar and it works fin

  • How to choose what is backed up in icloud?

    Hello, I would like to find out how to choose what is backed up in iCloud. Mine is full but i dont think everything on my phone needs to be in there. Can you please help me filter what should be backed up and what doesn't. Thanks, Julie

  • Reports error (9i)

    I have a column in my database that contains the name of an image file. I created a field on the report for this column, with the 'Read from File' set to Yes and the format set to 'image'. The report is to show a list of employees and their photo's h

  • IMAP emails change to automatically read?...

    I've just set up my emails to come through IMAP, however when a new mail comes in, it changes to read automatically after a few minutes. Anyone know why? Thanks.