Disable certain rows of data to be displayed.....

I have a program in which the table will display data fed from the server .
I would have a function in which user have the freedom to select which data he wants to be display on the next refresh page.
How do i prevent the other data that user does not require to be displayed on the table ??
by the way all these will affect the rows in the table , so how do i go about manupilating the rows?
Thank YOu anyone . .

If you mean that the user will enter a kind of scan, like myitem* or item using as a wildcard, I would create a class called ScanType where you have diiferent return values. In your main code you can use if..else depending on the scantype.
public final class ScanType
     /** The types are:
     *  -1: source
     *   0: *ource
     *   1: *ourc*
     *   2: sourc*
     *   9: s*urce
     private ScanType()
          super();
     public static final int getScanType(String source)
// Default is not valid. scan type : 9
          int returnValue = 9;
// Check scan type -1: source
          if(source.indexOf("*") == -1)
               returnValue = -1;
// Check scan type 0
          else if((source.charAt(0) == '*') && (source.charAt(source.length()-1) != '*'))
               returnValue = 0;
// Check scan type 1
          else if((source.charAt(0) == '*') && (source.charAt(source.length()-1) == '*'))
               returnValue = 1;
          else if(source.charAt(source.length()-1) == '*')
               returnValue = 2;
          return returnValue;
}You can test this with this code:
public class ScanTypeTest
     public static void main(String[] args)
          String kalle = "source";
          System.out.println("Scan type: -1 " + kalle + " " + ScanType.getScanType(kalle));
          kalle = "*ource";
          System.out.println("Scan type:  0 " + kalle + " " + ScanType.getScanType(kalle));
          kalle = "*ourc*";
          System.out.println("Scan type:  1 " + kalle + " " + ScanType.getScanType(kalle));
          kalle = "sourc*";
          System.out.println("Scan type:  2 " + kalle + " " + ScanType.getScanType(kalle));
          kalle = "s*urce";
          System.out.println("Scan type:  9 " + kalle + " " + ScanType.getScanType(kalle) + " is invalid");
}The rest of the code you have to create yourself as I don't know how you will retrieve the data to be displayed.
Klint

Similar Messages

  • Copy a certain row of data into the next row in a same internal table ??

    HI, guys.
    May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
    For example:-
    *at first...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln3   ebelp3   xblnr3
    *after that, become...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln2   ebelp2   xblnr4
    ebeln2   ebelp2   xblnr5
    ebeln3   ebelp3   xblnr3
    Thanks in advance.

    hi,
    If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
    so in this case,
    loop at itab1.
      v_index = sy-tabix.
      loop at itab2 into wa where pri_key = itab1-pri_key.
      v_index = v_index + 1.
      insert  wa into itab index v_index.
      endloop.
    endloop.
    Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

  • Date selection - Disable certain days and dates

    Hello!  In an Adobe Form, is it possible to disable certain days and date ranges in the date chooser (calendar)?  For example, I want to disable all Sundays as well as dates more than one month in the past.
    I've found examples for Adobe Flex, but the disabledDays and selectableRange properties don't seem to effect the date boxes in Adobe Forms.  Search for disabledDays on this page to see an example:
    http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html
    I realize it's possible to do validation after the date has been selected, but this is not an ideal solution.
    Thanks,
    Scott

    Well sometimes workarounds are needed to cater to certain requirements and since this is a limitation currently, I think you would better opt for validation after date selection.

  • How to hide certain rows of data?

    I am creating a table where there is an option for the particular to be hidden. What do I do in HTMLDB to make that particular row to stay hidden "forever"?
    Ex:
    ID Name Hide
    1 joe N
    2 john N
    Now after I edit the data of joe to Hide=Y I want the table to display:
    ID Name Hide
    2 john N
    anyone know what statements i need to do? thanks

    Views do not stop you from being able to update your data. You can use instead of triggers like others mentioned. However, if your view is simple enough, you can do updates, inserts and deletes directly against the view. For example, using your table above create the following view. This view allows inserts, updates and deletes.
    CREATE VIEW TESTER_VIEW
    (ID, NAME, HIDE)
    AS
    select "ID","NAME","HIDE"
    from tester
    where hide = 'N';
    VPD stand for Virtual Private Database. It enables you to put row-level security on your data. Look at this white paper for a good introduction: http://otn.oracle.com/deploy/security/pdf/twp_security_db_securityoverview_10r1_1203.pdf

  • How to disable certain rows

    I have table which has 10 rows .
    I want to disable rows from 6 to 8 . It should display only 1 to 5 and 9 to 10. I think table structure is not needed for this query.
    Thanks

    weird question... this?
    SQL> create table t
      2  as
      3  select rownum rn
      4    from all_objects
      5   where rownum <= 10
      6  /
    Table created.
    SQL>
    SQL> select *
      2    from t
      3  /
            RN
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    SQL>
    SQL> select *
      2    from (select rownum r, rn
      3            from t
      4         )
      5   where r not between 6 and 8
      6  /
             R         RN
             1          1
             2          2
             3          3
             4          4
             5          5
             9          9
            10         10

  • Disabling certain rows in editable oo alv ?

    Hello Experts ,
                             I am having internal table of type z table. i am using oo alv to display data using this internal table. I am making my alv editable using field catalog. I want to keep  entire row non editable on the basis of one fields value. so how to do this? i dont want to define seperate 'types' in my program. is it possible?

    Hi Bhushan,
    there is no other way.
    1, Define structure ZTABLE_ALV is SE11 with fields
    field           type
    .INCLUDE        ZTABLE
    STYLES          LVC_T_STYL
    2. Define ALV data table and update table in your program with workareas
    data: xt_data   type table of ztable_alv.
    data: xt_updat  type table of ztable.
    data: xs_data   type ztable_alv.
    data: xs_updat  type ztable.
    3. Data selection directly into  data table
    SELECT * FROM ZTABLE
             INTO CORRESPONDING FIELDS OF TABLE xt_data
    WHERE...
    4. Loop at ALV data table and update STYLES table
    5. Show ALV DATA table in editable Grid
    6. Update (after button or something else).
    * Build update table
    loop     at  xt_data
           into  xs_data.
      move-corresponding xs_data to xs_updat.
      append xs_updat            to xt_updat.
    endloop.
    update ztable from  table xt_updat.
    That's alle

  • ALV: how to disable editable cell and F4 in certain rows only.

    I am building a table maintenance front-end with an ALV grid using OOP concept.  Certain fields are editable and also have customised search helps assigned to them in the ALV structure defined for the grid. What I want is where I have identified an entry in my database table as being locked by another user, I want to grey the line out on the ALV grid so that the entry cannot be edited and not have f4 input whilst this entry is locked by another user.
    I can grey the line out or disable F4 but not both at the same time.  If I disable the cells of the row concerned using MC_STYLE_DISABLED, the F4 is still active and will change the contents of the cell concerned via the data_changed event method in CL_GUI_ALV_GRID.
    I have used MC_STYLE_DISABLED where I have declared  a layout in my table similiar to this:
    DATA: BEGIN OF OUTPUT OCCURS 0,
    FIELD1,
    FIELD2,
    STYLE TYPE LVC_T_STYL,
    LOCK TYPE C.
    END OF OUTPUT.
    DATA: ls_celltab TYPE lvc_s_styl.
    * Where lock identified, field LOCK set to 'X'.
    LOOP AT OUTPUT where lock = 'X'.
    ls_celltab-fieldname = 'FIELD1'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ls_celltab-fieldname = 'FIELD2'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ENDIF.
    append OUTPUT.
    I have tried adding MC_STYLE_F4_NO to field LS_CELLTAB-STYLE2 but this does not do both actions atthe same time.
    Can anyone suggest what I might be doing wrong or an alternative way around this?
    Many thanks
    Regards
    Larissa

    As I have explained, I have fields that are editable AND are F4 enabled.  What I want is for certain rows of the ALV that I do not want any procesing to occur to make all fields in that row not available for input AND not f4 enabled.  I read a lock using a lock object.  If the entry in my ALV matches the key locked in the lock object, I want that line to be in display mode only in the ALV with no F4 help being able to be called.  It happens on the grid frontend when I press enter and have checked if any of my entries in my ALV are already locked by another user. The code is too long to post here. I can disbale the editable fields using MC_STYLE_DISABLED as described above but then the little drop down to enable F4 input is still visible against the field. 
    I have got round it by calling the f4 in event HANDLE_ON_F4 to not go via the search help and set er_event_data->m_event_handled = c_yes so that the F4 hit list does not appear, but I want to get rid of the drop down marker in that field in that instance.
    Hope this is a little clearer now.
    Larissa

  • How to display rows of data in JSP?

    Hi,
    I am learning Servlet and JSP. There is an exercise which requires us to access a database from a Servlet and display the retrieved data in a JSP.
    Now I am ok with the database connection. So how to display the data using some kind of loop?
    Regards

    They're called ResultSets and they are returned when you execute a query from a Statement. The next() method will tell you whether or not you have another row of data to read.

  • Requirement to display more than 65K rows of data

    Has anyone addressed the issue of Excel not being able to provide more than 65K rows of data with the users? I am working with users whom are concerned about Excel not being able to provide more than 65K rows of data.
    Why would you use BI reporting to report on data more than 65K rows of data. Has anyone designed any reports with more than 65K rows of data. I would imagine that BI reporting is for summarization and it is an on line analytical tool and not a data producing or recording tool.
    Is there a work around if the requirement is to display more than 65K rows of data? Has anyone been asked to do this kind of reporting?

    Hi,
    Please make a search in SDN.This topic has been discussed many times.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums&query=65k&adv=true&sdn_author_name=&sdn_allusernamesofthread=&sdn_category=&sdn_forum=&sdn_updated_on_comparator=ge&sdn_updated_on=
    Regards.

  • IR: Display single row of data over multi report rows.

    In an interactive report, is it possible to display the data from one database row over two or more displayed rows on a page?

    Corvette Captain wrote:
    In an interactive report, is it possible to display the data from one database row over two or more displayed rows on a page?Yes. Create the required structure using the Detail View properties.
    Users can switch between views using the view controls. You can display the report in Detail View by default via a Dynamic Action: +{thread:id=2187972}+

  • How to make Certain rows in the structure to be displayed as bold

    I have two structures in the query. There is a requirement that all values in Certain rows should be bold  I am talking about values and not the headers. The users are going to use the query through BEx Analyzer.
    I tried the Highlighted Display but it makes it only that row values BLUE. (this change makes them bold only on web).
    Please let me know if there is any way to display perticular row values in a structure in Bold.
    We have both versions 3.5 and 7.0 of BEx analyzer. The Query is on 7.0
    Thanks in Advance.
    2. I also have a requirement that all values from a perticular selection from column structure to be displayed as bold.
    ........................................Company Code1 Company Code 2 Comapany Code 3
    No Of Male Employees..................10.....................200........................30
    No Of Female Employees...........500.................70........................77
    So here All values in the row Female Employees should be bold and All values under Company Code 3 should be bold
    Edited by: Abhijit N on Dec 23, 2008 11:54 PM

    Hi Abhjit,
                 Please check formating option in bex analyzer for this.
    Plz check here......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55d2e09411d2acb90000e829fbfe/content.htm
    Regards,
    Vijay.

  • How to display rows of data into different columns?

    I'm new to SQL and currently this is what I'm trying to do: 
    Display multiple rows of data into different columns within the same row
    I have a table like this:
        CREATE TABLE TRIPLEG(
            T#              NUMBER(10)      NOT NULL,
            LEG#            NUMBER(2)       NOT NULL,
            DEPARTURE       VARCHAR(30)     NOT NULL,
            DESTINATION     VARCHAR(30)     NOT NULL,
            CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (T#, LEG#),
            CONSTRAINT TRIPLEG_UNIQUE UNIQUE(T#, DEPARTURE, DESTINATION),
            CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (T#) REFERENCES TRIP(T#) );
        INSERT INTO TRIPLEG VALUES( 1, 1, 'Sydney', 'Melbourne');
        INSERT INTO TRIPLEG VALUES( 1, 2, 'Melbourne', 'Adelaide');
    The result should be something like this:
    > T#  | ORIGIN  | DESTINATION1  |  DESTINATION2 
    > 1   | SYDNEY  | MELBORUNE     | ADELAIDE
    The query should include the `COUNT(T#) < 3` since I only need to display the records less than 3. How can I achieve the results that I want using relational views???
    Thanks!!!

    T#
    LEG#
    DEPARTURE
    DESTINATION
    1
    1
    Sydney
    Melbourne
    1
    2
    Melbourne
    Adelaide
    1
    3
    Adelaide
    India
    1
    4
    India
    Dubai
    2
    1
    India
    UAE
    2
    2
    UAE
    Germany
    2
    3
    Germany
    USA
    On 11gr2, you may use this :
      SELECT t#,
             REGEXP_REPLACE (
                LISTAGG (departure || '->' || destination, ' ')
                   WITHIN GROUP (ORDER BY t#, leg#),
                '([^ ]+) \1+',
                '\1')
        FROM tripleg
        where leg#<=3
    GROUP BY t#;
    Output:
    1 Sydney->Melbourne->Adelaide->India
    2 India->UAE->Germany->USA
    Cheers,
    Manik.

  • Display of 2 rows of data for 2 different date range selection

    Hi Folks,
    I have a requirement as follows,
    User has an option of selecting 2 Date Ranges
    From and To Date and again From and To Date
    The result should display 2 different rows of data with From and To Date range selection.
    Eg:
    12/09/20008 to 03/09/2009           10 20 30 40
    23/10/2009 to  18/12/2010           40 20 10 30
    Difference                                   30 0  20 10
    % Change                                   x  y  z   q
    Thanks for your input.
    Regards,
    KJ

    You will need to use union report, and you would have fours union's in this report.
    Union - 1: Data from 1st Date Range
    Union - 2: Data from 2nd Date Range
    Union - 3: Variance Calculation
    Union - 4: Percentage Variance Calculation.
    If the date's are coming from the same field, use cast function to use the same column twice in your prompts. Apply filters on each union as needed.
    Thanks.

  • How to process double click on rows of data displayed on html page?

    I need to display rows of data so that user could double click on a particular row to get more details.
    What I could think of doing is to embed an applet with a JTable that could easily process double click event. But the issues I have are:-
    1. I am not able to pass the data (the jsp got from processing some javabeans) to be displayed on the applet's table. It seems the applet needs to get loaded on the user's browser first and then the applet could ask the server (servlet / jsp) to send the data.
    Is there any way to provide data to applet other than html's parameter/value pairs?
    2. As per design, this applet should be used only to display the content. Double click on a row would only open a browser window to display the entire details of the data; there should not be any interaction with the server.
    Is there a better, more elegant way of doing this?
    Thanks.

    I posted a thread on Applet servlet communication here:
    http://forum.java.sun.com/thread.jsp?forum=33&thread=205887
    It uses the ObjectOutput/InputStream so you can send serializable objects rather than just text.
    Cheers,
    Anthony

  • How to exclude certain rows in the ALV display from the total?

    Hi,
    May I know is there a way to exclude certain rows that are shown in the ALV control from the calculation of grand total?
    Thanks much.

    See, if
    function module REUSE_ALV_TRANSFER_DATA 's
    IT_EXCLUDING   .... param
    works for you.

Maybe you are looking for

  • Trying to upgrade iPod Touch 4G from 4.2.1 to 5.0.1...

    I have been having problems with my home button since late Dec 2011 (about a week before the warranty ran out). This week the button decided to completely die on me (I tried fixing it with rubbing alcohol and compressed air, nothing made a difference

  • Error while booting Tuxedo on Linux machine

    Hi, I am getting following o/p when I run tmboot -y (testing)itrtrc[0]:/home/modula/itrtrc/sys-conf>tmboot -y Booting all admin and server processes in /home/modula/itrtrc/sys-conf/tuxconfig INFO: BEA Tuxedo, Version 8.0 INFO: Serial #: 454493271161-

  • Itunes not playing the song i click

    I am using iTunes on a Windows machine.  I have been adding files to my library that I had to copy from another location (somehow my library got switched, I think iTunes did it when my drive was turned off one day, or my kids selected to change libra

  • Sync session failed to start message

    When I try to sync my phone I am getting this message.  Sync session failed to start.  How do I correct this?

  • How do you get firefox not to report personal information

    A federal Goverment Agency posted some of my personal information on the web and is doing so illigally in violation of the privacy act, and other reporting laws, can some one tell me how to get Fire Fox not to report this illegal information ?