Month to Date and Year to Date Scenarios

<b>Dear SAP BI Gurus,
Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1?  The date is in decimal and not DATE format…  I’m assuming the reason for this is to get the Time variance….  Nonetheless, I’d like to create a MTD and YTD scenario for reporting.
Much Thanks
Philips Manalaysay</b>

Hi,
You should take a look at the blog and doc below.
/people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
Regards,

Similar Messages

  • Month to Date and Year to date calculation

    Hello Experts,
    It would be great If you could provide the formula to implement in BO universe or in the Reporting level for the below requirement.
    MTD, LastMonth, Year to Date, Last to LastMonth and examples are below.
    Last Week:
    Eg: Monday through Sunday
    Description: Based on Todayu2019s date, select the Monday of the previous week for the start date and Sunday will be the end date.
    Example:
    If Today is May 22, 2009
    The result would be, Monday = May 11, 2009, Sunday = May 17, 2009
    MTD:
    If Today is May 22, 2009
    I need a result MTD = May 1, 2009 u2013 May 21, 2009
    LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = April 1, 2009 u2013 April 30, 2009
    Last to LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = March 1, 2009 u2013 March 31, 2009
    Thank you.

    Nisniki,
    Here are the methods using WebI:
    MTD: 
    Create a local variable "MTD Start"
    =RelativeDate(LastDayOfMonth(RelativeDate(CurrentDate();-30));1)
    Create a local variable "MTD End"
    =currentdate()
    LastMonth
    =LastDayOfMonth(RelativeDate(CurrentDate();-30))
    Year to Date
    create a local variable "YTD Begin"
    =ToDate("01/01/"+FormatNumber(Year(CurrentDate());"####");"mm/dd/yyyy")
    (reuse "MTD End" or build a "YTD End" variable same as "MTD End")
    Last to LastMonth
    (similiar to MTD, but using "60" versus "30" to move back two months versus moving back 1 month.
    To perform this stuff in the universe requires an understanding of the SQL syntax for the paricular vendor your are working with.  ANSI SQL agrees to represent and compute dates uniformly, however, the functions to make it happen varies by the vendor.
    Thanks,
    John

  • Month-to-Date and Year-to-Date values in Query

    Hello experts,
    One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
      I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
    I searched the forums and found a few threads that looked useful, like
    First and Last day of month and
    1st day of month / 1st day of week variables
    However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
    Any suggestions?

    Hi Pedro,
    You have to create customer exit in T_Code: CMOD
    1. Create a Z project
    2. Select RSR00001 as enhancement type.
    3. Go into include ZXRSRU01
    4. create a code like
    Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
    Try to write logic for your case taking this as example.
    WHEN 'A'.
        IF I_Step = 2.
          Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
            Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
            Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
            Clear L_S_Range.
            L_S_Range-low = D1.
            L_S_RANGE-high = D2.
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            Append L_S_Range to E_T_Range.
          ENDLOOP.
        ENDIF.
    If you want exact code I can help you in that.
    Thanks,
    Kams

  • Quarter to date and year to date

    i need to create a formula that if the end user selects parameter  QTD, the report should retrieve all records where the effective date  is in the current quarter. having trouble with that anyone help?  The following is somewhat working, but i need to retrieve records in the currentqtr.
    if {?Date Range}='QTD' and {Sheet1_.EFF_DT} in Calendar1stQtr then {@qtd}=1.00
    else
    if {?Date Range}='QTD' and {Sheet1_.EFF_DT} in Calendar2ndQtr then {@qtd}=2.00
    else
    if {?Date Range}='QTD' and {Sheet1_.EFF_DT} in Calendar3rdQtr then {@qtd}=3.00
    else
    if {?Date Range}='QTD' and {Sheet1_.EFF_DT} in Calendar4thQtr then {@qtd}=4.00

    If all you want is to get the records with Effective date in the current quarter when QTD is chosen in the parameter then try this:
    if {?Date Range}='QTD' then
    {Sheet1_.EFF_DT} in
    select month(currentdate)
    case 1 to 3:
    Calendar1stQtr
    case 4 to 6:
    Calendar2ndQtr
    case 7 to 9:
    Calendar3rdQtr
    case 10 to 12:
    Calendar4thQtr
    default:
    date(1800,01,01) to date(1800,01,01);  // This will never process

  • Split month, date and year

    How to split month,date and year from date field ? is there any standard function module.

    You can do this.
    data: year(4) type c,
          month(2) type c,
          day(2) type c.
    year = sy-datum(4).
    month = sy-datum+4(2).
    day = sy-datum+6(2).
    write:/ year.
    write:/ month.
    write:/ day.
    Regards,
    Rich Heilman

  • Arbitrary change of date and year on photos taken in folder structure

    I run Adobe Photoshop Elements 8.0 in a Microsoft Office 2007 environment originally on a Dell laptop. Before installing Adobe I had a library in My Pictures that I have maintained and uses this structure (folders by year and events). I have moved everything to a stationary computer. Now dates has been changed on the pictures pictures from 2001 has been changed to 2010 also in properties). When adding new folders (by year and months) for transfere of pictures from my camera pictures alrready in the files starts populate the folder just established.
    On the old Dell laptop the correct dates and year are still maintained (used as a second back-up).
    What happens?

    Finally got the date fixed, it was simple once I got palm support. I did a hard reset, then set the date but DID NOT click on TODAY at the bottom of the screen, the secret is to tap on the actual DAY on the calendar, NOT TODAY (after you set the year)
    Post relates to: Tungsten E2

  • Billing date and excise invoice date - indai scenario

    Hai can any one help me in the following query
    we need the excise invoice while creating should check the billing date ( vf03( vbrk-fkdat) and excise invoice date (  EXDAT- J_1IEXCHDR)  should be same
    pls propose which user exit do this
    kumaraswamy

    Hi,
    Can you please let us know why the system has to check the billing date while cretion of excise invoice.
    In Indian scenario, When you do PGI, that moment itself you raise an excise invoice( This is excise rule). In that case why the billing date and excise invoice date should be same?
    Regards,
    Sai

  • Process Order Basic Finish Date and Scheduled Finish Date

    Folks,
    I have a requirement from the business to be able to update the Process Order Basic Finish Date and Scheduled Finish Date independently from each other.
    In other words, update the Basic Finish Date and the Scheduled Finish Date cannot change or update the Scheduled Finish Date and the Basic Finish Date cannot change.
    I believe the reason for this is to be able to use the Basic Date to maintain the ATP accurately and keep the Scheduled Date to mark when the order was originally due from the shop floor to be able to measure if orders are being completed on time or late.
    I have worked in tnx OPUZ and had some success with other issues with these dates but I can't seem to make them work independently from each other.
    Or does anyone have any ideas how to measure proces order performance to the production schedule?
    Thank you for your help,
    Greg

    Rajesha, thank you for your reply but it doesn't solve my problem.
    Let me restate my scenario:
    I start a process order and both the basic and scheduled finish dates are the same, June 1.
    At some point, shop floor tells me they will be late and cannot deliver until June 15.
    I need to update a date in the system so the ATP and the MRP planning runs have correct information for promising customers, I will update the Basic Finish date with June 15.
    I also need to keep the original June 1 date in order to measure the shop floor performance to the production schedule to measure how early or late the  order was delivered. How can I keep the original finish date or how can I measure if a process order is early or late??
    Thank you for your help,
    Greg

  • How to stop scheduled ship date and scheduled arrival date from defaulting to sysdate

    Hello,
    We have a business scenario where we are deriving scheduled ship date and scheduled arrival date outside and then imported in the instance with the order. However we find that the scheduled ship date and scheduled arrival date are defaulting to sysdate. The atp flag is set to N for these items. I have checked the defaulting rules, there is no such defaulting rule set for scheduled ship date or arrival date ( screenshot attached) Please share your thoughts on how can I stop scheduled ship date and arrival date date from defaulting to sysdate ?
    Thanks
    Rajesh

    Hi
    Please visit following link. It may be useful.
    How to prevent auto default of schedule ship date in sales order form
    HTH
    sd

  • Using expdp to export a mix of tables with data and tables without data

    Hi,
    I would like to create a .dmp file using expdp, exporting a set of tables with data and another set without data. Is there a way to do this in a single .dmp file? For example, I want all the tables in a schema with data, but for the fact tables in that schema, I only want the fact table objects, not the data. I thought it might be easier to create two separate .dmp files, one for each scenario, but would be nice to have one .dmp file that satisfies my requirement. Any help is appreciated.
    Thanks,
    -Rodolfo
    Edited by: user6902559 on May 11, 2010 12:05 PM

    You could do this with where clauses. Let's say you have 10 tables to export, 5 with data and 5 without data. I would do it like this
    tab1_w_data
    tab2_w_data
    tab3_w_data
    tab4_w_data
    tab5_w_data
    tab1_wo_data
    tab2_wo_data
    tab3_wo_data
    tab4_wo_data
    tab5_wo_data
    I would make one generic query
    query="where rownum = 0"
    and I would make 5 specific queries
    query=tab1_w_data:"where rownum > 0"
    query=tab2_w_data:"where rownum > 0"
    query=tab3_w_data:"where rownum > 0"
    query=tab4_w_data:"where rownum > 0"
    query=tab5_w_data:"where rownum > 0"
    The first query will be applied to all tables that don't have their own specific query and it will export no rows, the next 5 will apply to each of the corresponding table.
    Dean

  • I just got a new iPhone and i set up iCloud on my girlfriend's account. To change it on settings it says delete account. Will this delete her all her data and back up data for iCloud on her iPhone and iPad?

    I just got a new iPhone and i set up iCloud on my girlfriend's account. To change it on settings it says delete account. Will this delete her all her data and back up data for iCloud on her iPhone and iPad? Can i change it without deleting it? Please help.

    Delete the account on your phone. This will not delete any data on her phone or iPad, or data stored in iCloud.

  • PO creation Date and Invoice creation Date

    Hi,
    Can any one help me regarding which table I can look for PO creation date and Invoice creation date. I require these fields for my reporting requirement.
    Thanks in advance,
    Arvind.

    Thanks for your response Bala.
    I got the Table which I require. I have one more question on this.
    Can you tell me Invoice Creation Date is RBKP-BLDAT(Document Date in Document) or RBKP-BUDAT(Posting Date in the Document) and PO creation Date is EKKO-AEDAT(Date on which the record was created) or EKKO-BEDAT(Document Date in Document).
    Points already rewarded.

  • Planned order creation with PDS valid on only order start date and not finish date

    Hi All,
    We have requirement to allow creation of planned order manually if production version is valid on order start date and not finish date.  This is because lead time of order is longer. I refered OSS notes 385602. I could find out solution for this is implementation of OSS note 694140 to change validity mode at activity level to consider start date of first produce activity  in validity interval. Problem is even If I create order in APO by implementiong this note planned order is not transfered to ECC and it gets stuck with error production version not valid.
    Is there any way in ECC to control this? Any config or customization?
    Regards,
    Santosh

    Nilesh,
    I think there is a simple procedural skip happening in your business process. You are right when a planned order is created after MRP it would default assign it to the first available production version. 2options available for us,
    1. First use transaction MF50 and do the line loading and assign the quantites to the production versions/Production lines, so that the actual capacity planning is getting completed. This way you can have planned orders with both the production versions and matching to your actual line capacity.
    2. Use Quota arrangement concept, to automatically split the Planned orders during MRP for a percentage based on individual production versions.
    Now when backflush is performed S225 table is updated and Planned order qty also gets reduced.
    Hope this helps....
    Regards,
    Prasobh

  • Goods issue date and goods receipt date

    Hi Guys,
                 i was asked to display STO list.They asked me add goods issue date and goods Report date in the o/p columns.So any body can tell me what are the fields for goods issue and goods Receipt date's.?can u guys tell me the Tr code for these fields .?
    Thanks,
    Gopi.

    Hi there,
    I already solve it by myself.
    Actually is i call the initialization twice:
    Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
    Thats what make this problem happened.
    Sorry.
    Best Regards,
    danny

  • Difference between "Database Variant To Data" and "Variant To Data"

    Can anyone tell me the differnce between the 2 VI's "Database Variant To Data" and "Variant To Data"?
    I am using the database connectivity toolset and making a query.
    I have tried using both, but the give me the same result.
    Attachments:
    Variant to Data.JPG ‏45 KB

    You won't see a difference between these two functions with just a string or other simple data types.  Where you'll see a difference is with clusters and more complex data types that come from the database.  The variants returned by databases can be slightly different than the standard variant.  That is where the Database Variant To Data is needed.  Otherwise, if you are just reading string information, either function will work fine.
    Crystal

Maybe you are looking for

  • Error on ATP check when Creating a Sales Order

    Hello, I encounter error  on ATP check while creating a Sales Order. The error is when I create Sales Order using material A, with or with out indicating the Plant and Storage Location, the Purchase Order quantity is returned on ATP check, but when I

  • I want to enhance screen using BADI

    hello sap guru i want to enhance screen using BADI.can i enhace screen with out using SPRO transaction? is abap consultant have authorization for SPRO trasaction?

  • How to get classes which implement the interface in program

    Hi, I created an interface and some classes are implementing it. I want to know in which classes the interface is implemented through program. I mean in which table the interface implemented details stores. please helps regarding this. Thanks, Regard

  • Setting up alarms when batch jobs fails

    Hi, I hv a requirement to setup alarms whenever a sap batch job fails,  Can anyone help me in this regards. Thank you very much in advance. Kind Regards, Ahmed.

  • Asking for your help... a message in a bottle!

    I need to import onto my new I pad many pdf documents I need to see when I am at work. How to?