How to fix the size of the column in a table of ALV table  type?

Hi all,
I want o fix the size of the ALV column.
Can any one help me out regarding this.
Regards,
Yugesh

* Data declarations for instantiation
  DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table   ,
        l_ref_cmp_usage   TYPE REF TO if_wd_component_usage,
        l_value   TYPE REF TO cl_salv_wd_config_table   ,
* Instantiate the ALV
  l_ref_cmp_usage =   wd_this->wd_cpuse_usg_alv_feclm( ) ."usg_alv_feclm is the name of your usage
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL .
    l_ref_cmp_usage->create_component( )                 .
  ENDIF                                                  .
* Get model
  l_ref_interfacecontroller = wd_this->wd_cpifc_usg_alv_feclm( ).
  l_value = l_ref_interfacecontroller->get_model( )             .

Similar Messages

  • How to fix the column length and table length?

    Hi Experts/Gurus,
    I want to fix the column lenght so that if data exceeds it should be in the same colum. But the size of the table should not get changed.. I used the width property of both table and column. But its not working..
    Regards,
    Yugesh

    Hi Yugesh,
    For column wrapping you can use the SET_WRAPPING of cl_salv_wd_header and the data.....you have got cell editor for that column right...then using the cell edtior reference you can get the specific cell tyep(like cl_salv_wd_text_view type check this)
    this is object reference and you can use the set_wrapping of this class. using this you can get the wrapping functionality for the data also....
    DATA: lr_column TYPE REF TO cl_salv_wd_column,
               lr_column_header type ref to cl_salv_wd_header,
               lr_editor type ref to cl_salv_wd_uie,
               lr_textview type ref to cl_salv_wd_uie_text_view.
    wd_this->alv_value->if_salv_wd_table_settings~set_fixed_table_layout( ABAP_TRUE ).
    lr_column = wd_this->alv_value->if_salv_wd_column_settings~get_column( 'EDITION' ).
    lr_column->set_width( '55' ).
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_wrapping( abap_true).
    lr_editor = lr_column->get_cell_editor( ).
    lr_textview ?= lr_editor.
    lr_textview->set_wrapping( abap_true ).
    Now for the column and it's data the wrapping is set...
    Regards,
    Lekha.
    Edited by: Lekha on Nov 16, 2009 2:12 PM

  • How to fix the column header width in BEx or WAD

    hi there!
    how to fix the column header width in BEx or WAD. because, depends on the column data, the column size varies. i want to fix the size so that i can maintain the consistency through out the report.
    thanks!
    Vam.

    Dear Vam,
    you can easily do that with css, search the source code of the executed web template for the td tag which is around your coloumn header, remember the style sheet class name it is ´displayed as class= in the td tag.
    Now you can add this code the beginning of your web template:
    </style>
    This will only work in Web.
    Regards
    Marcus

  • How to sum the column in a table seperated by sign.

    How to sum the column in a table separate by sign.
    For Example:
    A B
    10 MOHAN
    -15 KUMAR
    -25 MARCH
    50 MAY

    SELECT  SUM(CASE SIGN(A) WHEN 1 THEN A ELSE NULL END) SUM_POSTIIVE,
            SUM(CASE SIGN(A) WHEN -1 THEN A ELSE NULL END) SUM_NEGATIIVE
      FROM  tbl
    /SY.

  • How to find the column name and table name with a value

    Hi All
    How to find the column name and table name with "Value".
    For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
    Any help is highly appricatable
    Thanks & Regards
    Srikkanth.M

    2 solutions by Michaels (the latter is 11g upwards only)...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from cols,
           xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
           columns result varchar2(10) path '.'
    where table_name in ('EMP', 'DEPT')
    TABLE_NAME           COLUMN_NAME          SEARCH_STRING        RESULT   
    DEPT                 DNAME                ES                   RESEARCH 
    DEPT                 DNAME                ES                   SALES    
    EMP                  ENAME                ES                   JONES    
    EMP                  ENAME                ES                   JAMES    
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   SALESMAN 
    EMP                  JOB                  ES                   PRESIDENT
    EMP                  JOB                  ES                   SALESMAN 
    9 rows selected.

  • How to Fix the 1st row in Table

    How to Fix the 1st row in Table
                 In EP, one of the page we are getting out put in the table format. It's working fine, but as per the new requirement we have to fix (freeze) the first row of the table. (.i.e. whenever I click the page down button first row should be visible in the table). Can you help regarding the above issue?
    For Example: in Table having 6 rows. In 1st row display Year Month and 2,3,4---etc Rows will display Quantity. Click on Page down Button in Table we are able to staring 2row. First was a movie up. So End user canu2019t find which year/moth under the Quantity is available.
    So I have to fix in 1st row. Click on page down button table 1st row is fixed but comes to another Quantity Records.
    It is Possible in Table?  If possible please tell me.
    Regards
    Vijay Kalluri

    Hi KalluriVijay 
    I don't think there is direct availabe method available to fix the row. However, there are two ways using which you can achieve the requirement:
    To go ahead with the custom table. This way you can set your own properties for the table. However, this may impact performance handling large data.
    Second option is to use other features of NW04s (Not available in NW04) like Table Popins using which you can achieve something similar.
    For Table Popins refer [TablePopin|http://help.sap.com/saphelp_nw70/helpdata/EN/23/5e9041d3c72e7be10000000a1550b0/frameset.htm]
    Hope this helps.
    Regards
    Abhinav Sharma

  • How to fix the column header

    Try to display something like this:<br><br>
    HA HB <br>
    A1 B1<br>
    A2 B2<br>
    <br>
    So I use:
    <div class="Show2Rows"><br>
    <table><br>
    <tr><br>
    <th>HA</th><br>
    <th>HB</th><br>
    </tr><br>
    <tr><br>
    <td><input ... value="A1" ></td><br>
    <td><input ... value="B1" ></td><br>
    </tr><br>
    <br>
    </table><br>
    </div><br>
    <br>
    The rule is: allow it to display ONLY two rows in the window. When more rows are added, a vertical scroll bar will be enabled. --And, yes, it works just as expected.
    The problem is that when more rows are added, when I scroll the bar downward, of course the rows will move up. When this happens, the Column Headers (HA and HB) will disappear. Obviously I need to fix the Column Headers.
    So question is: How can I fix the headers while still be able to scroll the data rows up and down?
    Thanks

    Dear Vam,
    you can easily do that with css, search the source code of the executed web template for the td tag which is around your coloumn header, remember the style sheet class name it is ´displayed as class= in the td tag.
    Now you can add this code the beginning of your web template:
    </style>
    This will only work in Web.
    Regards
    Marcus

  • How I compare the columns of 2 tables

    Hi, what's the query I use to compare all the columns of 2 tables, or how I use the result of COLUMN_NAME in the DBA_TAB_COLS?
    Tnks for helping...
    Mnk

    I have this select:
    SELECT D.COLUMN_NAME AS CFINAL
    FROM DBA_TAB_COLS D,
    (SELECT A.COLUMN_NAME AS C1
    FROM DBA_TAB_COLS A
    WHERE (A.OWNER LIKE '%TEL_USJ07%' AND
    A.TABLE_NAME = 'BOLETOS')) F
    WHERE D.COLUMN_NAME = F.C1
    AND D.OWNER LIKE '%TEL_USJ07%'
    This will return the column's name where tabel_name LIKE BOLETOS.
    I want use this result in another select where the table have this columns and more, but I want to see all the results in the second table where the columns came from the first select.
    For example: the first select bring to me the columns: cod_tipo_bol and cod_tipo_corte, I want to see in the second select only the results of this 2 columns.
    THIS IS THE COLUMNS OF THE SECOND TABLE I WANT TO USE:
    cod_tipo_bol
    cod_frente_corte
    num_carga
    cod_caminhao
    cod_motorista
    lib_numero
    cod_enc_frente
    cod_div2
    cod_div3
    cod_div4
    bol_data
    cod_carregadora1
    cod_oper_carreg1
    cod_carregadora2
    cod_oper_carreg2
    cod_colhedora1
    cod_oper_colhed1
    cod_colhedora2
    cod_oper_colhed2
    cod_colhedora3
    cod_oper_colhed3
    cod_trat_reb
    cod_oper_trat_reb
    cod_trat_transb1
    cod_oper_transb1
    cod_trat_transb2
    cod_oper_transb2
    cod_trat_transb3
    cod_oper_transb3
    cod_julieta_sm_reboque
    bol_status
    --------

  • How to get the column name and table name with value

    Hi All
    I have one difficult requirement
    I have some column values and they have given some alias column names but i need to find the correct column name and table name from the database.
    For example value is "SRI" and i dont know the table and exact column name so is there any possibilities to find the column name and table name for the given value
    Thanks & Regards
    Srikkanth.M

    Searching all the database for a word...
    Courtesy of michaels...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    11g upwards
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('EMP', 'DEPT')),
           xmltable (str columns result varchar2(10) path '.')
    TABLE_NAME                     COLUMN_NAME                    SEARCH_STRING                    RESULT   
    DEPT                           DNAME                          es                               RESEARCH 
    EMP                            ENAME                          es                               JAMES    
    EMP                            JOB                            es                               SALESMAN 
    EMP                            JOB                            es                               SALESMAN 
    4 rows selected.

  • How to increase text size of a Column header of table in webdypro

    Hi All,
    Can anybody suggest me how to increase the text size of a column header of table in webdyrpo. I didnt find any option anywhere. can anybody help me out to solve this issue?
    Regards
    Ravikumar

    Hi Ravikumar,
    As Sukanta has suggested create a Simpletype of String Type and Length 40.
    Then create a context for the column header and for its type, instead of choosing
    from the drop down, choose the 3 dots.
    In the window that appears, select Local Dictionary, and Select the Simpletype
    that you have created, from the respective package name. And click OK.
    This will make the text of ColumnHeader of type String and Length 40.
    Hope it helps.
    Regards,
    Alka.

  • How to fix the width of ADF Table

    Hi,
    I am developing an application in ADF using ADF Faces Components . I am using Oracle Jdev 10.1.3.1.0
    I am dropping the Transient View object as ADF Table on UI. I have set the width property of table to 100%, I have also changed the inlinestyle width also to 100%. These two did not work for me.
    The issue is if a column has a value of bigger length the table size is extending and if the column has a value of smaller length the table size is reducing.
    Is this the expected behaviour of the width property of the table ?? . Is there any way to fix the table size. Please provide me some pointers to fix the issue.
    Thank You.

    Hi vijay,
    Setting the width to 100% did not work for me.
    Table Script: Create table sample (name varchar2(1000), num number);
    Insert the below Data:
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,1234
    aaaaaaaaaaaaaaaaaaaaa,12
    aaa,3444
    aaassssssssssssss,1234
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,123423
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,123123
    With this info in the table drop it is as view object on the UI.
    Set the RangeSize to 2 in the PageDef.xml file
    The issue is: For the first 4 rows the table size is showing perfectly but when it showing 5 and 6 row on the UI the table is stretching.
    Please provide me some more pointers to fix this issue.
    Thank You.

  • How to resize the columns of a table?

    Hi there!
    I want to resize the column of a JTable(constructed via AbstractTableModel) to
    fit the exact width of the word in the header?
    Can anyone tell me how to do this thing?
    Regards,

    import java.awt.*;
    import javax.swing.table.*;
    public class ColumnResizeDemo extends javax.swing.JFrame {
        public ColumnResizeDemo() {
            initComponents();
            TableColumn column = null;
            for (int i = 0; i < jTable1.getColumnModel().getColumnCount(); i++) {
                column = jTable1.getColumnModel().getColumn(i);
                String hv = column.getHeaderValue().toString();
                JTableHeader th = jTable1.getTableHeader();
                FontMetrics fm = th.getFontMetrics(th.getFont());
                column.setPreferredWidth(fm.stringWidth(hv)+5);
        private void initComponents() {
            jLabel1 = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTable1 = new javax.swing.JTable();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Column Resize Demo");
            jLabel1.setText("Sets column width to fit exactly the corresponding header value");
            getContentPane().add(jLabel1, java.awt.BorderLayout.NORTH);
            jTable1.setModel(new javax.swing.table.DefaultTableModel(
                    new Object [][] {
                        {null, null, null, null},
                        {null, null, null, null},
                        {null, null, null, null},
                        {null, null, null, null}
                    new String [] {
                "Title 1", "Title 0002", "Title 0000003", "Title 00000000000004"
            jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
            jScrollPane1.setViewportView(jTable1);
            getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
            pack();
        public static void main(String args[]) {
            new ColumnResizeDemo().setVisible(true);
        private javax.swing.JLabel jLabel1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTable jTable1;
    }

  • How to optimize the column width in Table Control

    Hi all,
          When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
    So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
    thanks for your help.
    Points would be awarded .
    Regards,
    Anil .

    Hi,
    In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
    Regards
    Sudheer

  • How to fix the column width in a table in htmlb tableview control

    HI Experts,
    I have an issue with my htmlb table view controller. I have created a custom iView with a htmlb table view control and placed it in quick navigation window.
    When data in columns exceeds, I am getting horizontal scroll bar and column,table are getting extened. I don't want  column size increases when text length increses. Instead when lenght of the text incrases in a column, I want the text displyed in multiple columns.
    I have tried for this as below.
    <hbj:tableView
        id="statTable"
        model="bean.stattableModel"
        design="ALTERNATING"
        headerVisible="false"
        footerVisible="false"
        fillUpEmptyRows="false"
        navigationMode="BYPAGE"
        selectionMode="NONE"
        headerText="Report List"
        visibleFirstRow="1"
        visibleRowCount="10"
    width="100%">
    <%
         stattableModel.getColumn("D").setWidth("5px");
         stattableModel.getColumn("D").setWrapping(false);//tried true aswell
         stattableModel.getColumn("H").setWidth("px");
         stattableModel.getColumn("H").setWrapping(false);
    %>
    No change happen ever after I used the above code.
    Any one has the idea, how make it work.
    Thanks in Advance,
    Chinna.

    Hi Babu,
    Please go through this links.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80a7eef2-9a2c-2a10-12bb-abad552f3302
    http://www.sapfans.com/forums/viewtopic.php?f=20&t=300326
    Kind regards
    Prabhakaran.P

  • How to get the column name and table name from xml file

    I have one XML file, I generated xsd file from that xml file but the problem is i dont know table name and column name. So my question is how can I retrieve the data from that xml file?

    Here's an example using binary XML storage (instead of Object-Relational storage as described in the article).
    begin
      dbms_xmlschema.registerSchema(
        schemaURL       => 'my_schema.xsd'
      , schemaDoc       => xmltype(bfilename('TEST_DIR','my_schema.xsd'), nls_charset_id('AL32UTF8'))
      , local           => true
      , genTypes        => false
      , genTables       => true
      , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_CONTENTS
      , options         => dbms_xmlschema.REGISTER_BINARYXML
    end;
    genTables => true : means that a default schema-based XMLType table will be created during registration.
    enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_CONTENTS : indicates that a repository resource conforming to the schema will be automatically stored in the default table.
    If the schema is not annotated, the name of the default table is system-generated but derived from the root element name :
    SQL> select table_name
      2  from user_xml_tables
      3  where xmlschema = 'my_schema.xsd'
      4  and element_name = 'employee';
    TABLE_NAME
    employee1121_TAB
    (warning : the name is case-sensitive)
    To annotate the schema and control the naming, modify the content to :
    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
      <xs:element name="employee" xdb:defaultTable="EMPLOYEE_XML">
        <xs:complexType>
    Next step : create a resource, or just directly insert an XML document into the table.
    Example of creating a resource :
    declare
      res  boolean;
      doc  xmltype := xmltype(
    '<employee>
      <details>
        <emp_id>1</emp_id>
        <emp_name>SMITH</emp_name>
        <emp_age>40</emp_age>
        <emp_dept>10</emp_dept>
      </details>
    </employee>'
    begin
      res := dbms_xdb.CreateResource(
               abspath   => '/public/test.xml'
             , data      => doc
             , schemaurl => 'my_schema.xsd'
             , elem      => 'employee'
    end;
    The resource has to be schema-based so that the default storage mechanism is triggered.
    It could also be achieved if the document possesses an xsi:noNamespaceSchemaLocation attribute :
    SQL> declare
      2 
      3    res  boolean;
      4    doc  xmltype := xmltype(
      5  '<employee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      6             xsi:noNamespaceSchemaLocation="my_schema.xsd">
      7    <details>
      8      <emp_id>1</emp_id>
      9      <emp_name>SMITH</emp_name>
    10      <emp_age>40</emp_age>
    11      <emp_dept>10</emp_dept>
    12    </details>
    13   </employee>'
    14   );
    15 
    16  begin
    17    res := dbms_xdb.CreateResource(
    18             abspath   => '/public/test.xml'
    19           , data      => doc
    20           );
    21  end;
    22  /
    PL/SQL procedure successfully completed
    SQL> set long 5000
    SQL> select * from "employee1121_TAB";
    SYS_NC_ROWINFO$
    <employee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceS
      <details>
        <emp_id>1</emp_id>
        <emp_name>SMITH</emp_name>
        <emp_age>40</emp_age>
        <emp_dept>10</emp_dept>
      </details>
    </employee>
    Then use XMLTABLE to shred the XML into relational format :
    SQL> select x.*
      2  from "employee1121_TAB" t
      3     , xmltable('/employee/details'
      4         passing t.object_value
      5         columns emp_id   integer      path 'emp_id'
      6               , emp_name varchar2(30) path 'emp_name'
      7       ) x
      8  ;
                                     EMP_ID EMP_NAME
                                          1 SMITH

  • Calculate total size of clob column in a table

    how to Calculate total size of clob column in a table.
    Thanks ,
    Sakthivel

    SAKTHIVEL wrote:
    I would like to calculate table size and particular clob column size inside that table. The size of the table and the size of the LOB are two totally different things.
    Barring cases where the LOB is less than 4k and stored inline, the LOB data is stored outside the table in a separate segment.
    If you want to get the combined size of the table and of its LOB segments, you could do something like
    SELECT SUM(bytes)/1024/1024 gb
      FROM dba_segments
    WHERE (owner = <<table owner>> and
           segment_name = <<table name>>)
        OR (owner, segment_name) IN (
            SELECT owner, segment_name
              FROM dba_lobs
             WHERE owner = <<table owner>>
                AND table_name = <<table name>> )Justin

Maybe you are looking for

  • Can not focus or edit on JTextField on SuSe Linux 9.1

    Hi, I am trying to debug a strange problem with JTextField on SuSe Linux 9.1. The problem is that the mouse click can not gain focus to the JTextField in a very high frequency. Once problem occurs, the keyboard tab also does not work. The problem doe

  • Play two different sounds at same time  from Split Keyboard?

    Is it possible to configure the Logic Environment so that one can play or record, from a split keyboard, two different EX24/Audio Instrument sounds on two different tracks AT THE SAME TIME... (and/or: combinations of Audioinstrument + Midi) EG: From

  • OS Lion Slow, is it too much for my MBP?

    hi everyone- I have a 2007 model MBP, 2.33 GHz Intel core 2 duo. I upgraded everything I could within the last year with a 500 gb internal hard drive and 4GB 667 MHz memory installed. Out of that 500GB hard drive, almost 290GB are available. I upgrad

  • Java Proxy error: Exception in method methodExists

    Hello all! We are doing the following synchronous scenario:  CRM->XI->JavaProxy--->Third party.... Here is the process we are following to deploy our Proxy: 1.Created EJB Module Project in NWDS 2.Import the files generated by XI into ejbModule folder

  • System Preferences/Internet/email

    I am using OSX 10.2.8 and MAIL 1.2.5 I have just had to reset my e-mail account. Why doesn't the MAIL application refer to the settings entered in the Internet pane of System Preferences. MAIL HELP says that it should but I had to enter account detai