Previous Month Data

Hi Friends,
      Good day,
I want to get the previous month balance.
Here is the my business scenario. I am going to enter the month and year then i can get the values corresponding to this month and year, but in this i want previous month data for one object or one measure.In that query i set the two filter
Enter Month Name:
Enter the Year:
Say for ex, if i enter August means i need all august month data plus i need previous month balance for balance object.if i suppose enter January and year is 2008 means. I need December month data for year 2007 for the balance object and for remaining i need January month Year 2008 data.
Any Suggestions,
Thanks lot,
Regards,
-B-

Hi Balaji,
You are a lucky guy, that's why getting these much reply. Congratulations friends for your good replys. I also find a solution with access database and  if and mod operation.
temp.Yr ; =  @prompt('Enter Year:','A','Time period\Year',Mono,Free,Persistent,,User:0)
    AND
temp.Mth ; = @prompt('Enter Month:','N','Time period\Month',Mono,Free,Persistent,,User:0)
   OR
temp.Yr ; = @prompt('Enter Year:','A','Time period\Year',Mono,Free,Persistent,,User:0) - (IIF(@prompt('Enter Month:','N','Time period\Month',Mono,Free,Persistent,,User:0)=1,1,0))
AND
temp.Mth ; =( (@prompt('Enter Month:','N','Time period\Month',Mono,Free,Persistent,,User:1)+10)mod 12)+1
The filter contain...
............year equal to @year
........and
............month equal to @month
or
............year equal to @year
........and
............month equal to @month
Regards
Eldose

Similar Messages

  • Is it possible to post the Excise invoice previous month date.

    Dear All,
    We want to post a excise invoice with previous month date. Is that possible?
    We have created a billing document (VF01) last month (October) and not created Excise Invoice (J1IIN).
    Now our finance people requirement is to create the excise invoice with last month date.
    Kindly let me know whether it is possible.
    Regards,
    Mullairaja

    Yes quite possible provided your FI period is still open.  Once you execute J1IIN and clicked the tab "Billing", you can see a field Posting Date where you maintain the billing document date itself if FI period is open.
    But from excise point of view, this is wrong due to the fact that excise returns should be submitted on or before 3rd of every month in which case, the excise team would have submitted the returns for October.
    thanks
    G. Lakshmipathi

  • How to show a report for 'Previous Month' Data

    Hi Gurus,
    I have a requirement, where i have to default my report to show previous month data.
    Scenario:
    My prompts by Default are set to CURRENT (current year,quarter,month). once the user logs in, the report should display data for month 'Nov' instead of 'Dec'.
    I tried using TIMESTAMPADD() in the formula , but it didn't work, though i don't see any error. Not sure if i 'm missing something.
    Is there a way to achieve this.I 'm using OBIEE 11.1.1.6.
    Any help is highly Appreciated ! Please.
    Thanks,
    Ramya

    From what you wrote I am assuming the user can manually save the report results to the Excel file.
    If your report uses ALV Grid it is possible to export the data to a spreadsheet (one of the functions available in the ALV tool bar).
    If you have used WRITE statements it is also possible to save the output as a spreadsheet (menu System -> List -> Save), but the latter will not produce as nice a spreadsheet if the data don't form a matrix. In other words, some work may be necessary in the spreadsheet afterwards before it has the format your user wants.

  • Help with Setting Previous Month Date Parameter for SSAS via SSRS

    Hi All,
    Firstly, any assitance is greatly appreciated.
    Now, I am working on developing a report for a business area that will be sent on the first of every month. The report will contain data for all records created in the previous month, current year.
    I have been able to successfully implement a default year parameter, which will default to current year-
    ="[REFERRAL LODGEMENT DATE].[CAL YEAR].&["+CSTR(Year(Today))+"]". However, when I attempt to set a previous month paramater it is not setting when the report is generated. The code I have used
    is as follows: 
    ="[REFERRAL LODGEMENT DATE].[CAL MONTH NAME].&["+CSTR(Month(Today)-1)+"]"
    Cheers

    Before you spend more time trying to fix the parameter, let me suggest that you can write MDX to come up previous month data.
    if you can't go that route, couple of things to consider for your approach:
    1) don't subtract 1 from January that won't work. you'll need to handle it using the ssrs expression.
    2) when you use the month function it's going to return a month index so effectively you are passing something like [REFERRAL LODGEMENT DATE].[CAL MONTH NAME].&[7] to SSAS, is that the current format?
    you can use the MonthName function to get month names but again make sure that the formatting is right.
    to see the parameter value, you can display it on the ssrs report and see if it's the right format.
    Paras Doshi (Blog: ParasDoshi.com | Twitter:
    @Paras_Doshi )

  • Need to show Previous months data in report

    Hi All,
    I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report.
    My report also has two parameters- start date and end date. If I give Start date as 1/1/2012 and end date as 12/31/2013 (two years date range) then correct data comes in all columns and for 2013 year, correct data is coming for Previous 12 months column. But if I give only one month date range like start date as 1/1/2013 and end date as 01/31/2013, then it is not showing correct data for these 3 columns - Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data. Ideally as per requirement, it should calculate previous months data regardless of parameter values and put data in respective columns.
    Any help/suggestion? Any trick which can help me to show correct data in all columns no matter what date range or months I am taking in parameters.
    Is it mandatory to have previous 12 Months data in report to calculate column-Previous 12 months Cash data?
    Thanks,
    Remi

    Hi Remi,
    You can try like this:
    I have given a some suggestions i.e You just take one parameter only because u can imagine 3 columns previous data display correctly i.e From Date
    Month parameter is also a alternate option.
    For Ex: Column1: From Date - 90 Days/3 Months  - we get the three months previous data correctly etc.
    Finally, create a stored procedure that returns the required columns and does all the calculations on the database side.
    Follow abhilash suggestion as well.
    Useful threads: Crystal Report Parameter Issue
    Pull Last 6 months of data
    Month to date data for Previous month
    How to find current month, previous month Net Sales by means of formula?
    Thanks,
    DJ

  • Sample ABAP routine code to load only previous month data in INFOPACKAGE

    Hi all,
    I want to create one ABAP routine in InfoPackage (Variables change to selection values with background processing) for 0CALMONTH ( Calender year month) so that whenever this infopackage is executed it should fetch only previous month data.
    Can anyone please provide any sample code for that.
    Thanks in advance.
    Uday shankar.

    Hi
    Please check with below code, hope this will resolve your issue
    WHEN: 'ZLASTP'.
         CLEAR: h_period, h_gjahr.
         CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
           EXPORTING
             i_date               = sy-datum
       I_MONMIT             = 00
             i_periv              = 'AF'
          IMPORTING
            e_buper              = h_period
            e_gjahr              = h_gjahr
    EXCEPTIONS
       INPUT_FALSE          = 1
       T009_NOTFOUND        = 2
       T009B_NOTFOUND       = 3
       OTHERS               = 4
         IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         IF h_period = '001'.
           h_gjahr = h_gjahr - 1.
           h_period = '012'.
         ELSE.
           h_period = h_period - 1.
         ENDIF.
         CLEAR l_s_range.
         CONCATENATE h_gjahr h_period INTO l_s_range-low.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         APPEND l_s_range TO e_t_range.

  • Trying to fetch previous month data

    hi ...
    i have to develope a report in which cutomer on selecting month from the prompt , i have to show transactions for that selected month,transactions for previous month and growth %.
    for fetching previous month data i am using the below formula in column
    FILTER(etxnmistopbr.tot_txns USING (etxnmistopb(TIMESTAMPADD(SQL_TSI_MONTH, -1,etxnmistopbr.month_year)))
    but it doesnt fetch any result.
    i have tried
    FILTER(etxnmistopbr.tot_txns USING (etxnmistopbr.month_year= TIMESTAMPADD(SQL_TSI_MONTH,-1,timestamp '@{current_year}{2012}-@{current_month}{07}-31 00:00:00')))
    where current_year and current_month are presentation variable
    but it throws error as "
    HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 2012-8-31 00:00:00 does not match the specified format. (HY000) "
    can anyone please help how to retrieve previous month data and current month data
    Edited by: 8826 on Sep 27, 2012 4:31 AM

    I would recommend using Time Series Functions, specifically the Ago function in the RPD. This is precisely what they have been designed for and is a very powerful feature of OBIEE. This removes the need for complex formulae embedded within result columns (which you will have to replicate each time you create a new analysis).
    The syntax of the Ago function is as simple as:-
    AGO(Measure, Time Dimension Level, Number of Periods Ago) e.g.
    AGO(Core."Fact - Project Cost".Cost, Core."Date - Fiscal Calendar"."Fiscal Period", 1)
    Please mark if helpful/answered.
    Andy.

  • Previous month data in WebI Report

    Hi All,
    I have a universe created on a Bex Query. I don't have any variables created in the Bex Query. I have to create a WebI report with Calendar Year/Month as selection and depending on what user enters, i have to display Cost for the month entered by the user and cost for (month -1 ). For eg. if the user enters Feb 2009, then the report should display Cost for Jan 2009 and Feb 2009. I have created a filter for Calendar Year/Month. How do i bring previous month data in the report ? I don't have to modify the Bex Query. I have to achieve it on the BO side. Can you guys help on this problem.
    Thanks,
    Saachi

    Hi,
    There is a restriction in BO when you use it with SAP.
    When the user filters the data for FEB 2009, you will not be able to get data for JAN 2009 as it does
    not go again to the Bex query to fetch this data.
    The only workaround as of now to this is to bring all the data using Bex query by having a filter
    at the BO Query level where you say Cal year/month key = (From prompt) or 
                                                          Cal year/month key <> #.
    This is because it considers Cal year/month as string and so even at the universe level we will not
    be able to create a previous month formula.
    I hope this helps.
    Thanks,
    Kartik

  • How to get previous month data from current month values

    Hi Experts,
    I have made one universe from BW Query in which Fiscal year period is entered in interval.
    I have made a universe from that and want to develop webI reports on top of that.
    In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
    Requirement:
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Jan'09         Sales of Feb'0f         and so on....
    I am getting this.
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Feb'09         Sales of Mar'09         and so on....
    I hope i have clear my requirements.
    Please help as soon as possible.
    Thanks in Advance,
    Rishit

    Hi Rishit,
    Follow the below steps to get the desired result.
    Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
    to_date('substr('009.2009',2)','mm.yyyy')
    you will get the result 01 sep 2009
    Step2: Convert this format to 01/09/2009 by using date functions.
    Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
    Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
    you should get the following result.
    01/02/2009 01/03/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Step5: Use the following formula in your Column (date) formula bar.
    =(<date>-1)-DayNumberOfMonth(<date>-1)+1
    You will get the following result:
    01/01/2009 01/02/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Format the cell according to your reruirement.
    Let me know if you will get any break in the above steps.
    Regards,
    Swati.

  • ABAP routine for loading previous months data in infopackage

    Hi,
    I have an infopackage included in a process chain. The issue is that I need to load previous month's data through the infopackage and I have a data field which is of date type. I could not find an appropriate OLAP variable so I chose the ABAP code in the infopackage. My knowledge of ABAP is not very good so I thought I could get some insight from someone. Need this to be a periodic job/regular without any developer interference.
    Edited by: BG on Apr 9, 2008 1:03 PM

    Hi
    Try this code and see if you are able to achive the results
    data: month(2).
    data: date  like sy-datum,
          last  like sy-datum,
          first like sy-datum.
    read table l_t_range with key
    fieldname = 'BLDAT'.
    l_idx = sy-tabix.
    date = sy-datum.
    month = date+4(2).
    if month = 12.
      month = 01.
    else.
      month = month - 1.
    endif.
    move month to date+4(2).
    call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
      exporting
        day_in                  = date
    IMPORTING
       LAST_DAY_OF_MONTH       = last
    EXCEPTIONS
      DAY_IN_NOT_VALID        = 1
      OTHERS                  = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    first = last.
    move 01 to first+6(2).
    l_t_range-low  = first
    l_t_range-high = last
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    modify l_t_range index l_idx.
    p_subrc = 0.
    paste the code as it is in your editor activate this and see if you are able to achive the results.
    assign points if useful.
    regards
    Vishal
    Edited by: Vishal Vashishta on Apr 9, 2008 2:33 PM

  • Current & Previous month data based on condition

    Hi All,
             Thanks in advance.
    I have some problem in reporting......
            I have to display curr and pre months data .
    If i give fiscal period as 009.2006 i should display no of contracts for 1_90 , 90_180 based on last adjustment date .
    No.of contracts for  <b>last day</b> of given period- <b><b>last adjustment date</b> <=90 .
    Like i should display for given period and previous period.
    If given period is 009.2006 .last day of this month is 31/12/2005.
    like last day for previous period is 30/12/2005.
    Thanks & Regards,
    Sarada .<b></b><b></b>

    Hi Eugene,
               Here is the code..
    WHEN 'LDAT_PRV'.        " Get last day from the given period.
    IF I_STEP = 2.
        REFRESH E_T_RANGE. CLEAR E_T_RANGE.
        LOOP AT I_T_VAR_RANGE INTO TEST WHERE
          VNAM = 'PRV_PER' and IOBJNM = '0FISCPER'. "Contract Enddt
    CONDENSE TEST-LOW.
        V_GJAHR = TEST-LOW+0(4).
        V_BUPER = TEST-LOW+4(3).
    call function 'LAST_DAY_IN_PERIOD_GET'
           EXPORTING
            I_GJAHR = V_GJAHR
            I_PERIV = 'T1'
            I_POPER = V_BUPER
           IMPORTING
            E_DATE = ENDDT.
    IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ELSE.
           CLEAR LS_RA_SID.
           LS_RA_SID-SIGN = 'I'.
           LS_RA_SID-OPT = 'EQ'.
          LS_RA_SID-LOW = ENDDT.
          APPEND LS_RA_SID TO E_T_RANGE.
          EXIT.
       ENDIF.
            EXIT.
        ENDLOOP.
      ENDIF.
    Like i have created for one more variable for given period.
    I need last dates for the given and previous periods....
    Best Regards,
    Shradda

  • Is it possible to run MRKO settlement for previous month date.

    Hi Experts,
    I  have a requirement from client, where they need to do the MRKO settlement in previous month period.
    I know the posting date and document date by default taken as current date.
    For Example : I have done the GI on 25/05/2010 and forgot to do the settlement on the same month
    now suppose on 02/06/2010 i want to do the settlement for 25/05/2010.
    In this case system will take the current date as posting date, is it possible here to change the posting date to
    pervious month period 25/05/2010????
    what is the standar rule according to SAP and if it is possible to post in the back date will it impact anything further.
    Please help me in solvning this issue.
    Rabindra S

    Use Exit "EXIT_RMVKON00_001".
    It read the date from posting date and settle on given posting date
    And follow the follwing code....
    DATA: wa_rkwa TYPE rkwa,
          wa_bseg TYPE bseg,
          wa_bkpf TYPE bkpf,
          fieldname(80),
          myidx TYPE i,
          ex_poper LIKE t009b-poper,
          ex_gjahr LIKE t009b-bdatj.
    FIELD-SYMBOLS: <fs_date> TYPE rkwa-bldat.
    MOVE '(RMVKON00)SO_BUDAT-HIGH' TO fieldname.  "<fs_bkpf>-budat.
    ASSIGN (fieldname) TO <fs_date>.
    LOOP AT t_rkwa INTO wa_rkwa.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          i_date               = <fs_date>
          i_periv              = 'V3'
       IMPORTING
         e_buper              = ex_poper
         e_gjahr              = ex_gjahr
       EXCEPTIONS
         input_false          = 1
         t009_notfound        = 2
         t009b_notfound       = 3
         OTHERS               = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE t_bkpf INTO wa_bkpf
                    WITH KEY bukrs = '1000'
                             belnr = wa_rkwa-belnr
                             gjahr = wa_rkwa-mjahr.
      IF sy-subrc EQ 0.
        myidx = sy-tabix.
        wa_bkpf-monat = ex_poper.
        wa_bkpf-gjahr = ex_gjahr.
        wa_bkpf-budat = <fs_date>.
        wa_bkpf-bldat = <fs_date>.
        MODIFY t_bkpf FROM wa_bkpf INDEX myidx. " TRANSPORTING bldat budat.
      ENDIF.
    ENDLOOP.
    Regards
    Rasmi Ranjan Mishra

  • Syntax for previous months data

    For some reason I cannot get the syntax of the previou month correct. Here is what I have used.
    ("Date"."Calendar Month" IN (SELECT case when 1=0 then "Date"."Calendar Month" else timestampadd (sql_tsi_month, -1, current_date) end FROM "RProBIEE"))
    However it doesn't like this. I get an error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22027] Union of non-compatible types. (HY000)
    SQL Issued: SELECT s_0, s_1, s_2, s_3, s_4 FROM ( SELECT 0 s_0, "RProBIEE"."Date"."Calendar Month" s_1, "RProBIEE"."Stores"."Store Name" s_2, "RProBIEE"."Sales Amounts"."Local Revenue" s_3, REPORT_SUM("RProBIEE"."Sales Amounts"."Local Revenue" BY "RProBIEE"."Stores"."Store Name") s_4 FROM "RProBIEE" WHERE (("Date"."Calendar Month" IN (SELECT case when 1=0 then "Date"."Calendar Month" else timestampadd (sql_tsi_month, -1, current_date) end FROM "RProBIEE"))) ) djm
    I think it is saying that the it doesn't like (sql_tsi_month, -1, CURRENT_DATE) however If I use CURRENT_MONTH it doesn't like that either.
    Any help is appreciated.

    Hello... The data type for the "Date"."Calendar Month" value is TINYINT. So i assume you are right that i need to CAST this so that it matches CURRENT_DATE. Or perhaps maybe instead I need to CAST current DATE as TINYTINT to match? Do you happen to know the syntax? This is what I have but it's not working. I get syntax errors.
    "Date"."Calendar Month" IN (SELECT case when 1=0 then "Date"."Calendar Month" else (cast (timestampadd (sql_tsi_month, -1, current_date))))

  • I pad mini calendar previous months dates disappear

    i pad mini calendar deletes the last months calendar appointments. I try re entering them and they staty for a second then disappear instantly. I enter all on my i pad mini and they sync on i phone 5 but those are gone too. these dates and times are important to keep track of . I have only had the i pad mini for several month and phone  a month longer. Doe sit have anything to do with i cloud which I am notified that it can not store anymore.

    Thank you so much !! I am in a small town and can not make it in to the next city with the Apple store for more instruction and did try to watch tutorial videos on line. Really appreciate I will not have to start using paper calendar for my husband chemo appointments. Thanks again!!.

  • Check 3G data usage for previous months?

    Where do I go to check my 3G iPad2 data usage for previous months?
    I look in the Settings / Cellular Data / View Account - but only see the current month.
    I tried to create a My Verizon account on the verizon wireless web site using my iPad phone number but I get the error "We're sorry, but at this time you cannot register your account for My Verizon. Please access your account information on your device."
    I installed the "My Verizon" app for ipad from the App Store but I get "System under maintenance.  Please Try again." all the time.
    Is there someplace else I can see previous months data usage?  I would like to get a sense how much I have used in the past.
    Thanks
    Joe

    Dear AdamE+VZW and AntoniioC_VZW
    Have you actually tried the advice you gave?  I'm 6 days into my billing cycle.  The furthest back I am able to see data traffic is 6 days.
    The specific navigation path "View Bill --> I Want To...  --> Month ---> Usage Details --> Data"  does not currently exist.
    As far as I can tell, AdamE's claim that "You can easily see the past six months of data usage on our website " is untrue.
    The report generated by the "Account Analysis" is plainly false as well.  It reports that both of my data phones used exactly 1024.00 MB in February, March, and April. (sic: 2 decimal points!!).  That is an exceedingly unlikely coincidence, and flatly contradicts the current month summary which reports that one of my phones has used only 23 MB, and the other line even less.  The "Account Analysis" has a bug so serious as to render its data traffic output absolutely useless.  Since it is providing false output, it should be removed from the site until it can be fixed to generate accurate reports.
    I can't even find a way to see my prior month's summary bill, though I can't be sure it is unavailable since the site is large.  But I can say that when a customer spends 15 minutes clicking around a site trying to find their prior month's bill (not merely the bill's dollar amount, but the bill's usage summary) and fails, the site navigation should be improved!!

Maybe you are looking for

  • Report containing bar chart

    I am new to charts in crystal reports. In my database i am having 200 students. In that i have one coloumn which is containing the ranks of student (1,2,3,..). In the report , i need to display, 1) X-axis ->ranks should be dispalyed (1,2,3,4,5) 2) Y-

  • Import Purchase Procedure

    Hi all, Can any one explain me the Import Purchase procedure including  customisation .?

  • How to view documents in a cost centre

    HI, Can anybody tell me the t code to see the documents in a cost centre....! Regards RP

  • Disable POV for multigrid report?

    Hi everyone, I have a workbook that contains worksheets with single Smart View connections to Essbase as well as multigrid worksheets (each grid with different POV's). When I try to refresh any of the worksheets or refresh all, I am now getting an er

  • About form printing....

    hi all,   i have desined a layout for the form but i am getting the varintion in in the layout print preview... i.e., if i use LP01 as printer i am getting the lineitem in  in single line for one lineitem, if i use LOCL as a printer lineitems are get