No of Days in the quarter

Hello Experts,
I need (NDQ) Number of Days in the Quarter-(For the fiscal year K0) as a variable so that I can use it in the formula for the calculated key figure KF1 in the Bex report.
Wondering what is the best way to do this.
Is the user exit for the variable with I_Step = 1, the only option with. Appreciate any alternatives or any feedback on this.
Thanks,
Sweatha

Hi Sweatha,
if you need the number of days related to the quarter choosen by the user (via pop-up), the variable with step 2 is the only thing you have (can) to implement.
Pay attention: step = 2 !!!
If you need more infos...
Hope this helps.
Bye,
Roberto

Similar Messages

  • Select statement for last day of the last quarter and first quarter

    Anybody provide me the single select statement which should result the last day of the last quarter and last day of current quarter?
    Ex: Select last date of the last quarter,last day of current quarter from XYZ(DUAL...)
    Thanks in Advance

    Hi,
    Here's one way:
    SELECT               TRUNC (SYSDATE, 'Q') - 1     AS prev_qtr_end
    ,     ADD_MONTHS ( TRUNC (SYSDATE, 'Q') - 1
                 , 3       
                 )                    AS this_qtr_end
    FROM    dual;TRUNC (dt, 'Q') returns the first day of the quarter containing dt.
    Subtract one day from that, and you have the last day of the previous quarter.
    Add 3 months to that, and you have the last day of the current quarter. ADD_MONTHS (dt, n) will always return the last day of a month if its first argument, dt, is the last day of a month.

  • 1st of the Quarter for yesterday.....

    Morning everyone,
    I need to write a bit of code that will retrieve the first day of the quarter, based upon yesterday's date (ie 1st of the Q for yesterday would be 01/04/2007). I have managed to achieve this using the following code:
    select
    case to_char(sysdate-1, 'mm')
    when '01' then '01/01/'||to_char(sysdate-1, 'yyyy')
    when '02' then '01/01/'||to_char(sysdate-1, 'yyyy')
    when '03' then '01/01/'||to_char(sysdate-1, 'yyyy')
    when '04' then '01/04/'||to_char(sysdate-1, 'yyyy')
    when '05' then '01/04/'||to_char(sysdate-1, 'yyyy')
    when '06' then '01/04/'||to_char(sysdate-1, 'yyyy')
    when '07' then '01/07/'||to_char(sysdate-1, 'yyyy')
    when '08' then '01/07/'||to_char(sysdate-1, 'yyyy')
    when '09' then '01/07/'||to_char(sysdate-1, 'yyyy')
    when '10' then '01/10/'||to_char(sysdate-1, 'yyyy')
    when '11' then '01/10/'||to_char(sysdate-1, 'yyyy')
    when '12' then '01/10/'||to_char(sysdate-1, 'yyyy')
    end as QTD
    from dual;
    However, I need to retrieve the result in 'date' format - the above is char. Could anyone kindly point me in the right direction?? (I have tried replacing the to_char's with to_dates, and enclosing the to_char in a to_date - but it either doesnt work, or the format is screwey).
    Alternatively - would there be a simplier way to code this?? (I have only been writing SQL for a few months).
    Any help would be greatly appreciated.
    Kind regards,
    P

    sql>
    select trunc(sysdate-1,'Q') dt
    from dual;
    DT
    01-APR-07                                                                                                                                                                                   

  • Payment Term for 1st of the Quarter

    Hi,
    Need a new a payment term which should be due on 1st of the quarter. Our Fiscal year yr starts from Jan to Dec.
    If I raise invoice  in Sep 16th,2010, Due date should be 1st of Oct 2010
    If I raise invoice in Oct 20th, 2010, Due date should be 1st Jan 2011.
    How to configure the Payment term ?
    Regards
    Pratap

    Hi Pratap,
    Case I  If I raise invoice in Sep 16th,2010, Due date should be 1st of Oct 2010
    Payment Terms - ZV001
    Day Limit - 16
    Fixed day - 1
    Additional month - 1
    Then once again go for new entry and provide the details as
    Case II - If I raise invoice in Oct 20th, 2010, Due date should be 1st Jan 2011.
    Payment Terms - ZV001
    Day Limit - 31
    Fixed day - 01
    Additional month - 3
    You need to apply enhancement in FI substitution, where program logic update above payment terms based on quarter in the document line item.
    Regards,
    Santosh

  • SQL select Statement -first day and last day of the month - 1 year from now

    Hi,
    I need to write a SQL to get the dates in between first day and last day of the month one year from now.
    SELECT last_day(add_months(sysdate,12)) as lastday from dual
    What could be the Query to get the first day of the month one year from now..
    ie ..Sysdate - 3-DEC-2009
    Result - 1-DEC-2010
    thank you

    Hi,
    You can use TRUNC with 2 arguments to get the first DATE in a month, year, quarter, week, hour, minute, ISO year, ...
    SELECT  TRUNC ( ADD_MONTHS ( SYSDATE
                               , 12
                  , 'MONTH'
                  )     AS first_of_month
    FROM    dual
    ;The DATE returned will be in the same month, year, quearter, ... as the first argument.
    \We convered the last day of the month in [your previous question|http://forums.oracle.com/forums/message.jspa?messageID=3942939#3942939].
    At that time, I warded about using LAST_DAY as a cutoff point; TRUNC is a much better way.
    For example, to find all appointment_dates in the current month next year:
    SELECT  *
    FROM    appointments
    WHERE   appointment_date >= TRUNC (ADD_MONTHS (SYSDATE, 12), 'MONTH')
    AND     appointment_date <  TRUNC (ADD_MONTHS (SYSDATE, 13), 'MONTH')Note that
    the first part of the WHERE clause calls for dates on or equal to the beginning of the 12th month in the future, but
    the second part of the WHERE clause calls for dates before, not equal to , the beginning of the 13th month in the future.

  • Need to know first day of current quarter

    hi,
    I want to implement a variable to dertermine the date range of "the quarter to date" of last year:
    low: current date -364
    high: first day of current quarter -364
    so if anybody knows how to get the first day of current quarter, based on teh current date?
    Thank you so much in advance,
    Ping

    Hi Ping,
    Just curious whether the code worked or not and if it worked how did u solve the error message ?? keep us posted.
    do the foll modifications to get last qtr.
    data: qtr like sy-datum.
    data: lqtr like sy-datum. --- newly added
    if  sy-datum4(2) = '01' or sy-datum4(2) = '02' or
    sy-datum+4(2) = '03'.
    qtr(4) = sy-datum(4).
    qtr+4(4) = '0101'.
    lqtr(4) = sy-datum(4) - 1. --- newly added
    lqtr+4(4) = '0101'. --- newly added
    elseif sy-datum4(2) = '04' or sy-datum4(2) = '05' or sy-datum+4(2) =
    '06'.
    qtr(4) = sy-datum(4).
    qtr+4(4) = '0401'.
    lqtr(4) = sy-datum(4) - 1. --- newly added
    lqtr+4(4) = '0401'. --- newly added
    elseif sy-datum4(2) = '07' or sy-datum4(2) = '08' or sy-datum+4(2) =
    '09'.
    qtr(4) = sy-datum(4).
    qtr+4(4) = '0701'.
    lqtr(4) = sy-datum(4) - 1. --- newly added
    lqtr+4(4) = '0701'. --- newly added
    elseif sy-datum4(2) = '10' or sy-datum4(2) = '11' or sy-datum+4(2) =
    '12'.
    qtr(4) = sy-datum(4).
    qtr+4(4) = '1001'.
    lqtr(4) = sy-datum(4) - 1. --- newly added
    lqtr+4(4) = '1001'. --- newly added
    endif.
    write: qtr.
    write: lqtr. --- newly added
    Message was edited by: ravi raj

  • How can I alter a calendar script to place progressive dates on every day in the calendar year?

    Is there an easy way either to alter the calendar script or create something that will allow for variable text in each day of the year?
    I am creating a calendar for a cattle rancher, and he wants to include a gestation calendar in the design.
    So...instead of the Julian date on every caledar day, he would like to include the date that a calf will be born if the cow had been bred on a particular day.  For example:  On the calendar date, January 1, in that box, another smaller date will appear - 10/9, On January 2 - 10/10 and so on. But, I need this progression to continue throughout the whole year.
    I have attempted to manually enter each date in a separate table and super impose it over the calendar, but this is very slow and very tedious. There has to be a faster way.
    I am comfortable looking at code and can often times figure out which fields to change, but I am a bit lost on this one. Where do I start?
    Please help!
    Thanks!

    That helped, but still did not solve the "continous scroll" question.
    I did however discover that if you go to Search and type in a "common" letter like "s", a Continuous List view will appear.
    Any further help on how to do this as a default view would be appreciated from any and all.
    Thanks for the help and for the link paulcb.

  • On my iPad 3, how do I make calendar items lasting more than one day appear as such on the monthly view of my calendar? Right now only the first day of the item appears.

    On iPad 3, all of my calendar items lasting more than one day do not appear correctly when looking at the monthly view of the calendar; only the first day of the appointment appears. For example, if I am taking a vacation for 4 days, only the first day of the vacation is marked on the calendar, instead of being listed on all 4 days. When I look at the weekly view, however, it is correct and is listed on all 4 days. The problem here of course is that at a glance, there is no way to look at my monthly schedule. On my iPhone, everything is correct, regardless of month or week view, so clearly this is an iPad problem I guess? Please advise on how this can be corrected. Thank you!

    Unfortunately you can't do what you want. Many people have complained to Apple about this. I suggest you provide Apple feedback directly at http://www.apple.com/feedback/macosx.html. They will not provide a direct response but hopefully if enough people provide feedback Apple will fix this.

  • After 3 days onto the support at Adobe my cloud app still wont work. Error given is Install Failed!

    I have had creative cloud for over a month now and have not been able to get the thing to work. I have spent around 2 and a half days onto the technical support. I have tried it on two different laptops the second I brought to replace my old one as the first stopped working after the tech support had been messing with it. So I have tried it on Windows 7 and now Windows 8.1.
    After around 3 days onto the tech support I now have working copies of Photoshop and In Design. These were installed via work arounds! I still cant use creative cloud.
    I have tried to use the laptops on two different networks my home system and that at my university.
    I extremely frustrated by this as I am a student and am paying a lot for something which just seems to be useless. I also had to borrow a friends computer to do my assignments after spending 2 days wasted trying to get the thing working, so it is effecting my studies.
    Does any body know how I can sort this problem as the technical support seem to just be bodging things and the system is next to useless?
    My Lap top is running Windows 8.1 64bit. It has plenty of space available on the HDD and loads of RAM so should be no issues there.
    The virus protection is Kapersky but have tried with this disabled and also tried with McAfee on as laptop originally had this installed.

    Sarahb50875234 I am sorry you are facing difficulty using the Creative Cloud Desktop application.  Do you receive any specific error messages? What type of behavior are you experiencing?  You mentioned installing under Windows 7 and Windows 8.1 was this on two separate laptops or did you upgrade from Windows 7 to Windows 8.1?
    Finally you mentioned you spoke with a member of our support team.  Do you have a case number which I can reference?

  • Display a metric differently only on last day of the month.

    Have a Daily transaction fact where unit cost of product is stored at a day/part num /business unit level.
    When we drag and drop date column and unit cost in the report like below we will have
    Date      cost
    Sep29     $10
    sep30     $12
    Oct1       $12
    Oct2       $14
    ..........ans so on
    The source sustem program runs on last day of the month around 8pm for setting up cost to reflect on 1st of every month
    But the nighly OBI load ( Runs at 2am every day) when incrementally updating Sep30 data picks up $12 from the erp and populates in OBI.
    But actually speaking, on Sep30 the cost was $10.
    There is no way of running the ERP program to run afer OBI load. Hence we need an expression in the RPD (not answers) saying
    when last day of the month (any month) the standard cost must be a previous day value.All other days the same value should be returned.
    Is this possible without impacting report performance ?
    So, when we drag and drop date and cost value the above report should change as
    Date        Cost
    sep29     $10
    sep30     $10
    Oct1       $12
    Oct2       $14
    Oct30     $12.5
    Oct31     $12.5
    Nov1      $13.5

    You can achieve the above requirement for current month alone with below steps:
    The solution requires to have a union report
    First part of the report will have Date and Cost fields with a report level date filter, Date NOT IN (TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))))
    Second part of the report will have Date and Cost fields with a report level date filter Date IN (TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))))In the second part of the report,
    Change the column formula for Date to display only Current_Date
    Change the column formula for Cost field with FILTER(Cost USING Date = Current_Date-1)
    Pls mark if correct/helpful.

  • I have i phone 4s i there is problem of wifi my wifi is not working when i go to the wifi there is no working on off when i update it as a 6.1 ios on that time again it was good but after 2 days again the same problem i am too tired

    I have i phone 4s i there is problem of wifi my wifi is not working when i go to the wifi there is no working on off when i update it as a 6.1 ios on that time again it was good but after 2 days again the same problem i am too tired and i also reset network setting but nothing gonna be worked

    Sounds like the device was dropped at some point and damaged as a result.
    Take it to Apple for evaluation and a replacement.

  • Difference Between Current Day and fist day of the payroll period

    Hi,
    How do i find the difference between the current day and the first day of the payroll period with period parameter XX.
    Operation VARSTFDYXX is used to decide if the current day is the first day of the payroll period. But is there any operation available to check the difference in exact number of days.
    I know hrs=y is used to find difference between current day and a date specification record from IT0041, but i need to check difference between current day and first day from a payroll period parameter.
    Any response is greatly appreciated.
    Thanks,
    Imaneul Rajiv

    No! haven't seen it at all! Do I have to drain the battery completely and then charge it? I did that the first day I bought the phone and yet the stats are the same for me
    PS: I am referring to the Call Time stats and not the Usage/Standby stats

  • Currency Translation based on Last Day of the Acquistion month

    Dear all,
                Request to help me in understanding how we can calculate the currency translation rate as per the last day if the acquistion month..
    For Example if the  Acquistion date : 01/01/2008 (mm/dd/yyyy) the currency translation should happend based on the rate maintained as on 31/01/2008.
    Thanks
    Pavan Kumar Prakhya

    First, you will need to convert the actual acquisition date to the end date of the Fiscal Period. This can be done by using two separate Function Modules. First, get the actual Fiscal Period by entering the date and Fiscal Year Variant into the DATE_TO_PERIOD_CONVERT Function Module. Use the Fiscal Year and Fiscal Period from this and determine the end date of the Fiscal Period by using Function Module LAST_DAY_IN_PERIOD_GET with Fiscal Year, Fiscal Period and Fiscal Year Variant as your inputs.
    For the conversion, use the Function Module CONVERT_TO_LOCAL_CURRENCY. The inputs for this would be the last date of the Fiscal Period, the amount to be converted, the from currency code, the to currency code, blank in rate, AS01 in type of rate and X in read TCURR. This assumes, however, that month-end rates (rate type = AS01) have been loaded into your source system and these rates have been transferred to your BW environment.

  • How to get the last day of the next month?

    Hi all.
    I need to get the last day of the next month. E.g. if the date is 20.03.2008 I need to get 30.04.2008.
    Is there any FM for it?
    TIA, Nikolai.

    hi Nikolai,
    pls. have a look athe following piece of code:
    PARAMETERS : p_date TYPE sy-datum.
    DATA : gv_res TYPE sy-datum.
    CALL FUNCTION 'CALCULATE_DATE'
    EXPORTING
    *   DAYS              = '0'
       months            = '2'
       start_date        = p_date
    IMPORTING
       result_date       = gv_res.
    ==> Now you have (gv_res) 2 months later as today
    gv_res+6(2) = '01'. ==> gv_res is first day of next-next month
    gv_res = gv_res - 1. ==> gv_res is last day of next month
    hope this helps
    ec

  • How to get the last day of the payroll period

    Hi all,
    I need to get the last day of the payroll period e.g. last day of Jan 2007 is 31 Jan 2007. Can anyone suggest as to how to get it?
    Thanks,
    Madhu

    T549S contains the payroll periods with pay date.  T549Q contains the begin and end dates of the payroll period.
    You can select from the appropriate table (or from both depending on your given data) to get the end date of the period.
    Hope that helps.
    Mary

Maybe you are looking for

  • Why is the Design View appearing distorted?

    I have been designing an event page template in HTML and CSS to be used by my co-worker who handles all of our events and doesn't know how to write in HTML. When I enter the HTML into the Event Content (HTML) entry box, everything works fine. The pag

  • Transactions Routing randomly to the incorrect bpel processes..

    Hi, We are having a design scenario in B2B and BPEL Integration as mentioned below: 1. For a given Business Action defined in B2B , for a given revision ---Business Protocol : EDI X12 over Generic Exchange ---Document Protocol EDI_X12 -- we have a gi

  • Java Older Version not Working

    I have a web base application that requires an older version of Java to run. Java 6.18. It will not run on a newer version of Java. Cannot get firefox beta to use the older version a Java 6.18.

  • Publish two publications from different customers with the same Adobe DPS ID

    Hello: I have a publication made on InDesign and I have uploaded it to the Adobe Server with my Adobe DPS account. For the first publication, I published the publication with the Folio Producer on the digitalpublishing portal, and then I created the

  • Video streaming - 256 GB SSD

    I just bought a MBP with a 256 GB SSD. I know that SSD's have a limited number of writes. I often stream videos from Netflix, not download, just watch in-browser. It's not super high-definition, but it does say "HD." Does this add significantly to th