Using Filter on Table

Hi ,
iam trying to add a "filter" to my Table , i specified the "FilterModel" and "FilterVisible" but it does not shown , what am i missing !!??
Thanks

I need a little more info, but if you created the table by dragging and dropping an datacontrol based on ADF BC onto the page and did not initial specify fliter as an option then no search Region binding was created in your pageDef. You can go to the page def and wire the filter to the table manually or attempt to rebind the table by dragging and dropping the datacontrol on the table a second time.
Regards,
RiC

Similar Messages

  • Any way to use filter to exclude tables in navagation pane?

    Is there any way to use filter to exclude a set of tables from the table list in the navagation pane? I have a number of tables (15+) starting with the same prefix eg. AB123 that I would like eliminate from the list. They sort right to the top and I always have to scroll down, and go through the show more dialog to see the entire list.
    I am sure I'm missing something, but not sure what. Help Center has nothing to offer.
    Thanks
    Glenn

    This has been mentioned on the forum before - basically the need for more elaborate ways to filter (multiple conditions as well as 'not like'). It is on our list for future consideration, meaning post-production.
    -- Sharon
    Message was edited by:
    sbkenned

  • Dynamic Filter a Table using BI

    Hi All
    I need to be able to dynamically filter a table, VC can not do this, but is it possible to do it using BI?
    Jarrod Williams

    Hi,
    Using the Filter info-actor, it is not possible to use it dynamically.
    But as previously said, you can use the result of query as an input variable for the next query.
    JH

  • How can I filter a table from Data Control without enter query

    I have a table from a web service data control based on WSDL.
    I want to filter the table without input query at filter text box. Without filter text box, each would filter the table with a hardcoded query internally.
    For example, when user click A menu button then it filters the table where type = '1' and B menu button filters the table by type='2' and C menu button filters the table by type=' ' .
    How can I filter the table without enter query?
    Could anyone point me to a solution please.
    Thanks.
    jdev 11.1.5
    Edited by: 893364 on Oct 26, 2011 12:15 PM
    Edited by: 893364 on Oct 26, 2011 12:21 PM

    Hi,
    when you created the table, did you try selecting the "filter" option. Select the table and go to the Property Inspctor. In the tool bar of the Property Inspector there is an icon to change the configuration. Its adding filter filter fields for the user to search in.
    Option 2: The data of the Web Service actually is held in the iterators. If you wanted to filter the WebService query, I would not use the WS DC but a JAX-WS proxy in a POJO to fetch the WS Data. Then have the Data Control created from the POJO. You could have a method exposed on the POJO that allows you to filter the internally held data
    Frank

  • Query plan changes when query is used in CREATE TABLE AS

    We've puzzled by the fact that EXPLAIN PLAN gives a much different output for a SELECT statement than it does when the same statement is used for CREATE TABLE . . . AS SELECT.
    The bad part is that the CREATE TABLE version performs very badly, and that's what we want the query for.
    Why does this happen? Is there a difference (from the database's point of view) between retrieving a set of rows to display to the user and putting that same set into a new table? Doesn't this make it harder to diagnose and fix query performance problems?
    Here's our query:
    create table query_test AS
    select term, parentTerm, apidb.tab_to_string(cast(collect(trim(to_char(internal)))
                       as apidb.varchartab), ', ') as internal
                 from (
                     select distinct ga.organism as term,
                                     ga.species as parentTerm,
                                     tn.taxon_id as internal
                     from apidb.GeneAttributes ga, SRES.TaxonName tn, sres.Taxon t,
                          dots.AaSequence aas, dots.SecondaryStructure ss
                     where ga.organism = tn.name
               and tn.taxon_id = t.taxon_id
                       and t.taxon_id = aas.taxon_id
       and aas.aa_sequence_id = ss.aa_sequence_id
               and t.rank != 'species'
               union
                     select distinct ga.species as term,
                       '' as parentTerm,
                                     ts.taxon_id as internal
                     from apidb.GeneAttributes ga, SRES.TaxonName tn, apidb.taxonSpecies ts,
                          dots.aasequence aas, dots.SecondaryStructure ss
                     where ga.organism = tn.name
                      and tn.taxon_id = ts.taxon_id
                      and ts.taxon_id = aas.taxon_id
                     and aas.aa_sequence_id = ss.aa_sequence_id
       group by term,parentTerm;Without the CREATE TABLE, the plan looks like this:
    | Id  | Operation                             | Name                      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | CREATE TABLE STATEMENT                |                           |  2911 |  5986K|       | 18840   (1)| 00:03:47 |
    |   1 |  LOAD AS SELECT                       | QUERY_TEST                |       |       |       |            |          |
    |   2 |   VIEW                                |                           |  2911 |  5986K|       | 18669   (1)| 00:03:45 |
    |   3 |    SORT GROUP BY                      |                           |  2911 |   332K|       | 18660   (1)| 00:03:44 |
    |   4 |     VIEW                              |                           |  2911 |   332K|       | 18659   (1)| 00:03:44 |
    |   5 |      SORT UNIQUE                      |                           |  2911 |   292K|       | 18659   (6)| 00:03:44 |
    |   6 |       UNION-ALL                       |                           |       |       |       |            |          |
    |*  7 |        HASH JOIN                      |                           |  2907 |   292K|  2160K| 17762   (1)| 00:03:34 |
    |   8 |         TABLE ACCESS FULL             | GENEATTRIBUTES10650       | 40957 |  1679K|       |   795   (1)| 00:00:10 |
    |*  9 |         HASH JOIN                     |                           | 53794 |  3204K|  1552K| 16675   (1)| 00:03:21 |
    |* 10 |          HASH JOIN                    |                           | 37802 |  1107K|       | 12326   (1)| 00:02:28 |
    |* 11 |           HASH JOIN                   |                           | 37945 |   629K|       | 10874   (1)| 00:02:11 |
    |  12 |            INDEX FAST FULL SCAN       | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|       |    33   (0)| 00:00:01 |
    |  13 |            INDEX FAST FULL SCAN       | AASEQUENCEIMP_REVIX6      |  7886K|    82M|       | 10816   (1)| 00:02:10 |
    |* 14 |           TABLE ACCESS FULL           | TAXON                     |   514K|  6530K|       |  1450   (1)| 00:00:18 |
    |  15 |          TABLE ACCESS FULL            | TAXONNAME                 |   760K|    22M|       |  2721   (1)| 00:00:33 |
    |* 16 |        HASH JOIN                      |                           |     4 |   380 |       |   886   (1)| 00:00:11 |
    |  17 |         NESTED LOOPS                  |                           |   730 | 64970 |       |   852   (1)| 00:00:11 |
    |* 18 |          HASH JOIN                    |                           |     1 |    78 |       |   847   (1)| 00:00:11 |
    |  19 |           NESTED LOOPS                |                           |       |       |       |            |          |
    |  20 |            NESTED LOOPS               |                           |    17 |   612 |       |    51   (0)| 00:00:01 |
    |  21 |             TABLE ACCESS FULL         | TAXONSPECIES10646         |    12 |    60 |       |     3   (0)| 00:00:01 |
    |* 22 |             INDEX RANGE SCAN          | TAXONNAME_IND01           |     1 |       |       |     2   (0)| 00:00:01 |
    |  23 |            TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |       |     4   (0)| 00:00:01 |
    |  24 |           TABLE ACCESS FULL           | GENEATTRIBUTES10650       | 40957 |  1679K|       |   795   (1)| 00:00:10 |
    |* 25 |          INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |   768 |  8448 |       |     5   (0)| 00:00:01 |
    |  26 |         INDEX FAST FULL SCAN          | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|       |    33   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       7 - access("GA"."ORGANISM"="TN"."NAME")
       9 - access("TN"."TAXON_ID"="T"."TAXON_ID")
      10 - access("T"."TAXON_ID"="TAXON_ID")
      11 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      14 - filter("T"."RANK"<>'species')
      16 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      18 - access("GA"."ORGANISM"="TN"."NAME")
      22 - access("TN"."TAXON_ID"="TS"."TAXON_ID")
      25 - access("TS"."TAXON_ID"="TAXON_ID")
    46 rows selected.With the CREATE TABLE, the plan for the SELECT alone looks like this:
    | Id  | Operation                           | Name                      | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                    |                           |     2 |   234 |  1786   (1)| 00:00:22 |
    |   1 |  SORT GROUP BY                      |                           |     2 |   234 |  1786   (1)| 00:00:22 |
    |   2 |   VIEW                              |                           |     2 |   234 |  1785   (1)| 00:00:22 |
    |   3 |    SORT UNIQUE                      |                           |     2 |   198 |  1785  (48)| 00:00:22 |
    |   4 |     UNION-ALL                       |                           |       |       |            |          |
    |*  5 |      HASH JOIN                      |                           |     1 |   103 |   949   (1)| 00:00:12 |
    |   6 |       NESTED LOOPS                  |                           |   199 | 19303 |   915   (1)| 00:00:11 |
    |   7 |        NESTED LOOPS                 |                           |    13 |  1118 |   850   (1)| 00:00:11 |
    |   8 |         NESTED LOOPS                |                           |    13 |   949 |   824   (1)| 00:00:10 |
    |   9 |          VIEW                       | VW_DTP_E387155E           |    13 |   546 |   797   (1)| 00:00:10 |
    |  10 |           HASH UNIQUE               |                           |    13 |   546 |   797   (1)| 00:00:10 |
    |  11 |            TABLE ACCESS FULL        | GENEATTRIBUTES10650       | 40957 |  1679K|   795   (1)| 00:00:10 |
    |  12 |          TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |     3   (0)| 00:00:01 |
    |* 13 |           INDEX RANGE SCAN          | TAXONNAME_IND02           |     1 |       |     2   (0)| 00:00:01 |
    |* 14 |         TABLE ACCESS BY INDEX ROWID | TAXON                     |     1 |    13 |     2   (0)| 00:00:01 |
    |* 15 |          INDEX UNIQUE SCAN          | PK_TAXON                  |     1 |       |     1   (0)| 00:00:01 |
    |* 16 |        INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |    15 |   165 |     5   (0)| 00:00:01 |
    |  17 |       INDEX FAST FULL SCAN          | SECONDARYSTRUCTURE_REVIX9 | 37945 |   222K|    33   (0)| 00:00:01 |
    |  18 |      NESTED LOOPS                   |                           |     1 |    95 |   834   (1)| 00:00:11 |
    |  19 |       NESTED LOOPS                  |                           |     1 |    89 |   833   (1)| 00:00:10 |
    |* 20 |        HASH JOIN                    |                           |     1 |    78 |   828   (1)| 00:00:10 |
    |  21 |         NESTED LOOPS                |                           |       |       |            |          |
    |  22 |          NESTED LOOPS               |                           |    13 |   949 |   824   (1)| 00:00:10 |
    |  23 |           VIEW                      | VW_DTP_2AAE9FCE           |    13 |   546 |   797   (1)| 00:00:10 |
    |  24 |            HASH UNIQUE              |                           |    13 |   546 |   797   (1)| 00:00:10 |
    |  25 |             TABLE ACCESS FULL       | GENEATTRIBUTES10650       | 40957 |  1679K|   795   (1)| 00:00:10 |
    |* 26 |           INDEX RANGE SCAN          | TAXONNAME_IND02           |     1 |       |     2   (0)| 00:00:01 |
    |  27 |          TABLE ACCESS BY INDEX ROWID| TAXONNAME                 |     1 |    31 |     3   (0)| 00:00:01 |
    |  28 |         TABLE ACCESS FULL           | TAXONSPECIES10646         |    12 |    60 |     3   (0)| 00:00:01 |
    |* 29 |        INDEX RANGE SCAN             | AASEQUENCEIMP_REVIX6      |   768 |  8448 |     5   (0)| 00:00:01 |
    |* 30 |       INDEX RANGE SCAN              | SECONDARYSTRUCTURE_REVIX9 |     1 |     6 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       5 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
      13 - access("ITEM_1"="TN"."NAME")
      14 - filter("T"."RANK"<>'species')
      15 - access("TN"."TAXON_ID"="T"."TAXON_ID")
      16 - access("T"."TAXON_ID"="TAXON_ID")
      20 - access("TN"."TAXON_ID"="TS"."TAXON_ID")
      26 - access("ITEM_1"="TN"."NAME")
      29 - access("TS"."TAXON_ID"="TAXON_ID")
      30 - access("AA_SEQUENCE_ID"="SS"."AA_SEQUENCE_ID")
    50 rows selected.Edited by: JohnI on Jul 18, 2011 2:19 PM
    Edited by: JohnI on Jul 18, 2011 2:28 PM

    Charles Hooper wrote a series of blog entries on a similar topic some time ago: http://hoopercharles.wordpress.com/2010/12/15/select-statement-is-fast-insert-into-using-the-select-statement-is-brutally-slow-1/ (including a lot of useful comments) and two following articles. I have to confess that I did not read the posts again - but I think you will find some good ideas how to analyze the problem.
    Regards
    Martin Preiss

  • Using FILTER function in oracle answers

    Gurus,
    I have a question related to using Filter function in oracle answers.
    When trying to insert a Filter (expr) Using (expr) clause in the formula area of a fact table field, It errored out with msg saying about using a wrong measure.
    I know this can be done with a case expression but I tried filter clause since this is available in oracle answers.
    Please help me figuring out this scenario.
    Thanks.

    David / Raghu - Thanks for u'r replies and apologizes for not posting question with proper material.
    Am posting my code and the error message from the screen.
    Code :
    IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0)
    Error :
    nQSError: 10058] A general error has occurred. [nQSError: 22032] Function FILTER requires at least one measure attribute in its first argument. (HY000)
    SQL Issued: SELECT "Dim - MBS Loan"."LOAN AMOUNT", "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK", "Dim - MBS Loan"."LOAN TYPE SEN/SUB", "Dim - MBS Project"."PROJECT NAME", "Dim - MBS Project"."PROJECT NUMBER", "Fact - MBS Loan Transactions"."AR BALANCE INTEREST", "Fact - MBS Loan Transactions"."GL BALANCE INTEREST", IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0) FROM "Financials - MBS"
    OK (Ignore Error)
    Please continue answering my queries. Since am a newbie your answers won't be just a reply but it's actually learning for me.
    Thanks.

  • Filter in table control

    Hello Experts,
    I had added Filter in table control. For this I am using FM 'LVC_FILTER'.
    But I am getting error as "Filter Internal Error. 15"
    Below is my code:
    data layo type LVC_S_LAYO.
    data GT_FILTER_INDEX type LVC_T_FIDX.
    data itab type TABLE OF cxtab_column with HEADER LINE.
             loop at tc_item-cols into itab where selected = 'X'.
             append itab.
             name1-fieldname = itab-screen-name+12.
             append name1.
             endloop.
    loop at itab.
      cnt = cnt + 1.
      wa_fieldcat-col_pos    = cnt.
      wa_fieldcat-fieldname  = itab-screen-name+12.
      wa_fieldcat-tabname    = 'GT_FABALOTI'.
       APPEND wa_fieldcat TO it_fieldcat1.
      CLEAR wa_fieldcat.
    endloop.
    layo-zebra = 'X'.
    CALL FUNCTION 'LVC_FILTER'
      EXPORTING
       I_CALLBACK_PROGRAMM          = sy-repid
        it_fieldcat                  = it_fieldcat1
       IT_SELECTED_COLS             = name1[]
    *   IT_VALUE_UNIT                =
    *   IT_GROUPLEVELS               =
        is_layout                    = layo
    *   IS_SELFIELD                  =
    *   IT_GROUPS                    =
    *   IS_FILT_LAYOUT               =
    *   IT_EVENTS                    =
    *   I_NO_DIALOG                  =
    *   IT_EXCEPT_QINFO              =
    *   I_IGNORING_CASE              =
    IMPORTING
       ET_FILTER_INDEX              = gt_filter_index
    *   ET_GROUPLEVELS_FILTER        =
    *   ET_FILTER_INDEX_INSIDE       =
    *   E_FILTER_FLAGNAME            =
      tables
        it_data                      = gt_fabaloti[]
      changing
        ct_filter                    = filter_ranges[]
    * EXCEPTIONS
    *   NO_CHANGE                    = 1
    *   OTHERS                       = 2
    How should I correct the error.
    Please help.

    Hi Shubham ,
      I too have the same requirement . Can you please send me the code because I am not getting these points.
    IMPORTING
       ET_FILTER_INDEX              = gt_filter_index
    *   ET_GROUPLEVELS_FILTER        =
    *   ET_FILTER_INDEX_INSIDE       =
    *   E_FILTER_FLAGNAME            =
      tables
        it_data                      = gt_fabaloti[]
      changing
        ct_filter                    = filter_ranges[]
    Regards
    Shek

  • Filter a table view

    Hi All,
    In a compound layer with 2 table views, is it possible to filter only one of them? (if I apply the filter in Criteria Tab or Column formulla it applies to all the views, so I need to apply the filter after retriving the results)
    Thanks,
    Regards

    Hi,
    If you are applying filter under criteria it will effect the whole report.It mean what ever views you are using will get effected.
    Can do in this way..didnt check but you can try ;)...
    Use FILTER function to make filter get effected to only one column.Now pull two same columns on which you want filter.Now apply filter on column and other column without filter.
    Use two pivot table view,you can use one column with filter in one view and the other column without filter in the other view and place the unwanted column in each view under excluded section.
    FILTER(Table.Column USING Condition) in fx
    If you are using table view i am not sure if its possible or not because we should use all the columns which are in criteria,but try making column with filter as hide in one view and column without filter as hide in other view under properties.
    Regards,
    Srikanth
    Edited by: Srikanth Mandadi on Nov 11, 2010 4:55 AM

  • Navigation problem while using filter

    hai,
    I have a requirement that I use filter settings for my table.. when I use 2 or 3 checks in filter and sorting
    I need to navigate to the previous check  with the use of button above the table...
    kindly help

    hi ,
    pls use  the ZCi layout for the adobe interactive form .
    Need to Insert the web dynpro script to the form.
    Note: Make sure to upgrade the Adobe Interactive for ZCI type using SFP_ZCI_UPDATE transaction
    Subsequently, check whether the update of the ZCI was successfully completed. To do this, open your form in the Adobe LiveCycleDesigner and check the version information of the ZCI script. The ZCI script is available on the "Hierarchy" tab page under the "ContainerFoundation_JS" name. The version must be800.20080513120641.469612.469346.
    You can also have a look at this e-learning.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20029530-54ef-2910-1b93-c41608ae0c90
    Refernce thread : adobe online interactive form
    regards ,
    amit

  • Getting a useful list of tables

    Can anyone recommend a query to get a useful list of tables for the end user? Our application allows users to browse the database and look at data in tables. Currently, we first have the user choose a schema, and then a table,view or synonym within the schema.
    I just learned about the public owner though and it has 1000s of things in it's space, most of which aren't useful to the user.
    Originally, i was using the OCI schema apis, but we switched to using a simple select from all_objects. To simplify things somewhat i automatically filter things with a '$' in them. In the public schema there are also lots of things with a '/' in them. filtering on that brings the total down to 2000+ objects, but that still seems like a lot.
    I'd really like to separate 'system' objects from 'application' objects and only show the latter. Are there any idioms people use for this? Is there some information somewhere that I'm missing that might have this?
    thanks,
    :)ross

    I eventually settled on the following
    SELECT OBJECT_NAME
    FROM ALL_OBJECTS
    WHERE OWNER='%s' AND
    OBJECT_TYPE IN ('TABLE','VIEW','SYNONYM') AND
    OBJECT_NAME NOT LIKE '%$%' AND
    OBJECT_NAME NOT LIKE '%/%'
    ORDER BY OBJECT_NAME
    where the particular schema i'm interested in is plugged in for %s.
    but when the schema is 'PUBLIC' I add the following to the WHERE clause
    NOT EXISTS (
    SELECT *
    FROM ALL_SYNONYMS
    WHERE OWNER=ALL_OBJECTS.OWNER AND
    SYNONYM_NAME=OBJECT_NAME AND
    TABLE_OWNER IN ('CTXSYS','DMSYS','EXFSYS','MDSYS','OLAPSYS','ORDSYS','SYS','WKSYS','WMSYS','XDB','SYSTEM','SYSMAN')) AND
    to filter out all the system synonyms
    :)ross

  • Using Filter and where clause in GoldenGate

    Hi,
    I need to use where clause in extract process.
    The condition i need to use is :- where (CODE LIKE '10%' OR CODE LIKE '0%')
    how to use LIKE operation along with OR in extract.
    I have multiple where conditions these are straight i.e = and <> which are working fine. But LIKE is not working.
    Please do assist for the same.
    Thanks.

    GoldenGate uses FILTER and SQLPREDICATE (and COMPUTE is a variation that can work, depending on how you are trying to manipulate the data).
    To filter data, you can use:
    ● A FILTER or WHERE clause in a TABLE statement (Extract) or in a MAP statement (Replicat).
    ● A SQL query or procedure
    ● User exits
    FILTER comparison operators include:
    Comparison operators:
    > (greater than)
    >= (greater than or equal)
    < (less than)
    <= (less than or equal)
    = (equal)
    <> (not equal)
    WHERE clause permissible operators:
    Column names PRODUCT_AMT
    Numeric values -123, 5500.123
    Literal strings "AUTO", "Ca"
    Built-in column tests @NULL, @PRESENT, @ABSENT (column is null, present or absent in the row). These tests are built into Oracle GoldenGate. See “Considerations for selecting rows with FILTER and WHERE” on page 155.
    Comparison operators =, <>, >, <, >=, <=
    Conjunctive operators AND, OR
    Grouping parentheses Use open and close parentheses ( ) for logical grouping of multiple elements.
    You could try using a GoldenGate string function. You know what the leading one or two characters (0 and 10) are.
    Use the @STREXT function to extract a portion of a string and do a comparison there. Or take care of it using SQLEXEC on replicat (call a function to be able to use LIKE).

  • Create Table Control using Dynamic Internal Table.

    Hi,
       I have requirement in which I will create a Dynamic Internal Table and then I need to create a Table Control Using that Internal Table. Now this can't be done using Screen Editor as it requires a pre-defined internal table or a DDIC Object.
      Please Help.

    This should be correct answer(I am not author of code below):
    REPORT ztablemaintace NO STANDARD PAGE HEADING.
    TYPE-POOLS: rsds.
    DATA: is_x030l TYPE x030l,
    it_dfies TYPE TABLE OF dfies,
    is_dfies TYPE dfies,
    it_fdiff TYPE TABLE OF field_dif,
    is_fdiff TYPE field_dif.
    DATA: w_selid TYPE rsdynsel-selid,
    it_tables TYPE TABLE OF rsdstabs,
    is_tables TYPE rsdstabs,
    it_fields TYPE TABLE OF rsdsfields,
    it_expr TYPE rsds_texpr,
    it_ranges TYPE rsds_trange,
    it_where TYPE rsds_twhere,
    is_where TYPE rsds_where,
    w_active TYPE i.
    DATA: it_content TYPE REF TO data,
    it_modif TYPE REF TO data,
    it_fcat TYPE lvc_t_fcat.
    DATA: w_okcode TYPE sy-ucomm.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
    <ntab> TYPE STANDARD TABLE.
    * Macros
    DEFINE table_error.
      message e398(00) with 'Table' p_table &1.
    END-OF-DEFINITION.
    DEFINE fixed_val.
      is_fdiff-fieldname = is_dfies-fieldname.
      is_fdiff-fixed_val = &1.
      is_fdiff-no_input = 'X'.
      append is_fdiff to it_fdiff.
    END-OF-DEFINITION.
    * Selection screen
    SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME.
    PARAMETERS: p_table TYPE tabname OBLIGATORY "table
    MEMORY ID dtb
    MATCHCODE OBJECT dd_dbtb_16.
    SELECTION-SCREEN: BEGIN OF LINE,
    PUSHBUTTON 33(20) selopt USER-COMMAND sel,
    COMMENT 55(15) selcnt,
    END OF LINE.
    SELECTION-SCREEN: SKIP.
    PARAMETERS: p_rows TYPE i. "rows
    SELECTION-SCREEN: END OF BLOCK b01,
    SKIP,
    BEGIN OF BLOCK b02 WITH FRAME.
    PARAMETERS: p_displ TYPE c AS CHECKBOX. "display
    SELECTION-SCREEN: END OF BLOCK b02.
    * Initialization
    INITIALIZATION.
      MOVE '@4G@ Filter records' TO selopt.
    * PBO
    AT SELECTION-SCREEN OUTPUT.
      IF w_active IS INITIAL.
        CLEAR: selcnt.
      ELSE.
        WRITE w_active TO selcnt LEFT-JUSTIFIED.
      ENDIF.
    * PAI
    AT SELECTION-SCREEN.
      IF p_table NE is_x030l-tabname.
        CALL FUNCTION 'DDIF_NAMETAB_GET'
          EXPORTING
            tabname   = p_table
          IMPORTING
            x030l_wa  = is_x030l
          TABLES
            dfies_tab = it_dfies
          EXCEPTIONS
            OTHERS    = 1.
        IF is_x030l IS INITIAL.
          table_error 'does not exist or is not active'.
        ELSEIF is_x030l-tabtype NE 'T'.
          table_error 'is not selectable'.
    *    ELSEIF is_x030l-align NE 0.
    *      table_error 'has alignment - cannot continue'.
        ENDIF.
    * Default values for system fields
        REFRESH: it_fdiff.
        is_fdiff-tabname = p_table.
        LOOP AT it_dfies INTO is_dfies.
          IF is_dfies-datatype = 'CLNT'.
            fixed_val sy-mandt.
          ELSEIF is_dfies-rollname = 'ERDAT'
          OR is_dfies-rollname = 'ERSDA'
          OR is_dfies-rollname = 'AEDAT'
          OR is_dfies-rollname = 'LAEDA'.
            fixed_val sy-datum.
          ELSEIF is_dfies-rollname = 'ERTIM'
          OR is_dfies-rollname = 'AETIM'.
            fixed_val sy-uzeit.
          ELSEIF is_dfies-rollname = 'ERNAM'
          OR is_dfies-rollname = 'AENAM'.
            fixed_val sy-uname.
          ENDIF.
          CALL FUNCTION '/SAPDMC/DATAELEMENT_GET_TEXTS'
            EXPORTING
              name        = is_dfies-rollname
            IMPORTING
              text_middle = is_dfies-reptext
            EXCEPTIONS
              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.
          MODIFY it_dfies FROM is_dfies.
      ENDLOOP.
    * Prepare free selection on table
      REFRESH it_tables.
      is_tables-prim_tab = p_table.
      APPEND is_tables TO it_tables.
      CLEAR: w_selid.
    ENDIF.
    IF sy-ucomm = 'SEL'.
      IF w_selid IS INITIAL.
    * Init free selection dialog
        CALL FUNCTION 'FREE_SELECTIONS_INIT'
          EXPORTING
            expressions  = it_expr
          IMPORTING
            selection_id = w_selid
            expressions  = it_expr
          TABLES
            tables_tab   = it_tables
          EXCEPTIONS
            OTHERS       = 1.
      ENDIF.
    * Display free selection dialog
      CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
        EXPORTING
          selection_id            = w_selid
          title                   = 'Selection'
          status                  = 1
          as_window               = 'X'
        IMPORTING
          expressions             = it_expr
          field_ranges            = it_ranges
          number_of_active_fields = w_active
        TABLES
          fields_tab              = it_fields
        EXCEPTIONS
          OTHERS                  = 1.
    ENDIF.
    * Start of processing
    START-OF-SELECTION.
      PERFORM f_create_table USING p_table.
      PERFORM f_select_table.
      PERFORM f_display_table.
    * FORM f_create_table *
    FORM f_create_table USING in_tabname.
      FIELD-SYMBOLS: <fcat> TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = in_tabname
        CHANGING
          ct_fieldcat      = it_fcat
        EXCEPTIONS
          OTHERS           = 1.
      IF sy-subrc = 0.
    *   Complete field catalog
        LOOP AT it_fcat ASSIGNING <fcat>.
          <fcat>-tabname = in_tabname.
        ENDLOOP.
        CALL FUNCTION 'LVC_FIELDCAT_COMPLETE'
          CHANGING
            ct_fieldcat = it_fcat
          EXCEPTIONS
            OTHERS      = 1.
      ELSE.
        WRITE: 'Error building field catalog'.
        STOP.
      ENDIF.
    * Create dynamic table for data
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_content.
      IF sy-subrc = 0.
        ASSIGN it_content->* TO <itab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    * Create dynamic table for modif
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_modif.
      IF sy-subrc = 0.
        ASSIGN it_modif->* TO <ntab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    ENDFORM.                    "f_create_table
    * FORM f_select_table *
    FORM f_select_table.
      IF w_active = 0.
        SELECT * FROM (p_table)
        INTO CORRESPONDING FIELDS OF TABLE <itab>
        UP TO p_rows ROWS.
      ELSE.
    * Selection with parameters
        CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_WHERE'
          EXPORTING
            field_ranges  = it_ranges
          IMPORTING
            where_clauses = it_where.
        READ TABLE it_where INTO is_where WITH KEY tablename = p_table.
        SELECT * FROM (p_table)
        INTO CORRESPONDING FIELDS OF TABLE <itab>
        UP TO p_rows ROWS
        WHERE (is_where-where_tab).
      ENDIF.
      IF sy-dbcnt = 0.
        WRITE: 'No record selected'.
        STOP.
      ENDIF.
    ENDFORM.                    "f_select_table
    * FORM f_display_table *
    FORM f_display_table.
      DATA: l_answer TYPE c,
      l_eflag TYPE c.
      CLEAR: w_okcode.
      REFRESH: <ntab>.
    * Display table contents
      CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
        EXPORTING
          header       = p_table
          tabname      = p_table
          display_only = p_displ
          endless      = 'X'
          no_button    = space
        IMPORTING
          okcode       = w_okcode
        TABLES
    *      nametab      = it_dfies
          table        = <itab>
    *      fielddif     = it_fdiff
          modif_table  = <ntab>
        EXCEPTIONS
          OTHERS       = 1.
      IF sy-subrc = 0.
        IF p_displ IS INITIAL AND w_okcode = 'SAVE'.
    * Confirm update
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              titlebar              = p_table
              text_question         = 'Do you want to update table ?'
              default_button        = '2'
              display_cancel_button = ' '
            IMPORTING
              answer                = l_answer
            EXCEPTIONS
              OTHERS                = 1.
          IF l_answer = '1'.
    * Apply modifications
            IF NOT <ntab>[] IS INITIAL.
              PERFORM f_add_system USING space.
              MODIFY (p_table) FROM TABLE <ntab>.
              IF sy-subrc NE 0.
                l_eflag = 'X'.
              ENDIF.
            ENDIF.
    * Apply deletions
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                TABLES
                  deleted_data = <ntab>
                EXCEPTIONS
                  OTHERS       = 1.
              IF NOT <ntab>[] IS INITIAL.
                DELETE (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
    * Apply creations
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                TABLES
                  new_data = <ntab>
                EXCEPTIONS
                  OTHERS   = 1.
              IF NOT <ntab>[] IS INITIAL.
                PERFORM f_add_system USING 'X'.
                INSERT (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
            IF l_eflag IS INITIAL.
              COMMIT WORK.
              MESSAGE s261(53).
            ELSE.
              MESSAGE s075(3i).
              PERFORM f_select_table.
            ENDIF.
          ENDIF.
    * Display table again
          PERFORM f_display_table.
        ENDIF.
      ENDIF.
    ENDFORM.                    "f_display_table
    * FORM f_add_system *
    FORM f_add_system USING new TYPE c.
      FIELD-SYMBOLS: <irec> TYPE ANY,
      <upd> TYPE ANY.
      LOOP AT it_fdiff INTO is_fdiff.
        READ TABLE it_dfies INTO is_dfies
        WITH KEY fieldname = is_fdiff-fieldname.
        LOOP AT <ntab> ASSIGNING <irec>.
          ASSIGN COMPONENT is_fdiff-fieldname OF STRUCTURE <irec> TO <upd>.
          IF is_dfies-datatype = 'CLNT'.
            <upd> = sy-mandt.
          ELSE.
            CASE is_dfies-rollname.
              WHEN 'AENAM'.
                <upd> = sy-uname.
              WHEN 'AEDAT' OR 'LAEDA'.
                <upd> = sy-datum.
              WHEN 'AETIM'.
                <upd> = sy-uzeit.
              WHEN OTHERS.
            ENDCASE.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    "f_add_system

  • I want to know the top 10-20 Store procedures used in the table.

    Hello All, 
    There are total 3500+ Store procedures created in the server. So,  I want to know the top 10-20 Store procedures used in the table. Like which store procedures are important and what are they, is there any code to find them? 
    I think the question might be very silly, but i don't know which store procedure to look at it. 
    Please help me on this issue.
    Thanks.
    Thanks, Shyam.

    By what? CPU? Memory? Execution count?
    Glenn Berry wrote this
    -- HIGH CPU ************
          -- Get Top 100 executed SP's ordered by execution count
          SELECT TOP 100 qt.text AS 'SP Name', qs.execution_count AS 'Execution Count',  
          qs.execution_count/DATEDIFF(Second, qs.creation_time, GetDate()) AS 'Calls/Second',
          qs.total_worker_time/qs.execution_count AS 'AvgWorkerTime',
          qs.total_worker_time AS 'TotalWorkerTime',
          qs.total_elapsed_time/qs.execution_count AS 'AvgElapsedTime',
          qs.max_logical_reads, qs.max_logical_writes, qs.total_physical_reads, 
          DATEDIFF(Minute, qs.creation_time, GetDate()) AS 'Age in Cache'
          FROM sys.dm_exec_query_stats AS qs
          CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt
          WHERE qt.dbid = db_id() -- Filter by current database
          ORDER BY qs.execution_count DESC
          -- HIGH CPU *************
          -- Get Top 20 executed SP's ordered by total worker time (CPU pressure)
          SELECT TOP 20 qt.text AS 'SP Name', qs.total_worker_time AS 'TotalWorkerTime', 
          qs.total_worker_time/qs.execution_count AS 'AvgWorkerTime',
          qs.execution_count AS 'Execution Count', 
          ISNULL(qs.execution_count/DATEDIFF(Second, qs.creation_time, GetDate()), 0) AS 'Calls/Second',
          ISNULL(qs.total_elapsed_time/qs.execution_count, 0) AS 'AvgElapsedTime', 
          qs.max_logical_reads, qs.max_logical_writes, 
          DATEDIFF(Minute, qs.creation_time, GetDate()) AS 'Age in Cache'
          FROM sys.dm_exec_query_stats AS qs
          CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt
          WHERE qt.dbid = db_id() -- Filter by current database
          ORDER BY qs.total_worker_time DESC
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to filter a table?

    Hi ALL,
    I have a table with four columns. One out of them is a unique column. I want to filter the table for 1000 of records w.r.t. the unique column.
    Code snippets will be appreciated.
    Regards
    DK

    Hi,
    create one context value attribute with String datatype for ex. Filter_Value. And bind this attribute to the filterValue property of the table column.
    write the following code in OnFilter event of the table.
    String filterName = wdContext.currentContextElement().getFilter_Value();
    if(filterName!=null && !filterName.equals(""))
    // Here, call the method (or) write the code which is used to load the table.
    IPrivate<View>.I<Table_Node> myNode = wdContext.node<Table_Node>();
    int n = myNode.size();
    HashMap filterMap=new HashMap();
    int val=0;
    for (int i = n - 1; i >= 0; i--)
    String value = (String) myNode.get<Table_Node>ElementAt(i).get<Attribute_Name>();
    if (value.toLowerCase().startsWith(filterName.toLowerCase()))
    IPrivate<View>.I<Table_Node>Element myElement = myNode.get<Table_Node>ElementAt(i);
    filterMap.put("Elem" + val,newElement);
    val++;
    myNode.invalidate();
    for(int j=0;j<val;j++)
    myNode.addElement((IPrivate<View>.I<Table_Node>Element)filterMap.get("Elem" +j));
    regards
    karthik

  • How to filter a table's results

    how can I filter a table's results after the user makes a selection? For example, someone makes a selection on a read-only table which lists usernames; the new page needs to display a new table that shows the username selected and all the tasks that user has ..? any help would be appreciated. thanks.
    Adam

    See chapter 6 in the ADF tutorial:
    http://www.oracle.com/technology/obe/ADFBC_tutorial_1013/10131/index.htm
    They use the setCurrentRowWithKey method to do that.
    You can have a VO with a where clause built-in or you use the setWhereClause method of the VO in a service method you expose in the AM.

Maybe you are looking for

  • I have a Power Mac G4 and i am trying to get it to work with my LCD

    I have a Power Mac G4 and i am trying to get it to work with my LCD Monitor/TV. The connection on the computer is DVI and the connection on the Monitor is DVI. The Monitor says in the manual to hook up computers using the DVI connection. When I conne

  • While using mac as wireless router ; How to make Mac sleep?

    Hi all. I set up my macbook to act as a wireless router [sharing it's wireless signal, via the "Sharing" settings in System Preferences] using this guide http://www.macinstruct.com/node/118 I am wondering how to make my mac sleep while this wireless-

  • How do I get iMovie 11 to open again?

    I was working on putting together a few clips taken on my new iPhone 4s 1080p maybe 10 minutes worth.  I decided to quit iMovie and finish it later.  Now when I try to open iMovie it just gives me the spinning pinwheel.  When I go to force quit it it

  • Anyone know of Acrobat 8 training on forms and interactivity (not beginner)

    Does anyone know of any good professional training videos for Mac users? I've been searching for some really good online videos (free or paid, as long as they are good!) particularly for creating complex forms with lots of interactivity. Most of the

  • DVD Stuck Inside Superdrive

    I watched a DVD, pushed the Eject button (F12), the eject symbol on the screen lit up, but the DVD did not eject. Now, the Superdrive isn't showing up on the desktop. I've restarted the computer...nothing. I've held the eject button down for a while.