To add a filter in a table in wd java

Hi All,
I have a functionality to add a filter in a table. I have read a few posts on this but unable to understand it.
Please help me out.
Thanks,
Shubham Gupta

Hi,
Please look at this [document for table filter and sorting functionality|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0cf0997-2e08-2d10-b08e-964a2c04c47a?QuickLink=index&overridelayout=true]
Hope this is help full for you,
Regards
Vijay

Similar Messages

  • How to Add a filter option for a entire table to a search button?

    Hi all,
    I am new to SAPUI5. i am having a table with hard coded data's.and i have a search field.
    i want to add a filter option to the search field for the entire table..
    i can able to add a filter option to the column by using filterProperty.
    is there is any method or property to do that?
    PS - i have attached my table code.
    Regars
    Dayalan

    Hi Dayalan,
    documentation for filtering and sorting is in this section of the Developers Guide.
    Cheers
    Graham Robbo

  • Field name is not know error when trying to add a filter

    Hello all!
    I need to add a filter dinamically to display a report. I'm using Crystal Reports 10 w/ RAS server.
    There is an sql statement in Database Fields > Command. It uses a join and a correlation name for table name: TT.START_TIME.
    I am getting a "Field name is not known" error:
    "This field name is not known. Details: errorKind Error in File C:\WINDOWS\TEMP\{D375AB61-F7AE-4BCC-AF5E-6702C0EFDE10}.rpt: Error in formula . '{Command.TT.START_TIME} in DateTime (2007, 08, 01, 09, 00, 00) to DateTime (2007, 08, 24, 04, 45, 00)' This field name is not known. Details: errorKind"
    I tried to specify the field the following ways:
    Command.START_TIME
    TT.START_TIME
    START_TIME
    TIME_TRACKER.START_TIME (time_tracker being the table name)
    MAIN.TIME_TRACKER.START_TIME (main being the schema)
    All of the above is giving the same field name not known error.
    I am adding the filter the following way:
            String whereClause = "{Command.TT.START_TIME} in DateTime (2007, 08, 01, 09, 00, 00) to DateTime (2007, 08, 24, 04, 45, 00)";
            IFilter filter = rptClientDoc.getDataDefinition().getRecordFilter();
            filter.setFreeEditingText(whereClause);
            rptClientDoc.getDataDefController().getRecordFilterController().modify(filter);
    I also tried the following where clause:
    String whereClause = "{Command.TT.START_TIME} > DateTime (2006, 08, 01, 09, 00, 00) AND {Command.TT.START_TIME} < DateTime (2007, 08, 24, 04, 45, 00)";
    still doing the same thing.
    If anyone could please help me w/ this I'd really appreciate it!
    Thank you!
    Anastasia

    The first formula was created using the selection formula expert. I only added the TT part after it didn't work giving the same message. The name the expert gives it after I click on the field is {Command.START_TIME}. Still gives the invalid field name error. -_- Could the rest of the forumula be causing the problem?
    In regards to parameterizing the SQL Command, I spoke w/ the gentleman who creates these reports in Crystal, he says it's not possible, because sometimes we don't want a where clause and sometimes we do.
    Is there a way to directly edit the SQL string itself which is in the Command through java?
    Thank you very much for taking time to respond.
    Anastasia

  • Need to add a filter to imported SQL

    I used the File\Import-SQL menu option to import an existing query from another application. The query runs and creates a results table. I do not see an option in the Query\Request section to add a filter so that the user can select a range of values at runtime. I am using BI + Interactive Reporting Studio version 9.3.

    The short answer is, "It can't be done."
    Here's the JavaScript coder's answers.
    You can add a result filter and provide dashboard controls to enable the user to enter or select values, then use scripting to modify the filter and navigate to the results.
    You can provide dashboard controls to enable the user to enter or select values, then use scripting to modify the sql file, re-import it, then process the query.

  • How to add a new columns in table contorl in standard screen.

    Hi All,
    I am working on a enhancement for transaction VA01. I have to add few column for tab Additional Data B. In this tab  column are displayed in table control. Now i have to add two more column in table control. Could you please help me to find out the exit and the way to populate the new columns.
    Thanks
    Piyush Mathur

    Hi Piyush,
              That table control might have been created using an internal table i.e declared in the exit. Add two more fields which you want to that internal table. And come to the layout and create table control once again using that internal table.
    Reward if helpful.
    Regards,
    Ramana

  • Add a new record to table control

    Dear all,
    How to add a new  blank record to a table control?
    Following code is not working for adding  a new blank record to a table control
    MODULE USER_COMMAND_0100 INPUT.
        SAVE_OK = OK_CODE.
        CLEAR OK_CODE.
        CASE SAVE_OK.
          WHEN 'EXIT'.
            LEAVE PROGRAM.
          WHEN 'APND'.             " A button "Add" to add a new record to table control
            REFRESH IT_KNA1.
            CLEAR IT_KNA1.
            APPEND IT_KNA1.
        ENDCASE.
    ENDMODULE.        
    Thanks you

    Hope you have done all table control specific coding
    refer this example program
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm

  • Is it possible to add a filter to a webapp without declaring it in web.xml

    Hello,
    I'd like to add a filter in my web.xml file, but without declaring it in my webapp.
    Indeed, I have multiple webapps, and I'd like to have a common web.xml file that should be directly included in all the webapps including this package ?
    Is it possible or not ?
    As for JSF, it is possible to add faces-config file by putting it in the META-INF of the package.
    Thanks in advance.
    bgOnline

    Your title and your question are opposites...
    A filter must be specified in a web.xml to be used. That doesn't mean the Filter's class HAS to be in your webapp, it just must be accessible to the Servlet container (you could place it in the common/classes directory or shared/classes directory or even the server/classes directory).
    I've not tried it, but I see no reason why you couldn't declare the filter and filter-mapping in the server's web.xml which would then filter all requests in all webapps.
    HTH.

  • Add change Icon in the Table Control tool bar.

    Hi Abapers,
    I need to add "change" icon in the table control. I added it but when I click on it is not working.
    My requirement is that when I run my custom report, all the fields should be shown is in display mode. Then when I click on the "change" icon, all fields should be enabled for change.
    I have already referred to the standard progs BCALV_* but it does not have the "change" icon.
    plz give me any reference prg or sample code.
    Thanks
    Nani.

    Hi Nani,
    Track the function code of change icon in user command. if it is clicked then put a flag eq X.
    check that flag in PBO, if it is eq X then screen-input = 1 or vice versa.
    try this code:
    in PBO:
    LOOP AT SCREEN
    IF WS_EDIT = 'X'
    SCREEN-INPUT = 1
    ELSE
    SCREEN-INPUT = 0
    ENDIF
    MODIFY SCREEN
    ENDLOOP
    Hope it will work fine
    Regards
    Krishnendu

  • How to add record in Qualified table using MDM Java API

    Hi experts,
    I am trying to add a record into a Table.
    but I am facing the problem in setFieldValue method.
    //Getting Field-ID to pass in setFieldValue() method.
    FieldId[] fields = new FieldId[6];
              fields[0] = repSchema.getFieldId("GTINs", "Description");
              fields[1] = repSchema.getFieldId("GTINs", "Unit_Descriptor");
              fields[2] = repSchema.getFieldId("GTINs", "GTIN");
              fields[3] = repSchema.getFieldId("GTINs", "Alternate_Item_Classifications");
              fields[4] = repSchema.getFieldId("GTINs", "Country_Of_Origin");
              fields[5] = repSchema.getFieldId("GTINs", "Bar_Coded");
    Record rec = RecordFactory.createEmptyRecord(mainTableId);
    rec.setFieldValue(fields, );
    but I am not getting how to assign the value to these fields using MDMvalue Interface.
    Can anyone provide me the code sample or Code flow so that I can do this.
    Plz help me it'll be great help for me.
    Thanks
    Tarun
    Edited by: Tarun Sharma on Feb 4, 2008 11:39 AM
    ==========================================================================================
    Hi Gurus
    I found the way to add the MDMValue in setFieldValue Method.
    we can set like this:
    setFieldValue(<fieldId object like fieldId[], <MdmValue like this> new StringValue("ABC"));
    Now I am facing problem in adding value to lookup flat table.
    According to the setFieldValue method we can assign the loookup like this:
    setFieldValue(<fieldId[0]>, new LookpValue(<here we have to pass the recordID of lookup table>);
    so I want to know how I can pass the recordId of lookup table here.
    Please suggest.
    Thanks
    Tarun Sharma
    Edited by: Tarun Sharma on Feb 4, 2008 3:15 PM
    Edited by: Tarun Sharma on Feb 4, 2008 3:25 PM
    Edited by: Tarun Sharma on Feb 8, 2008 6:58 PM

    Hi Andrea,
    I tried your suggestion but now i am getting Type Mismatch Error.
    Please suggest me what I can do?
    //TableId for Lookup[Flat].
    TableId lookupTableId = repSchema.getTableId("Return_Goods_Policies");
    FieldId[] ReturnGoodsPolicyTableIdFields = new FieldId[1];
    ReturnGoodsPolicyTableIdFields[0] = repSchema.getFieldId("Return_Goods_Policies", "Name");               
    Record recLookup = RecordFactory.createEmptyRecord(lookupTableId);
    try{
    recLookup.setFieldValue(ReturnGoodsPolicyTableIdFields[0], new StringValue("New_Brand"));
    }catch(Exception ex){
    System.out.println(ex);
    //Creating Record in Qualified Table - Request Details
    CreateRecordCommand createLookupcommand = new CreateRecordCommand(simpleConnection);
    createLookupcommand.setSession(session);
    createLookupcommand.setRecord(recLookup);
    createLookupcommand.execute();     
    //Getting the recordId of Lookup record.
    RecordId lookupRecordId = createLookupcommand.getRecord().getId();
    //Table Id for Qualified table.
    TableId  qualifiedTableId = repSchema.getTableId("Ext_Hardlines");
    FieldId[] ExtHardlinesFields = new FieldId[3];
    ExtHardlinesFields[0] = repSchema.getFieldId("Ext_Hardlines", "Name");//Text
    ExtHardlinesFields[1] = repSchema.getFieldId("Ext_Hardlines", "Pieces_Per_Trade_item");//Integer
    ExtHardlinesFields[2] = repSchema.getFieldId("Ext_Hardlines","Return_Goods_Policy");
    Record recQualified = RecordFactory.createEmptyRecord(qualifiedTableId);
    try{
    recQualified.setFieldValue(ExtHardlinesFields[0], new StringValue("Qualified Value"));
    recQualified.setFieldValue(ExtHardlinesFields[1], new StringValue("Qualified Description"));
    recQualified.setFieldValue(ExtHardlinesFields[2], new LookupValue(lookupRecordId));
    }catch(Exception ex){
    System.out.println(ex);
    //Creating Record in Qualified Table - Request Details
    CreateRecordCommand createQualifiedCommand = new CreateRecordCommand(simpleConnection);
    createQualifiedCommand.setSession(session);
    createQualifiedCommand.setRecord(recQualified);
    createQualifiedCommand.execute(); I am getting this Type match here, but i m not getting what mistake i did.     
    RecordId qualifiedRecordId = createQualifiedCommand.getRecord().getId();
    //Adding to Main Table
    TableId  mainTableId = repSchema.getTableId("GTINs");
    FieldId[] gtinsFields = new FieldId[1];
    gtinsFields[0] = repSchema.getFieldId("GTINs","Ext_Hardlines");
    Record recMain = RecordFactory.createEmptyRecord(mainTableId);
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();
    qualifiedLookupValue.createQualifiedLink(qualifiedRecordId);
    try{
    recMain.setFieldValue(gtinsFields[0], new QualifiedLookupValue(qualifiedLookupValue));
    }catch(Exception ex){
    System.out.println(ex);
    CreateRecordCommand createCmd = new CreateRecordCommand(simpleConnection);
    createCmd.setSession(session);
    createCmd.setRecord(recMain);
    createCmd.execute();
    Could you help me out?
    Thanks
    Tarun

  • Check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table B

    How to check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table b.
    DDL-
    Create table A
    ( A INT,
    B INT,C VARCHAR(2)
    Create table B
    A INT,
    B INT
    Any advice on the best approach or method to achieve this.
    I understand that I need to check the schema of the columns and then do a match between 2 tables and find new columns and then alter my target table
    Mudassar

    Can you try this..
    CREATE TABLE A ( A INT, B INT, C VARCHAR(2) )
    CREATE TABLE B ( A INT, B INT )
    Declare @ColumnVar nvarchar(128),@DatatypeVar nvarchar(128)
    SELECT @ColumnVar=x.COLUMN_NAME, @DatatypeVar=x.DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS AS x
    WHERE TABLE_NAME = 'A'
    AND NOT EXISTS ( SELECT *
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'B'
    AND COLUMN_NAME = x.COLUMN_NAME )
    Declare @SQL VarChar(1000)
    SELECT @SQL = 'ALTER TABLE B ADD ' + @ColumnVar + ' '+ @DatatypeVar
    Exec (@SQL)
    select * from B
    Please Mark This As Answer if it helps to solve the issue
    http://stackoverflow.com/questions/2614101/alter-table-my-table-add-column-int

  • Javascript code to enable an ADD button to create duplicate tables and pages for multiple entries

    I am using Adobe XI Pro. I have created a multi-page fillable pdf questionnaire that I want to make interactive to the user. Within each page, I have multiple tables that can have ADD buttons to duplicate the table if the client wants more than one test. I would like this table to insert directly below the previous table and they may be able to add upto 5 of these table.
    I also have a couple pages in the questionnaire that require duplication for multiple samples. Eg. One page per sample, and I may have upto 10 samples. I would like the javascript to have an ADD button and then add each page behind the previous related sheet (Original and duplicates together)
    I am not a javascript coder so I would need some examples and a walk through. I did take some developer courses in engineering but it has been almost two decades
    I have search on several forums and cannot find a good resource so I appreciate the help.
    Sincerely
    Tara

    Some of what you want to do can be done using template features and a bit of JavaScript, but if your users will be using Reader, version 11 will be required. You can dynamically add new pages, but adding new tables to existing pages with reflow of content that comes after is not possible with a form created in Acrobat. If you have access to Adobe's LiveCycle Designer form creation software, you can create what's known as a dynamic XFA form that can do all of what you want. You can ask in the LiveCycle Designer forum for more information: http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/livecy cle_designer_es?view=discussions

  • To add new record into the table Data Service client

    When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
    Code:
    DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
    EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
    edoc.addNewEmployeeDetails();
    //here I set the primary key value empid
    edet.setEmpid("1212");
    edet.setEmpname("manu");
    ds.submit(edoc);
    Error
    EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
    com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
         at com.bea.ld.ServerBean.submit(ServerBean.java:529)
         at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Unknown Source)
    Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
         at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
         at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
         at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
         ... 15 more
    But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
    The update method works fine for the same client.
    The exception only happens when I am trying to insert a new record.
    Please help me to figure out this problem.

    If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
    Correction: put ld-server-app.jar in the client classpath
    Edited by mreiche at 09/17/2007 3:28 PM

  • How can I add an adornment to a table model?

    Hi
    - Is it possible to add an adornment to a table model?
    -  If yes how can I do that? Interface? Sample?
    Thanks for any hint
    Hans

    Hi,
    How can I add an attribute to a node of a DOM
    Document?
    I want to add attribute Maximum="6" for all Grade node
    as <Grade Maximum="6">.
    Grade is a third level node in my document.
    ThanksGet the father of "Grade" elements as an element. Then get all elements named "Grade", and for each one set attribute "Maximum" with value "6". If you read api documentation you will know which methods to use.
    But for helping you in getting the "Grade" parent.
    1) get the root element of the Dom Doc
    2)get the father of the "Grade" father: getElementsBytagName("his name") -> it will return a Node List get the first element casting as Element if there's only one, or elese if not case
    3)the same method in 2 get the "Grade" father
    4)getElementByTagName("Grade") over the "Grade" father -> for each "grade" element on nodelist do whatever you need
    i hope u understood...

  • Add a Button in a table header Webdynpro

    Hi all,
    how can'i add a button in a table header ? and how/where schould be implemented?
    thank you all

    Hi,
    If you want to create Some custom buttons in ALV, you need to write some coding.
    Please go through this...
    ALV with user-defined buttons on toolbar in wd abap
    Re: Adding custom button in standard toolbar in ALV
    If you want to create button is table toolbar. steps :
    1. create TABLE UI Element in view - go to ROOT UI ELEMENT CONTAINER( right side here you find inserted Table ) - Right click on that ->you fined one option INSERT TOOLBAR, click this-> it will insert Toolbar again right click on this tool bar-> You wil find insert
    toolbar element->select Toolbar button. It will insert toolbar and buttons.
    Cheers,
    Kris.

  • Needs to add DateTime Stamp in my table records

    Hi SAP Gurus
    I wanted to add a field in my table that will capture DateTime stamp for records creation. Could u pls let me know how can i do that.
    Thanks....

    capture the time just before the insert:
    DATA: BEGIN OF wa,
            time_stamp TYPE timestampl,
          END OF wa.
    GET TIME STAMP FIELD wa-time_stamp.
    INSERT dbtab FROM wa.

Maybe you are looking for

  • Syncing issues with Calendar - ITouch

    I am using 8GB Itouch, running on Software 2.2 and ITunes 8.0.2.20. In the past anytime that I sync my information it would update contacts & calendar at the same time. Right now it would act as though it is syncing but it does not show the updated i

  • Apps not showing on iCloud

    Hello, does anyone know why my iCloud page on the web only shows the apps that came with my iPad and does not show any of the apps i have bought please?

  • Formatting for cubes and dimensions

    Is it possible to use different formatting on the cubes and dimensions in the subject area in OBIEE? We're on 11.1.1.6.2. Our report writers want to easily be able to differentiate between the 2. Can we make the cubes bold or use a different font or

  • ASP, MS Server 2003 issue (erver object error 'ASP 0177 : 800401f3')

    Post Author: UTA CA Forum: Integrated Solutions I have to transfer over a website over from a 2000 server to 2003 server. The website is written in ASP, in the old server, the application is using crystal reports 9, and on the new server i installed

  • How to run a client?

    A want a client progrma to connect to the server by pressing a button. But the method to run a client is by typing: "java HelloClient" before run the program. How can I call the client connection when I already run the program(an applet)? Thanks~~