How to display top n records(sorted by no of defects) within date range

I would like to display top n production orders(sorted by defects linked with each order) within the date range entered by the user.
Please advice.
I have 3 parameters to my report:
1. n(n is no of top records to be displayed)
2. From date
3. To date
Appreciate quick response.
Regards,
Hari

if you use the parameters in the report by placing them in the record selection it should display the records within your date range.
if {date field} in ?start to ?end then true

Similar Messages

  • How to display null values in the graphs, when i select a date range?

    Hi,
    Can you please help me in achieving the below requirement:
    We have a date promt, i have selected the date range from 12-Oct-2009 to 15-Oct-2009 and clicked on the go button.
    In the above date range, data is only availabe on 14-Oct-2009. here the requirement is to display as all the records (12th, 13th , 14th & 15th) in the bar graph.
    Currently the graph view is displaying the data only for 14-Oct-2009 in the bar graph.
    If data is not available it should display in the bar graph as empty for that particular dates.
    Help is highly apprieciated.
    Thanks in Advance.

    Check out [this post|http://obiee101.blogspot.com/2009/04/obiee-showing-zero-in-bargraph.html].

  • How to display the NULL records by multiple XMLTABLE()

    First, let me provide the testing data of INSERT and CREATE TABLE sql:
    create table xml_t2 (xml_raw XMLTYPE);insert sql, a bit long.....just copy and paste then run it will be OK!
    the system warns: Your message exceeds the maximum length of 30000 characters.
    So, I place it on the mediafire shariing space
    http://www.mediafire.com/?npmot6lgl86dgliTesting SQL:
    SELECT t1.years, t1.months,t1.days,t1.hours,t1.value,t2.value
            FROM xml_t2,
            XMLTABLE ('$d/cdata/F1' passing xml_raw as "d" COLUMNS years integer path '//year', months varchar(3) path '//month', days varchar(2) path '//day', hours varchar(2) path '//hour', mins varchar(2) path '//minute', value float path '//value') t1 ,
            XMLTABLE ('$d/cdata/F2' passing xml_raw as "d" COLUMNS years integer path '//year', months varchar(3) path '//month', days varchar(2) path '//day', hours varchar(2) path '//hour', mins varchar(2) path '//minute', value float path '//value') t2The condition for now is....In the xml data, I have deleted the month 'Jan' with <F2>tag which is in 2010.
    That mean the output of XMLTABLE t2 will not contain the 'Jan' records but it is still remain in XMLTABLE t1.
    The problem is that when I use the above SQL to show the t1.value, it will not display the t1.value in 2010 Jan.....it just skipped 'Jan' and becomes 'Feb'...
    what i would prefer to display is something like this:
    YEARS MONTHS DAYS HOURS t1_value t2_value
    2009     Jan    01   01       8       8
    2009     Jan    01   02       8     580
    2009     Jan    02   01     580     580
    2009     Jan    02   02     580     580
    2009     Feb    01   01     440     440
    2010     Jan    01   01     627     NULL
    2010     Jan    01   02     627     NULL
    2010     Jan    02   01     367     NULL
    2010     Jan    02   02     367     NULL
    2010     Feb    01   01     367     849
    2010     Feb    01   02     849     849
    ..............So...the main problem is how to display back the record in JAN in 2010 in t1 XMLTABLE and assign null to the t2 XMLTABLE since it doen't contains this months record.
    THANKS for help!!

    Hi,
    What's your database version?
    Are you using binary XML storage? (This is the default in 11.2.0.2)
    If not you have to explicitely specify it :
    create table xml_t2 (xml_raw XMLTYPE)
    xmltype column xml_raw store as securefile binary xml;Along with object-relational, it's the best storage strategy to use in conjunction with XMLIndex.
    You should also use a structured XML index instead, it's more appropriate than the unstructured index you're currently using :
    create index xml_t2_sxi on xml_t2 (xml_raw)
    indextype is xdb.xmlindex
    parameters (q'#
    XMLTABLE xml_t2_xt '/cdata'
    COLUMNS
    YEARS  INTEGER    PATH 'F1/name/year',
    MONTHS VARCHAR(3) PATH 'F1/name/month',
    DAYS   VARCHAR(2) PATH 'F1/name/day',
    HOURS  VARCHAR(2) PATH 'F1/name/hour',
    MINS   VARCHAR(2) PATH 'F1/name/minute',
    VALUE  FLOAT      PATH 'F1/name/value',
    VALUE2 FLOAT      PATH 'F2/name/value'
    call dbms_stats.gather_table_stats(user, 'XML_T2');Use the query provided by Stew and check the explain plan, you'll see the difference.

  • Creating BOM using BDC :How to display no of records from flat file under

    Hi,
          How to display no of records from flat file under one (Alternative BOM) vertically.
        When i execute, the records are replacing one by one.
    Here my coding:
    report ZBOM1
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: BEGIN OF bdc OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
          END OF BDC.
    DATA: BEGIN OF BDC1 OCCURS 0,
           idnrk(18),
           MENGE(18),
           MEINS(3),
           postp(1),
          END OF bdc1.
    DATA: BEGIN OF BDCDATA OCCURS 0,
             matnr(18),
             werks(4),
             stlan(1),
             idnrk(18),
             MENGE(18),
             MEINS(3),
             postp(1),
             posnr(4),
          END OF BDCDATA.
    data: ibdcdata type  standard table of bdcdata WITH HEADER LINE.
    *start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
       FILETYPE                       = 'ASC'
       HAS_FIELD_SEPARATOR            = ','
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                     =
      HEADER                         =
      TABLES
        DATA_TAB                      = BDCDATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    loop at bdcdata.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                  'SOFTDRINKS'.
    perform bdc_field       using 'RC29N-WERKS'
                                  'WIND'.
    perform bdc_field       using 'RC29N-STLAN'
                                  '1'.
    perform bdc_field       using 'RC29N-DATUV'
                                  '16.09.2008'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                  BDCDATA-IDNRK.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                  BDCDATA-MENGE.
    perform bdc_field       using 'RC29P-MEINS(01)'
                                  BDCDATA-MEINS.
    perform bdc_field       using 'RC29P-POSTP(01)'
                                  BDCDATA-POSTP.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                   BDCDATA-POSNR.            "'0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  BDCDATA-IDNRK.             "'15'.
    perform bdc_field       using 'RC29P-MENGE'
                                  BDCDATA-MENGE.             "'1'.
    perform bdc_field       using 'RC29P-MEINS'
                                  BDCDATA-MEINS.             "'ml'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    *perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
    REFRESH IBDCDATA.
    endloop.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR iBDCDATA.
      iBDCDATA-PROGRAM  = PROGRAM.
      iBDCDATA-DYNPRO   = DYNPRO.
      iBDCDATA-DYNBEGIN = 'X'.
      APPEND ibDCDATA .
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR iBDCDATA.
        iBDCDATA-FNAM = FNAM.
        iBDCDATA-FVAL = FVAL.
        APPEND iBDCDATA .
    ENDIF.
    ENDFORM.

    Hi,
    the BDCDATA structure must be fnam, fval,dynbegin,dynpro,program.
    You have to declare like this and pass this in your CALL TRANSACTION statement.
    Please give some other table name for BDCDATA you declared for and also for IBDCDATA.

  • Display top 5 records

    Hi Friends,
    i've a prompt in my dashbord, based on the prompt the report values will display right,
    my requirement is that i want display only top 5 records,
    how will you do that

    Hi
    Create a prompt with a column and assign presentation variable in it.
    In report for measure give the function as topN in edit formula.The syntax is shown as
    TOPN(expr, integer)
    If u want top 5 then TOPN(Measure Column,5) give filter to this column with presenntation variable
    We can do it with 'rank' function also like this
    Rank(Measure column)
    Otherwise,Use TopN filter in the report.But it shows 5records statically.For this there is no need of prompt.
    Thanks
    Don

  • How to display top Position Level using conditions / Exception Aggregation

    Hello,
    I have the following problem where I need to list out the row with the highest POSITION LEVEL (with reference to BUSINESS PARTNER). I have tried out all possibilities including Conditions and Exception Aggregation (MAX) but nothing seems to work. Conditions work to an extent i.e. it shows the top position level but unfortunately for the entire query result i.e. only one row is displayed in the result (the first row to satisfy the condition) instead of all the rows for each Business Partner. POSITION LEVEL is a KEY FIGURE value. It also exists as a CHARACTERISTIC under a diferent name in the cube. How can I solve this? Pls help.
    This is how the report looks at present...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Testfallini     Enzweiler     3000000020     21.10.1990     63674     New York     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     1
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     2
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     1
    This is how the report looks when I use conditions...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    This is how the report should look...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Testfallini     Enzweiler     3000000020     21.10.1990     63674     New York     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     2
    Thanks in advance,
    SD

    Hi Sebastian,
    I thought you need to display all the records with the highest position level at top. But now I realize your requirement.
    It should only display only the maximum position level for each level.
    You can try using the Condition for the position level KF, with Top N operator and value = '1'
    And then go to char assignement tab in the exception and select Most Detail Chars along Rows/Individual Chars. and combinations for the required combination of Chars.
    [List Condition for All Characteristics in Drilldown Independent|http://help.sap.com/saphelp_nw04/helpdata/en/86/dfc405ab60524ea0d3e89db15fb2e7/content.htm]
    [Defining Conditions |http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/frameset.htm]
    Hope this helps....
    Rgs,
    Ravikanth.

  • How to display top 10 values in a Webi report?

    Hi,
    I have the following requirement.
    If the report contains 'State' and 'Revenue' columns, I need to display top 10 cities with highest revenue and the revenue of the remaining cities can be summed together and should be available in a separate cell.
    I tried several formulae to achieve the requirement but was unsuccessful.
    I created a variable using the formula: '= If (Rank(<State> ,<Sales revenue>)>10 ) Then Sum(<Sales revenue>) Else 0' and added it as a column in the report. This provides the required results.
    When I add this variable as a column in the report, it displays 0 for the first top 10 values and only displays the remaining values. After that we can apply the Sum on this column to get the sum of the remaining (Other) sales revenue excluding top 10 values. However I cannot display this sum in a separate cell.
    Please provide some suggestions on this.
    Regards,
    Aditya Joshi

    Hi Aditya,
    Could you please try the following solutions to resolve the issue.
    Solution1:
    In Oracle, there is a function called: RANK() OVER (PARTITION BY () ORDER BY ()) which can be used to define an object at Universe level to return a rank position when used in a report. If you can check with your DBA - there is a similar function available for SQL Server. It should be RANK() OVER (ORDER BY colname) AS () FROM.
    Solution2:
    Or you can also try returning all rows in query, apply sort at report level & apply alerter to highlight the top 10 values.
    Regards,
    Sarbhjeet Kaur

  • How to Get Top 10 records using SQL select statement.

    :-) Hiee E'body,
    I want to generate a sql report in which I only want the top 10 records based on the numeric value of a column.
    For Example,
    To generate a Location Wise, Employee Wise Years of Service Report.
    Here I need the Top 10 Employees according to their No. of Years of Service for all the existing locations using a single query.
    eg.
    Location Emp No. YOS
    India - 22 30
    212 28
    819 24 ...
    US 123 40
    312 33
    90 33
    144 30 ...
    UK 77 20
    79 20
    331 18
    109 16 ...
    Every Location should display their respective Top 10 Employees
    regarding their No. of Years of Service.
    Please let me the know the solution to this.
    Have a nice day.
    Thanking You,
    Vivek Kapoor.

    For example if the table contained (India rows only shown) :
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    India 928 13
    India 929 13
    India 930 12
    do you want to see
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    or
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    India 928 13
    India 929 13
    Also if the India rows were
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    India 928 30
    India 929 30
    do you want to see
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    or
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    India 928 30
    India 929 30
    Please clarify.
    Thanks,
    Partha

  • How to select top 10 records

    How can I use SQL to select the top 10 records (do not use cursor)

    ... not only that but the order by and rownum check cannot be done in the same select. You need an in-line view.
    select * from
    (select * from table
    order by whatever)
    where rownum < 11
    BEWARE: Incorrect use of rownum (which is very common) often returns the correct result by accident, but you cannot guarantee that the accident will continue to happen.

  • To display top 7 records in the dashboard

    hai,
    while iam creating the a report with top 7 records to be displayed but, it dispalys only 5.
    plz let me know the correct way to approach it.
    thanks in advance.

    yah! the data is displayed by using "is in Top" function as a filter.
    7 records are displayed, without the year column.
    thanks we found the answer. we think that only year column, which is displayed in that table view made this issue.
    thanks for response....
    thanks kishore..... sorry to disturb ur time.

  • How to display top 10 customers in FR

    Hi,
    I've a requirement in FR. When i select an entity from POV, it should display top 10 customers out of 100 customers in that entity (for ex. top revenue customers). Can any one pls. help on how we can achive this dynamic reporting through FR. The rank function displays the ranks, but what i would like to see is, the report should display top 20 customers only. Pls. help
    Thanks,
    PVR

    Hi,
    I am not sure what version you are, from version 9.3 I think there is a "Top" function, just highlight the row, tick the option for "Top", set the number and the column
    Failing that if you need to use rank could you not hide the column.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to display Top-5 earners from the table,there should be no duplication

    Hi All
    Can you give me some idea about this query,
    i want a query like
    1)How to dispaly top-N earners from the Emp Table ( i want to dispaly top 5 sal )
    2)There should be no duplicaion in the sal.
    3)If Two emp's earn the same sal,the sal should be picked up only once....!!
    select distinct (sal) from emp order by sal desc;
    select distinct (sal) from emp order by sal desc;
    SAL
    5000
    3000
    2975
    2850
    2450
    1600
    1500
    1300
    1250
    1100
    950
    800
    I want to display only first 5 rows !!
    That first 5 rows i have to insert into other table..!! Please How to display only first 5 rows..!!
    Please can you give me some idea..!!
    Thank in Advance

    USE THIS QUERY
    SELECT SAL FROM (SELECT DISTINCT SAL FROM SCOTT.EMP ORDER BY SAL DESC) WHERE ROWNUM <= 5
    IF U WANT TO FIND 3 SAL OR 4 0R ANY USE THIS QUERY
    SELECT SAL FROM SCOTT.EMP A WHERE &N = (SELECT COUNT(DISTINCT B.SAL) FROM SCOTT.EMP B WHERE B.SAL <= A.SAL)
    FOR &N = GIVE UR VALUE

  • How to display only one record.

    Hi Gurus,
    Here my requirement is i have 2 pages.
    first page having project_number lov,create and tableRN.
    once u select the projectnumber and click on the create button it is navigate to secound page,here enter the data and click on the submit button it ll insert into database table and navigate to fitst page and display the data in tableRN what ever u insert the data(this part is over).
    but the problem is, in tableRN displays all the records(previous records also displayed)
    my requirement is display only one record(click on the submit button at the time of record only).
    Plz help me
    its very urgent.
    Thanks
    Seshu.
    Edited by: its urgent on Jan 3, 2012 10:52 PM

    Seshu,
    Do u want to display the inserted row...
    Regards,
    Gyan
    www.gyanoracleapps.blogspot.com
    www.querenttech.com

  • XLR - How to display top 5 customer or top 5 products?

    I am trying to modify the XL Reporter Dashboards and I am stumped by the following issues:
    Display top 5 customer
    Display top 5 products.
    Could someone please help with this project?
    Your help is appreciated!!
    John

    Hi John,
    The syntax for this is:
    FACT Top 5 BPA(*) Order By Fig.SO_DocTotal Descending
    There is a good document on the SAP portal called XLR Syntax and Functions which covers this and the XLR specific date and period type functions that I found (and still find) very useful.

  • How to display the real recording time of day in a video?

    I want to create a video in which the real recording time of day is displayed though the whole video.
    I already tried with the timecode generator, but this shows the time progress of the video being played back. What I need is the real recording TOD of every scene even after lots of cuts and trims and even after changing the clip speed.
    Does anyone have an idea, how this could be accomplished?

    Hi Wei,
    As far as I know the parent key needs to be initial for the top row. A workaround would be to create an additional attribute and fill it with an artificial parent key. In case you are using a DDIC structure at the node in question, you could add a sub node of 1:1 cardinality and place the attribute there.
    Best regards,
    Thomas
    P.S: I forwarded your question to a colleague of mine who happens to be the expert for the table. Perhaps he knows another solution.

Maybe you are looking for

  • Specific signature when in folder

    how do you select a specific signature when in a folder? i have a number of email accounts, and have set up folders, with various rules... when in some folders and select new message, the correct signature appears but then not in others. is there a s

  • Attachments in posts on the PC Suite board (Sticky...

    Hi folks. You are now able to post some attachments to the PC Suite board. This is primarily so people can post their logs files when they are having issues with PC Suite. You should be able to see option to attach at the bottom of the page when crea

  • Tabular Forms and Select Lists

    Hi, I have an updateable tabular form, and one of the updateable columns I want as a select list. I need the SQL that populates this select list to be based on a hidden value in the tabular form. Is this possible? Cheers Simon

  • Im getting error message when i try to install os5.1, any help?

    I have got an update msg for OS 5.1 however when i try to install it, an error msg comes up with 2 option: either close or settings as a result of not being able to install the upgrade, im not able to purchase certain apps as the new 5.1 OS is needed

  • Mac Book Air (13 pulgadas)

    Tengo un disco extraible(32 GB) y un MacBook Air (13') . Me gustaría saber como puedo instalar Boot Camp, y saber si este perjudicará el rendimiento de mi Mac. Grácias. I have an pen drive (32 GB) and MacBook Air (13'). I would like know how to insta