How to calculate First Date of Posting Period in BEx Query

Hi,
         I have  2 reporting requirements as follows:
1) User will either enter a single posting period in a fiscal year or can enter a range of posting periods.
Based on user selection I need to display three key figures in a report.
Key figure 1 and Key Figure2 should be the summarized values for each posting period.
key Figure 3 should be the value on the first date of that particular posting period (in case user selects multiple posting periods i should derive the value of the first date of each posting period).
2) Also, in another report I need to display only top 8 values  for one key figure in the report.
Please let me know the method or code required to get this Functionality.
Thanks in advance.

First Report
1. Create Restricted KeyFigure 1 & 2 for the summarized values.
2. Create a Customer Exit Variable for getting the first date of the posting period, this should be of type Interval. Write code using FM FIRST_DAY_IN_PERIOD_GET to get. Read the selection variable to see the range of posting period and you have to insert that many first dates into this variable.
3. Create a new Restricted KeyFigure 3 and use the Customer Exit variable created in Step 2
Second Report
Use the Top N functionality of BEx and create a workbook. You can set the option Refresh query when the workbook is open so that the data is current when opened.
Hope this helps.

Similar Messages

  • How to calculate first date and end date of this year in Query

    Hi Expert
    I want to calculate following dates with inputted date in query.
    I have no knowledge on ABAP and I just can create a query with simple logic.
    Could you teach me how to calculate following date?
    (If inputted date is April 12 2009)
    - First date of this year (Ex January 1 2009)
    - End date  of this year (Ex December 31 2009)
    - First date of last year (Ex January 1 2008)
    - End date of last year  (Ex December 31 2008)
    - First date of this month (Ex April 1 2009)
    Thank you!
    Take

    HR_JP_MONTH_BEGIN_END_DATE   use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
    04/01/2009 as begin date
    04/30/2009 as end date
    pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
    Abh

  • How to calculate first date of month from a given date in IDT BusinessObjects

    Hello Experts,
    I have a date field in IDT Universe which shows date in this format: Dec 13,2014 12.00.00 PM. Now I want to extract first day and last day of month from this date value. For example: here I want to see Dec 01,2014 12:00:00 PM and Dec 31, 2014 12:00:00 PM in First day of month and Last day of month columns. Also, if database date value is Nov 17, 2014 12:00:00 PM then in first day of month column, it should show Nov 01, 2014 12:00:00 PM and in last day of month it should show Nov 30, 2014 12:00:00 PM.
    I got some google help but 'Date' function is not supported by IDT tool in BusinessObjects.
    Please help.
    Thanks in advance.

    Hi
    Try to use the DB Functions to find out the First and last day. Please find out the below screenshot.
    If DB is BW, you can calculate the First and last day @ BW level use same object in BO directly.
    SQL DB:
    http://docs.oracle.com/html/A95915_01/sqfunc.htm#i1006893
    Oracle DB:
    http://msdn.microsoft.com/en-US/library/ms189794(v=sql.90).aspx

  • How to get current date for posting date

    hi,
    how to get current date for posting date ? any sample code ?
    Thanks

    Hi......
    Use
    Select getdate()
    for current date.......
    Regards,
    Rahul

  • How to  obtain last date of accounting period mmyyyy

    how to  obtain last date of accounting period mmyyyy.
    for ex: 31 st is the last date then output should be mm/31/yy.

    hi use this ....
    REPORT  ZTESTS.
    data: date1(4),
          date2(2),
          date3(2),
          date type sy-datum,
          output(8).
    parameters:p_date type sy-datum.
    CALL FUNCTION 'JVA_LAST_DATE_OF_MONTH'
      EXPORTING
        year_month               = p_date+0(6)
    IMPORTING
       LAST_DATE_OF_MONTH       =  date.
    output0(2) = date4(2).
    output+2(1) = '/'.
    output3(2) = date6(2).
    output+5(1) = '/'.
    output6(2) = date2(2).
    write:/ output.
    regards,
    venkat.

  • How to replace # or Not assigned with blank in BEx Query Output.

    Hi,
    While running the query through BEx Query desginer or Anlayser, I am getting # or Not assigned where there are no values.
    The requirement is to "Replace # or Not assigned with a blank" in the output.
    I want to know, is there any setting in BEx query desginer where we can do this. How to do this.
    Please share your inputs on this. Any inputs on this would be appreciated.
    Thanks,
    Naveen

    Check out SDN-thread: "Re: Remove 'Not assigned'" for more details
    Ideas from SDN research:
    "a solution i have used is to put each RKF column in a CKF colum then in each CKF use RKF + 0, the outcome is that your # should now be 0s, in the query properties you can set the option to display 0s as blank."
    "try to enter a text for the blank entry in the master data maintenance of the relevant objects and set the display option for the objects to 'text'."
    Threads:
    SDN: How to replace # or Not assigned with blank in BEx Query Output.
    SDN: Re: Remove 'Not assigned
    SDN: How to replace # or (Not assigned) with blank in BEx Query Output.
    SDN: Bex Analyzer : Text element system's table ?  
    SDN: change message in web application designer ["nonavailable" ->  136 of SAPLRRSV]
    SDN: Not Assigned ["Not Assigned -> 027 of SAPLRRSV]
    SDN: replacing '#'-sign for 'not assigned' in queries
    SDN: # in report when null in the cube
    SDN: How to replace '#' with blank when there is no value for a date field
    Edited by: Thomas Köpp on Sep 13, 2010 5:20 PM

  • Structure data in the spreadsheet using BEx Query filtered by year

    Hi,
    I´m making a Balanced Scoredcard using Xcelsius and extracting data from SAP BI.   The customer asked to see a few KPI´S (Return on assets and profit margin) filtering data from the dashboard by year,  month and region.
    The problem I´m facing is how to structure the data in the spreadsheet using a query filtered by year variable. 
    Regards,
    Diego

    Hi,
    I´m making a Balanced Scoredcard using Xcelsius and extracting data from SAP BI.   The customer asked to see a few KPI´S (Return on assets and profit margin) filtering data from the dashboard by year,  month and region.
    The problem I´m facing is how to structure the data in the spreadsheet using a query filtered by year variable. 
    Regards,
    Diego

  • How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal  of SAP  7.3

    Dear All,
    Please let me know the process how to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Currently I am getting Only  4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100  and row length more than 10000.
    Please suggest me a suitable solution to over come this issue.
    Please find the Below screen shot.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • Posting date and posting periods

    HI Experts,
    I am practicing IDES for SD. While using T VL02N for post good Issue I got this error:
    <b>Posting only possible in periods 2006/12 and 2006/11 in company code 1000
    Message no. M7053
    Diagnosis
    The posting date entered is not within one of the permitted posting periods (current period/previous period).
    This can be due to one of two reasons:
    The correct current period has not been set in the system.
    For the system, the first of the entered periods is the current period. At the beginning of a new period, your systems administrator must change the current period in the material master record, using the function "Shift periods". This has not yet been done.
    You have entered a wrong date in the field "Posting date".
    Procedure
    Check the posting date and correct it if necessary. If your input is correct, inform your systems administrator that the "period shifting" (period-end closing) process has not yet been completed. Copied from M8022</b>
    I don;t think there is problem with my posting date. Can someone guide me on how solving this
    Thanks
    Yael

    Go to OMSY and check the periods are current peiods or not to ur comp code?
    If it is not the current period.
    close the posting period by going to MMPV.
    let us say comp code EG, YEAR-2006  PE-6
    so you have to close the posting periods for all months till this month.
    from comp code-EG
    To comp code- EG
    period-7
    fiscal year-2006
    repeat the same but with period-8(month) 9,10,11,12,
    and do the same for 2007 too till you get the current month in OMSY T-Code.
    you need to do close the period end of every month.
    thank you
    chaitanya

  • How to get start date of the period for a given date from cube

    I have a situation where i need to find the start day of the period for a given date. is there a way to know that. i want to use that in my report. i enter the date from my report(i have date parameter), depends on the date, i want to display the start day
    of the period. how can i write expression for that in my report?
    ram

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • PPOME - New Tab & Infotype - How to find "start date" of preview period

    Hi all,
    I have successfully created own Infotype and add as new tab in PPOME.
    But now I need in my modulpool program to read field "start date" of preview period (from heading of screen in PPOME). I can't find right field. Has anybody any idea?
    Thanks a lot.
    Dusan
    Message was edited by:
            Dusan Skokanek

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • How to set up open&close posting period to process year-end at April

    Hi FICO GURUs,
    I m a new student in FICO, here i have a question as following, ask for help,
    For the open period. If we need to clearing till April, how do we do for that? How to set up in open and close posting period?
    Any responses will be awarded.
    Thanks a lot!
    Samson

    In OB52 you need to manage open periods related to FI. Any periods which are not managed here implies those periods are closed
    Ex: From Period Year       To Period Year
           04               2008        04          20008
    This means 4th Period of 2008 is open and all other periods are closed.
    Also you can open and close period seperately for General Ledger and Subledgers
    Types A,D,K,M are subledgers and S type is for ledger.
    There will be seperate open and close periods for FI,MM and CO modules
    FI- OB52
    CO-OKP1
    MM- MMPV
    Assign Points if useful
    Regards
    Raghu Ram

  • How to substitute a month abbreviation for the posting period in a query

    Hi,
    I have a query that lists the Posting Period (0FISCPER3) characteristic in the rows and key figures across the columns.  Is there a way to display the Posting Period as a month abbreviation instead of a number? 
    So for example, instead of displaying the periods 01, 02, 03, 04... in the rows, I would like to display the abbreviation of the corresponding month, for example Jun, Jul, Aug, Sep... etc.
    Thanks,
    Mustafa.

    Hi,
    Thanks for the suggestions.  If the master data texts are updated for characteristic "0FISCPER3", this would assume that all Company Codes have the same Fiscal Year Variant.  What happens in a situation where there are multiple Company Codes with different Fiscal Year Variants, a case which is common for multinational companies?
    Can such a manipulation be performed in the query itself based on the Fiscal Year Variant?
    Regards,
    Mustafa.

  • How to calculate Deadline Date and Time

    A support desk message has been created and support team has to respond in fixed time duration.
    Creation time of message and duration of response are available.
    How to calculate the exact time and date where this deadline expires using the factory calendar.

    java.util.Date date = java.util.Calendar.getInstance().getTime(); //retrieve a date object
    java.text.SimpleDateFormat df = new java.text.SimpleDateFormat(dd-MMM-yyyy);
    String s = df.format(date); //10-Aug-2001
    String t = "15042001";
    df.applyPattern("ddMMyyyy");
    d = df.parse(t);
    df.applyPattern("dd-MMM-yyyy");
    t = df.format(d); //15-Apr-2001Hey it's Friday, I'm bored

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

Maybe you are looking for

  • Firefox Sync Hogs CPU in Only 1 of 3 Computers

    Sync is running on 3 computers, 2 XP and 1 Windows 7. Two work fine, but one XP machine goes to 100% CPU for any activity and sometime for no action on my part at all. Also getting 'error while syncing' message

  • Creating a Print icon in Acrobat 8

    Is it possible to create a print icon using an image in a PDF'd document? I have Acrobat 8 Professional - Version 8.1.3 Any help you can give would be appreciated. Thanks

  • "Synchronize WF LOCAL tables" has completed with error.

    Hi Guys, My FNDWFLSC program is failing with the below error: ORA-12801: error signaled in parallel query server P000 ORA-30022: Cannot create segments in undo tablespace When I check the tablespace its named as "APPS_UNDOTS1" and there are 4 undo...

  • Help!! Iphone's sim tray got stuck in slot

    Accidentally, I inserted the sim tray in wrong way. Now I can't get it out of slot. This IPhone still in warranty, which got the contract with optus 8 month ago. So I am just wondering where I can fix this problem, optus or apple store. Do I need to

  • Airport express used as repeater?

    Can I use an airport express to strengthen the signal of a cisco wireless router? The Cisco was provided by our cable company, but isn't strong enough to provide a good signal to all parts of our home.  I was hoping to use the Airport Express to stre