How to display only selected columns in the table on the tableview

Hi All,
I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
  <htmlb:page>
    <htmlb:form>
      <htmlb:tableView id              = "tv1"
                       visibleRowCount = "10"
                       selectionMode   = "lineEdit"
                       table           = "<%= flights %>"
                       filter = "SERVER"
                       sort = "server"
                       iterator        = "<%= iterator %>" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
Thanks
Karen

Hi,
   Please try this code.
<!-- To display Table control on BSP page with table internal table it_hist  --!>
          <htmlb:tableView id              = "TV_HIST"
                           headerText      = "Previous History"
                           headerVisible   = "TRUE"
                           footerVisible   = "TRUE"
                           design          = "ALTERNATING"
                           selectionMode   = "LINEEDIT"
                           visibleRowCount = "5"
                           fillUpEmptyRows = "TRUE"
                           table           = "<%= it_hist %>"
                           width           = "500" >
<!--  to show selected columns give required field name --!>
<htmlb:tableViewColumns>
  <htmlb:tableViewColumn columnName          = "FIELD1"
                                     title               = "COLUMN1"
                                     horizontalAlignment = "CENTER"
                                     width               = "65" >
              </htmlb:tableViewColumn>
  <htmlb:tableViewColumn columnName          = "FIELD2"
                                     title               = "COLUMN2"
                                     horizontalAlignment = "CENTER"
                                     width               = "65" >
              </htmlb:tableViewColumn>
  <htmlb:tableViewColumn columnName          = "FIELD3"
                                     title               = "COLUMN3"
                                     horizontalAlignment = "CENTER"
                                     width               = "65" >
              </htmlb:tableViewColumn>
  <htmlb:tableViewColumn columnName          = "FIELD4"
                                     title               = "COLUMN4"
                                     horizontalAlignment = "CENTER"
                                     width               = "65" >
              </htmlb:tableViewColumn>
<!--  to make column editable set edit property to TRUE --!>
  <htmlb:tableViewColumn columnName          = "FIELD4"
                                     title               = "COLUMN4"
                                     edit = "TRUE"
                                     horizontalAlignment = "CENTER"
                                     width               = "65" >
              </htmlb:tableViewColumn>
            </htmlb:tableViewColumns>
          </htmlb:tableView>

Similar Messages

  • How to export only selected columns of WD ALV to excel

    Hi,
    I have WD ALV report with EXPORT button (since standard button was not working properly i just hide that and added custom one) & standard dropdown to choose layout. Out of 20 columns user may choose n number of columns, the same number of columns i need to transfer to xls. How to export only selected columns to xls. Any method or FM to filter number of columns being transfer to xls. please advise
    Rgds
    sudhanshu

    Hi,
    Where exactly we are (or going to be) using this reference i.e., CL_SALV_WD_CONFIG_TABLE. Im passing contents, filename & MIME type as:
    call function 'SCMS_STRING_TO_XSTRING'
        exporting
          TEXT   = TEXT
        importing
          BUFFER = XTEXT.
    WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE(
    **path to the word file
        I_FILENAME = 'WDP.xls'
    String Variable
        I_CONTENT =  XTEXT
    File Type
        I_MIME_TYPE = 'EXCEL' ).
    In CL_SALV_WD_CONFIG_TABLE we have few methods related to column settings however not sure where exactly we will be using this class reference. can you please give some idea so that i can do some r&d in that.
    Rgds
    Sudhanshu

  • How to display fixed width column in Advanced Table?

    Hi,
    This is probably a newbie question for OAF. My requirement is quite simple but I couldn't find the answer in either the OAF developer's guide or anywhere else so I turn to the experts here. I have a region of type Table or Advanced table with three items in them. One of the Item is of type comments which could be up to 4000 characters.
    I wanted to show all three on the first page but only have fixed width for the comments section like only show the first 50 characters for example and then if they want to see more detail they can click on a link to see full comments.
    The problem is I cannot figure out how to make the comments item fixed width. I have played with the table width properties but it keeps displaying the comments in multiple lines (I don't want that...). I have also tried putting the Table in a Row Layout but it doesn't seem to help.
    Since this is new development I can change my region style to anything to meet my requirements.
    I hope this is an easy question and if someone can help me that would be great....:-)

    Hi,
    Thanks but I was not wanting to change the VO attribute length size since I want to have a link on the first page which would enable to see a user the full 4000 comments using the same VO object. Then if I limit it to 50 characters in the VO, I will not be able to display the full comments on the second page.
    Isn't there some way in the UI that I can limit it? I know one workaround I can use for now is to have another column in the VO with the 50 character value such as substr(comments, 1, 50) and then have the full comments selected also in the VO and then show this subtr value in the first page and the comments value in the 2nd. I just thought there would be an easier way about it then doing all this workaround.
    Any ideas?
    Thanks

  • How to display multiple selected rows in a table inside a popup?

    Hi,
    I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
    Thanks
    Karan

    Hi,
    Not confident if this works or not but just try it...
    1. create a ViewLink between the same view Object.
    The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
    2. Update the changes in Appln Module.
    Open the AM and in DataModel tab .
    select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
    3. Refresh DataControl accordion.
    4. in your jsff page drag and drop the child vo as a table..
    See if it works
    Regards,
    Santosh.

  • In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    This is one of those things that I find really strange about Numbers 3. The control for what you want to do is not where anyone would expect to find it.
    Select the Chart
    Click on Edit Data References
    Look at the bottom left corner of the Numbers window. It should say "Plot Columns as Series" or "Plot Rows as Series"
    Click on it and change it to the other

  • Displaying metadata, how to display ONLY the Date

    I would like to display the Date below each image in Aperture 3. When I select "Date" in the Browser & Viewer Metadata window, the result is a very long string with the Date, the Time and the Time Zone. meaning that most of the time I see nothing because the string is much too long to be displayed...
    How to display ONLY the Date ?
    Thank you.
    Olivier

    om28 wrote:
    I will do that but still... if the Date could be ONLY the Date "without time and time zone", I would be able to display more information.. and it will look nicer.
    I said at the top of my first response above: +Afaik, there is no way within Aperture to change the date format of the date metadata overlay.+
    Send Aperture feedback to Apple via "Aperture→Provide Aperture Feedback"
    In the past I used Expression Media and the config for displaying such info was better.
    Aperture has a strange interface for it (and for other parameters), it does not behave at all like an Apple software (for the GUI), probably an external development team... but I agree it is more complex than iPhoto.
    Aperture is 10x more complex than iPhoto.
    If you want to see a rigid, boxed, "engineer"-style image database interface, take a look at Lightroom 3. It's a great program -- but it's a very different concept of information presentation and interaction.
    Thanks again.

  • How to select columns in a table by their column id and not the column name

    Hello,
    How do you select columns from a table based on their column_id.
    I have create a view
    but other than Select * , i cant now select one just one column from it
    the view as follow:
    create view count_student as
    select a.acode "acode",aname "Activity Name",count(ae.acode) "Number of student joined"
    from aenrol ae, activity a
    where a.acode= ae.acode
    group by a.acode,aname;

    The issue is that you have decided to use quoted column names. A pretty horrible idea (mostly for the reasons that you are now finding).
    Re-create the view and get rid of the silly double quotes.

  • ALV: how to display only subtotals and total rows in the output

    ALV: how to display only subtotals and total rows in the output
    i am getting output
    i am getting subtotals for respective fields
    but i want to display only subtotals and totals rows in the output
    i have tried the
    totals_only   parameter in slis_layout_alv
    but it is not working.

    hi,
    For TOTAL
    For the amount field / quantity field in the field catalog give DO_SUM = 'X'    for WHOLE total
    For SUBTOTAL
    For subtotal you will have to create an internal table sort..Let's say you want to do subtotal for each customer..
    DATA: lt_sort type SLIS_T_SORTINFO_ALV,
    ls_sort type slis_sortinfo_alv.
    CLEAR ls_sort.
    ls_sort-spos = 1.
    ls_sort-fieldname = 'Give the field name that you do the sum'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    APPEND ls_sort TO lt_sort.
    fieldcatalog-do_dum = 'X'.
    for subtotals
    WA_SORT-FIELDNAME = 'ERSDA'.
    WA_SORT-SPOS = '2'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOTAL = 'X'.
    APPEND WA_SORT TO IT_SORT.
    Refer
    http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e056d52611d2b468006094192fe3/content.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/doesnt-function-event-subtotal_text-in-alv-713787
    regards,
    Prabhu
    reward if it is helpful

  • I am trying to import photo's on i photo.  It downloads all of the pictures on my camera, how do i only select the photos i want?  Is there a way to do this without selecting one photo at a time? is there a way to select multiple images?  thanks!

    I am trying to import photo's on i photo.  It downloads all of the pictures on my camera, how do i only select the photos i want?  Is there a way to do this without selecting one photo at a time? is there a way to select multiple images?  thanks!

    To select consecutive images click and drag the cursor over multiple thumbnails to select all at once.
    To select multiple images that are randomly located hold down the Command(⌘) key and click on those images you want to select.
    Or to select consecutive images from a list of images that are together hold down the Shift key and and click on the first photo you want to select and the on the last photo you want in the list.
    OT

  • How do you sync only selected songs to your ipod using the new version of itunes?

    how do you sync only selected songs to your ipod using the new version of itunes?

    Same way you did with the previous versions of iTunes.
    To view the iPod in iTunes, Ctrl S to show the sidebar.
    Create a playlist, add songs and sync that playlist.
    Or drag songs to the iPod in iTunes.

  • How to get the column names of the table into the Dashboard prompt

    how to get the column names of the table into the Dashboard prompt
    Thanks & Regards
    Kishore P

    Hey john,
    My requirement is as follows
    I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
    My pivot table looks like this
    COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
    ---------------------------------------------------- JAN 2009          FEB 2009        MAR 2009
    RANK              REGION                  DOLLARS           DOLLARS        DOLLARS DOLLARS
    1 CENTRAL 10 20 30 40
    2 SOUTHERN 10 30 30 70
    3 EASTERN 20 20 20 60
    4 WESTERN 10 20 30 40
    When i select the District in column selector
    Report has to display rank based on Total Sales by District. i.e
    ------------------------------------------------- JAN 2009         FEB 2009       MAR 2009
    RANK             DISTRICT              DOLLARS           DOLLARS        DOLLARS DOLLARS
    for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
    so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
    do you have any solution for this?
    http://rapidshare.com/files/402337112/Presentation1.jpg.html
    Thanks & Regards
    Edited by: Kishore P on Jun 24, 2010 7:24 PM
    Edited by: Kishore P on Jun 24, 2010 7:28 PM

  • How to display name of the table and the description and the table type

    Hi,
    Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
    I want to display in a list.
    Kind Regards

    use this program
    TABLES : TSTC, tstct.
    TABLES : DD03l, DD02l.
    DATA : Program like sy-repid.
    DATA : BEGIN OF I_FINAL OCCURS 0,
    tabname LIKE dd02l-tabname,
    TABCLASS LIKE dd02l-tabCLASS,
    TEXT LIKE DD02T-DDTEXT,
    END OF I_FINAL.
    DATA : BEGIN of ITAB Occurs 0,
    name like dd02l-tabname,
    END OF ITAB.
    DATA : TCD(100) TYPE C.
    DATA : var1 LIKE dd02l-tabname.
    DATA : DESC LIKE TSTCT-TTEXT.
    selection-screen skip.
    SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
    Parameters : Tcode like sy-tcode.
    selection-screen skip.
    PARAMETERS : r2 RADIOBUTTON GROUP r.
    Parameters : Prog like sy-repid.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
    select-options : Type for dd02l-tabclass .
    SELECTION-SCREEN END OF BLOCK B1 .
    at selection-screen.
    if r1 = 'X' and Tcode is initial.
    message e001(00) with 'Enter Transaction Code' .
    elseif r2 = 'X' and Prog is initial.
    message e001(00) with 'Enter Program Name' .
    endif.
    START-OF-SELECTION.
    if r1 = 'X'.
    Prog = ' '.
    select single * from TSTC where tcode = tcode.
    if sy-subrc = 0.
    program = TSTC-PGMNA.
    select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
    else.
    Write :/ 'Invalid Transaction Code'.
    exit.
    endif.
    elseif r2 = 'X'.
    Tcode = ' '.
    program = Prog.
    endif.
    CALL FUNCTION 'GET_TABLES'
    EXPORTING
    PROGNAME = Program
    TABLES
    TABLES_TAB = itab.
    if itab is initial.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    ELSE.
    PERFORM : categorize.
    endif.
    END-OF-SELECTION.
    LOOP AT I_FINAL.
    WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
    50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
    ENDLOOP.
    AT LINE-SELECTION.
    TCD = SY-LISEL.
    var1 = TCD+3(30).
    set parameter id 'DTB' FIELD VAR1.
    call transaction 'SE11' and skip first screen.
    TOP-OF-PAGE.
    WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
    WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
    WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
    SKIP 1.
    WRITE :/1(140) SY-ULINE.
    WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
    55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
    WRITE :/1(140) SY-ULINE.
    *& Form categorize
    text
    --> p1 text
    <-- p2 text
    FORM categorize .
    SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
    FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
    INTO TABLE I_FINAL
    FOR ALL ENTRIES IN itab
    WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
    if sy-subrc <> 0.
    skip.
    skip.
    skip.
    skip.
    skip.
    WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
    endif.

  • How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single
    method ?How to encrypt column of some table with the single
    method ?
    using dbms_crypto package
    Assumption: TE is a user in oracle 10g
    we have a table need encrypt a column, this column SYSDBA can not look at, it's credit card number.
    tha table is
    SQL> desc TE.temp_sales
    Name Null? Type
    CUST_CREDIT_ID NOT NULL NUMBER
    CARD_TYPE VARCHAR2(10)
    CARD_NUMBER NUMBER
    EXPIRY_DATE DATE
    CUST_ID NUMBER
    1. grant execute on dbms_crypto to te;
    2. Create a table with a encrypted columns
    SQL> CREATE TABLE te.customer_credit_info(
    2 cust_credit_id number
    3      CONSTRAINT pk_te_cust_cred PRIMARY KEY
    4      USING INDEX TABLESPACE indx
    5      enable validate,
    6 card_type varchar2(10)
    7      constraint te_cust_cred_type_chk check ( upper(card_type) in ('DINERS','AMEX','VISA','MC') ),
    8 card_number blob,
    9 expiry_date date,
    10 cust_id number
    11      constraint fk_te_cust_credit_to_cust references te.customer(cust_id) deferrable
    12 )
    13 storage (initial 50k next 50k pctincrease 0 minextents 1 maxextents 50)
    14 tablespace userdata_Lm;
    Table created.
    SQL> CREATE SEQUENCE te.customers_cred_info_id
    2 START WITH 1
    3 INCREMENT BY 1
    4 NOCACHE
    5 NOCYCLE;
    Sequence created.
    Note: Credit card number is blob data type. It will be encrypted.
    3. Loading data encrypt the credit card number
    truncate table TE.customer_credit_info;
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    BEGIN
    for cred_record in (select upper(CREDIT_CARD) as CREDIT_CARD,
    CREDIT_CARD_EXP_DATE,
    to_char(CREDIT_CARD_NUMBER) as CREDIT_CARD_NUMBER,
    CUST_ID
    from TE.temp_sales) loop
    dbms_output.put_line('type:' || cred_record.credit_card || 'exp_date:' || cred_record.CREDIT_CARD_EXP_DATE);
    dbms_output.put_line('number:' || cred_record.CREDIT_CARD_NUMBER);
    input_string := cred_record.CREDIT_CARD_NUMBER;
    raw_input := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    dbms_output.put_line('> Input String: ' || CONVERT(UTL_RAW.CAST_TO_VARCHAR2(raw_input),'US7ASCII','AL32UTF8'));
    encrypted_raw := dbms_crypto.Encrypt(
    src => raw_input,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    encrypted_string := rawtohex(UTL_RAW.CAST_TO_RAW(encrypted_raw)) ;
    dbms_output.put_line('> Encrypted hex value : ' || encrypted_string );
    insert into TE.customer_credit_info values
    (TE.customers_cred_info_id.nextval,
    cred_record.credit_card,
    encrypted_raw,
    cred_record.CREDIT_CARD_EXP_DATE,
    cred_record.CUST_ID);
    end loop;
    commit;
    end;
    4. Check credit card number script
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    decrypted_raw RAW(2048);
    decrypted_string VARCHAR2(2048);
    cursor cursor_cust_cred is select CUST_CREDIT_ID, CARD_TYPE, CARD_NUMBER, EXPIRY_DATE, CUST_ID
    from TE.customer_credit_info order by CUST_CREDIT_ID;
    v_id customer_credit_info.CUST_CREDIT_ID%type;
    v_type customer_credit_info.CARD_TYPE%type;
    v_EXPIRY_DATE customer_credit_info.EXPIRY_DATE%type;
    v_CUST_ID customer_credit_info.CUST_ID%type;
    BEGIN
    dbms_output.put_line('ID Type Number Expiry_date cust_id');
    dbms_output.put_line('-----------------------------------------------------');
    open cursor_cust_cred;
    loop
         fetch cursor_cust_cred into v_id, v_type, encrypted_raw, v_expiry_date, v_cust_id;
    exit when cursor_cust_cred%notfound;
    decrypted_raw := dbms_crypto.Decrypt(
    src => encrypted_raw,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    decrypted_string := CONVERT(UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw),'US7ASCII','AL32UTF8');
    dbms_output.put_line(V_ID ||' ' ||
    V_TYPE ||' ' ||
    decrypted_string || ' ' ||
    v_EXPIRY_DATE || ' ' ||
    v_CUST_ID);
    end loop;
    close cursor_cust_cred;
    commit;
    end;
    /

  • How can I select columns from a table EMP, using Select statement?.

    Hi Friends,
    How can I select columns from a table EMP?.
    I want to select columns of EMP table, using select statement.
    Please reply me urgently.
    Shahzad

    Something like this:
    scott@DBA> select empno,ename,job from emp;
         EMPNO ENAME      JOB
          7369 SMITH      CLERK
          7499 ALLEN      SALESMAN
          7521 WARD       SALESMAN
          7566 JONES      MANAGER
          7654 MARTIN     SALESMAN
          7698 BLAKE      MANAGER
          7782 CLARK      MANAGER
          7788 SCOTT      ANALYST
          7839 KING       PRESIDENT
          7844 TURNER     SALESMAN
          7876 ADAMS      CLERK
          7900 JAMES      CLERK
          7902 FORD       ANALYST
          7934 MILLER     CLERK
    14 rows selected.Check the documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
    Message was edited by:
    Delfino Nunez

  • How to display a select query record in a tool tip?

    hi,
    How to display a select query record in a tool tip?
    for example i have a report employee. when i move the mouse pointer over a employee name, the tool tip should display the respective department id, department name...of that employee name.
    select dep_id, dep_name ....from department where employee.....Is it possible?
    thanks

    Dear Skud,
    Yes its possible..select ''||ename||'' from emp
    other wise you can use jQuery tooptip or some other JScript bundles.
    Thanks and Regards
    Maheswara

Maybe you are looking for