FM to calculate fiscalyear period from current date

Experts,
Is there any FM which outputs fiscal year period in the format mmm/yyyy when current date is given as input. I need this coz i want to automatically calculate current fiscalyear period for a query variable..
Thanks,
DV

Hi Edwin,
When i expand the Fiscalyear Period infoobject in the query design in globval view, i donty see 0F_FPER. Does that mean it has to activated from Business Content? Or can i create a variable like that one??
DV

Similar Messages

  • Gettings Fiscalyear period from Billing date code required

    Hi All,
    my requirement is to get FISCAL YEAR PERIOD from Billing Date .Can any one send me the code to be written in transformation.
    Thanks in advance

    Hi ,
    Please use the function module DATE_TO_PERIOD_CONVERT.
    Give your billing date under I_DATE and Fiscal variant under  I_PERIV (for eg 10).
    This will gove you the posting period and fiscal year .Now concatenate year and posting period to get fiscal period.
    Below is the sample code
    call function 'DATE_TO_PERIOD_CONVERT'
        exporting
          i_date                      = Billing date
          i_periv                     = Fiscal varinat
        importing
          e_buper                     = lv_period
          e_gjahr                     = lv_year
        exceptions
          input_false                 = 1
          t009_notfound               = 2
          t009b_notfound              = 3.
      if sy-subrc = 0.
          ls_time-fiscper(4)      = lv_year.
        ls_time-fiscper+5(2)    = lv_period.
    endif.
    This will solve your problem.
    -Vikram

  • Calculate "remaining period" from key date and end-of-term

    Hello BEx fans
    We are reporting on InfoCube 0CFM_C10, Positions for Position Value Date.
    http://help.sap.com/saphelp_bw32/helpdata/en/0b/eaf69b46f2304291b9533a15e5fead/frameset.htm
    As filter variable we have 0CALDAY which is a key date, showing the positions for position value at the given (key) date.
    End-of-term, 0FS_TRME_D, is a navigational attribut of 0CFM_SEC_ID (ID Number of Securities & Futures).
    We have the following characteristics for reporting:
    0CFM_SEC_ID and 0COMP_CODE
    We have some position key figures also for reporting.
    Now we would like to calculate the "remaining period" in years which is calculated as ((" 0FS_TRME_D" minus "key date") DIV 360).
    The key date is given by the business user when executing the query.
    How would you calculate this "remaining period"?
    Thanks
    BEOplanet

    Hi,
    As you know that Key date works with Time dependent Master data for that particular data enters by User. This key date is applicable for the entire Query.
    If you want to apply some logic like Key Date-1 could be implemented by creating an User Exit variable which takes input as Key date and this will return the required result.
    A helpful document for you:----
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,
    Suman

  • Minus age from current date

    Hi experts,
    I have an Age field coming from sender system.
    I need to minus the age from current date and provide the output in form of date towards the target system.
    PLS help me out..

    Hi
    have a look at these
    (How do I calculate the difference between two dates?)
    http://joda-time.sourceforge.net/faq.html
    Calculating the Difference Between Two Datetime Stamps
    http://www.xmission.com/~goodhill/dates/deltaDates.html
    Get difference in days
    http://javaalmanac.com/egs/java.util/CompDates.html
    Thanks
    Gaurav

  • How to derive Budget Period from Delivery date in PR/PO

    Hello Gurus,
    I have activated the Budget Period functionality in FM (BCS). I am deriving the budget period from Posting date but in case of PR/PO I want to derive it from Delivery date instead of Document/Posting Date.I know it is not possible while standard derivation. Could any one help me with some suggestion like if I can use some exit/BaDI in MM. Also I am creating a PM order and at the time of release of PM order system creates the PR in background hence I need to know some kind of exit/BADI which can be called to update the Budget Period field in PR.
    Thanks in Advance!
    Regards
    Rohit Goel

    Hello Eli,
    I have one more query to ask on the above scenario.
    The scenario is my delivery date in PO is say July but I did good issue in May hence the Budget Period should be May and not july in my GR and IV.
    Now when I am doing GR in May then system is showing the Budget Period as July in GR document but in FM Document it is populating as May. I have defined a derivation strategy to derive budget period from posting date so may be because of that.
    But when I am doing IV then it is again moving the amount from May to July. It may be right behaviour that system is deriving all the account assignment from Source document but is there any way to overwrite.
    I have defined the derivation strategy with the condition that overwrite with new value if already written (Deriving from Posting Date to Budget Period).
    Please guide me on this if possible.
    Thanks in Advance
    Regards
    Rohit

  • Last 6 months of data from current date

    Hi Experts,
    I have a requirement in WebI to display last 6 months of data based on current date.Actually I have a column called "Employee Contract Start date" in my report.Suppose the end user executes the report today,then he should be able to see the Employee's data whose contract started today and in the last 6months from current date.
    Also I have dimension object name "Employee Contract Start Date".
    Please be noted that I am getting the data from Bex Query and I am working on BO 4.1 version.
    I have Objects "Calender day" , "Cal.year/Month" , "Calender month" , "Employee Contract Start Date" in the BEx Query.
    Could anyone please propose me, what are the ways to meet this requirement?

    Hi Cris,
    We can get the 6 Months date in webi.
    Check the below blog , will help you.
    http://scn.sap.com/community/businessobjects-web-intelligence/blog/2014/01/21/time-variablesdimensions
    Regards,
    Javed

  • Extract data on report between last 30 days from current date.

    Hi Experts,
    Ealrier i had provided user promt to select the date range, now i need to schedule the report for this i have to set the date between last 30 days from current date.
    How can i add this in formaula on record selection.
    before:
    {pm_process.pm_creation_date} in {@Start Date to UTC} to {@End Date to UTC}
    I tried:
    {pm_process.pm_creation_date} in CurrentDate() - 30 to CurrentDate()
    But this is diplaying me only data of 30th date from current date.
    Please advice.

    Hi Brian,
    Thank you!
    1. I have not created any function for {pm_process.pm_creation_date} in [CurrentDate() - 30 to CurrentDate()] i am just adding this on Record Selection and its not helping.
    2. {pm_process.pm_creation_date} in Last30Days; this is throwing below error.
    please advice what to be done?

  • 2 month old date from current date in red color only

    Hi all,
    How can I Highlight 2 month old date from current date in red color only at report level with using Alertr.
    Example:-
    Date
    3/27/2014
    4/3/2014
    3/5/2014
    4/1/2014
    3/31/2014
    5/24/2013
    2/10/2014
    4/11/2014
    12/11/2013
    9/25/2013
    1/30/2014
    2/18/2014
    2/24/2014
    1/6/2014
    3/3/2014
    Thanks
    Sam

    Hello Sam,
    are you using Universe for your report..if Yes..pls try below option.
    Create two objects in the universe
    Object1 syntax: current date() (Note:this object you can create at webi level)
    Object 2 syntax:addmonths(sysdate;-2)
    Now create a alert in webi report by using below conditions
    Day is less than Object1
    and
    Day is greater than Object2
    Please try this and let me know if any issues.
    Regards,
    Naveen D

  • Function module reqd for fiscal period using current date

    Hi,
    Is there any function module which gives fiscal period using current date.
    Thnaks,
    Maheedhar

    Hi Maheedhar,
    Try the code below.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = '1000'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
    Regards,
    Amit.

  • How to get name of the month from current date.

    Hi,
       How to get the name of the month from current date.
    Thanks,
    Senthil

    Sethil,
    Use your date(let us say Date1) instead of sy-datum.
    CALL FUNCTION 'MONTH_NAMES_GET'
    EXPORTING
    LANGUAGE = SY-LANGU
    IMPORTING
    RETURN_CODE =
    TABLES
    MONTH_NAMES = itab_month
    EXCEPTIONS
    MONTH_NAMES_NOT_FOUND = 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.
    READ TABLE itab_month
    WITH KEY MNR = date1+4(2).
    itab_month-LTX will contain the value you are looking for
    Good luck
    Raghava

  • Subtracting months from current date

    how to subtract months from current date in mysql

    You are in an Oracle forum, so the Oracle answer is: use add_months(sysdate,-2) to subtract two months from the current date.
    Regards,
    Rob.

  • Get last august month from current date

    Hi,
    I need to get last august month from current date.
    e.g if current date is 1-OCT-2013 need to get last August date i.e.1-AUG-2013
    e.g. if current date is 1-MAY-2013 need to get last August date i.e.1-AUG-2012

    Something like this?
    SQL> WITH table_x AS(
      2     SELECT SYSDATE dt from dual UNION ALL
      3     SELECT TO_DATE('20-05-2013','dd-mm-yyyy') from dual
      4  )
      5  --
      6  ---
      7  --
      8  SELECT  dt,
      9    CASE
    10      WHEN (dt >= Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    11          Add_Months(TRUNC(dt,'YEAR'),7)
    12      WHEN (dt < Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    13          Add_Months(TRUNC(dt,'YEAR'),7) - 365
    14    END cs
    15  FROM table_x;
    DT        CS
    24-OCT-13 01-AUG-13
    20-MAY-13 01-AUG-12

  • How to calculate week number from system date

    Hi experts,
    how to calculate week number from system date  ?
    thanks.
    SK

    hi,
    The above FM can be used for BADI or customer exit, if it is design level then you can use formula as well, under formula date functions you can use DATE_TO_WEEK.
    regards,
    Arvind.

  • How to get previous 2 months from current date in a dropdown?

    Hello Experts ,
                           In the application which I am developing, there is a requirement wherein , I want to Populate current month and previous two month in a drop down depending upon today's date. please help.
    Thanks & Regards,
    Pratbha Shukla

    The internal format for dates is yyyymmdd.  Therefore you can just grab the month value from the date:
    data lv_month type FCMNR.
    lv_month = lv_date+4(2).
    Just subtract from the month to get the two previous.
    data lv_previous1 type FCMNR.
    data lv_previous2 type FCMNR.
    if lv_month = 1.
    lv_previous1 = '12'.
    else.
    lv_previous1 - lv_month - 1.
    endif.
    if lv_previous1 = 1.
    lv_previous2 = '12'.
    else.
    lv_previous2 - lv_previous1 - 1.
    endif.
    Then do your lookup for the month name by reading the table returned from function module MONTH_NAMES_GET.

  • Sum from current date to the last date of sales

    Hi 
    It's been a while since I used MDX last time. 
    I have a simple question (probably). I need a measure which sums up from the current date to the last sale date. 
    It's like a reversal of Year To date.  And I need to do it date level. 
    Let's say is the sales goes like
    1/May/2000     $1000
    2/May/2000     $1000
    3/May/2000     $1000
    4/May/2000     $1000
    5/May/2000     $1000
    I need to create a measure which displays sum of current sales and last sales
    1/May/2000     $5000  
    2/May/2000     $4000
    3/May/2000     $3000
    4/May/2000     $2000
    5/May/2000     $1000
    I have a date hierarchy and hope it can be rolled up. 
    And I tried like something like ( suggested in another posting)
    [Date].[Calendar].CurrentMember:NULL}
    But this does not work for me.
    The actual MDx I wrote is 
    With member MEASURES.ActiveLicences as 
    sum ( 
    {[License Expiry Date].[FinancialYear].[YY-MMM].CurrentMember: null},
    [Measures].[No of Students]
    select {
    MEASURES.ActiveLicences,
    [Measures].[No of Students] } on columns, 
    [License Expiry Date].[FinancialYear].[YY-MMM].members on rows 
    from [Sales];
    Can anyone help me with this please? 
    Kind regards
    Mark Kim

    Hi SQLMa ,
    I was trying a similar code, using a hierarchy expression instead of a member expression for the CurrentMember functionality . Here is an Adventure Works example :
    With member MEASURES.ActiveLicences as 
    sum ( {[Delivery Date].[Fiscal].CurrentMember: null}
    , [Measures].[Internet Sales Amount]) 
    select {MEASURES.ActiveLicences,[Measures].[Internet Sales Amount]} on columns
    , [Delivery Date].[Fiscal].[Month].members on rows 
    from [Adventure Works]
    Hope it helps :)
    Regards, David .

Maybe you are looking for

  • Compatibility Question

    I am an educator who teaches online courses for a local university and I'd like to use iChat, but I want to make sure iChat is compatible with the different chat software that my students might be using. According to the iChat manual, it says "You ca

  • Airport Extreme configuration with Linux server gateway.

    Hello all- I am sorry if this is a repeat post.... I looked and could not find anything. I am trying to set up a linux server and have it act as a gateway between my Airport Extreme and my modem. I am wondering if there is a way to set a static IP on

  • SOLVED iTunes freeze issue by DISABLING "NOW PLAYING" in IM client!!!

    SOLVED (for me). I have been scouring posts/forums for three weeks trying to resolve this. I finally stumbled across a suggestion that WORKED! This sounds crazy--I disregarded it, but was willing to try anything... My IM client (Trillain & Gtalk) was

  • Exporting to Video Camera - JVC GR-DVP3

    Does anyone know if my camera will work for this? iMovie recognized the camera and the camera recorded but all I got was sporadic colored checkerboard patterns. Also, is it possible to use the Apple Video Adaptor and record a DVD on a home DVD record

  • Client-server question

    hi there.. I'm writing a java client that connects to a server to recieve some messages and classify them to different kinds, and then append these msgs to a database application. I have 2 questions: 1. After connection is established to the server,