ALV Column size changing

Hi,
How to change column size of ALV report during run time
Regards,

Hi,
I think, you need to increase or decrease the width of the column.
It cannot be changed dynamically .....
but what we can do is
In your itab, check all the records for that field's length
take the highest size and pass it to the fieldcat.
and see the results.
So, if less width is there then the width of the column is less and if is very wide then the column will be wide
Regards,
Venkatesh

Similar Messages

  • Repositioning viewport of column size change

    I have a JTable with multiple columns and rows. Columns can be resized or moved by dragging the column headers. Whenever a column is resized the table viewport jumps to the top of the table. I am looking for a way to either hold the viewport at the current location (i.e. the location immediately prior to performing the column size change) or to reposition it to that location after the column size change bumps it to the top.
    I have set a TableColumnModelListener to handle the margin change events and the column moved events. In the case of the column moved event (which also bumps the viewport to the top) I can reposition the viewport to the original location with no problem, but the columnMarginChanged event seems to generate a whole flurry of viewport repositioning events, many of which occur after the actual columnMarginChanged event has been processed, thereby overriding any viewport repositioning that I attempt in the event handler.
    I have set a change linstener on the table's viewport to handle repositioning events, but I have no way of determining if the event was triggered by a column resizing operation or by a legitimate scrolling operation.
    Does anyone have any suggestions?

    I'm using 1.4.2_06 on XP and don't experience this problem.
    If you need further help then read this link on [url http://www.physci.org/codes/sscce.jsp]Creating a Simple Demo Program before posting again.

  • ALV font size change

    I have got reports which have ALV grid display.I want to change the font size of the heading,is there a way in SAP for doing the same.
    In Selection screen,I want to change the font size of my fields,is there a option of doing this.

    it it possible so u can use follwoing code .
    FORM alv_grid .
      layout-zebra = 'X'.
      layout-colwidth_optimize = 'X'.
      layout-info_fieldname = 'COLOR'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = 'ZLIST2'
                i_callback_user_command = 'USER_COMMAND'
                i_callback_top_of_page  = 'TOP_OF_PAGE'
                i_callback_end_of_page  = 'END_OF_PAGE'
                is_layout               = layout
                it_fieldcat             = ls_fieldcat
                i_default               = 'X'
                i_save                  = 'A'
           TABLES
                t_outtab                = t_ekko
           EXCEPTIONS
                program_error           = 1
                too_many_lines          = 3
                OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.
          FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      DATA : lable(60) TYPE  c.
      DATA : spac(5) TYPE c VALUE '    '.
      DATA : head TYPE  slis_listheader,header TYPE slis_t_listheader .
      head-typ  = 'H'.  head-info =  'HEADER DOCUMENT '.
      APPEND head TO header.
      CONCATENATE 'FROM' '  '  ebeln-low '  ' 'TO '  '  ' ebeln-high
       INTO  lable
    SEPARATED  BY space .
      head-typ  = 'S'.
      head-info = lable.
      APPEND head TO header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
          it_list_commentary = header
          I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.

  • How to change font size, maximum column size in the result screen ?

    hi All
    That's great when using SQL Dev.
    But I also have a trouble that how to change font size, maximum column size in the result screen ?
    My users think that font in result screen is shown very small, and whenever the data in each colum is long then it's not shown full data in column, they must double click for extend the size. Have the option to default the max size for showing full data in each column ? I try but still not to do that .
    Appreciate for anyone to help us.
    Thanks all.
    Sigmasvn

    You can't change the font for the results screen yet, however you will be able to select an auto-fit option for selected columns, so if some columns have slitghtly wider text you'll be able to set the column widths to handle these wider columns.
    Also, there s the option of switching the layout of a record in the grid.
    Sue

  • Change column size

    At the publisher's request, I need to change the book size from 7x10 to 7.5x10.5
    I would like to avoid reformatting every page in every chapter.  I want to keep the column size the same and just increase the margins.  However, when i change the page size, the three columns automatically adjust to that new size.
    I have tried selecting "adjust layout" but it doesn't help.  There doesn't seem to be any option for columns except how many there are.  Is there any way to adjust column size independent of page size?

    Peter's last answer was pretty good.
    Did you make your columns by drawing three text boxes on a page, or by drawing a single text box with three columns inside it?
    Did you make your columns by making a master page? Or did you draw a whole bunch of text boxes for each page of your document?

  • Cannot change column size in iPod Classic

    I received my Classic today and transferred over all my music. After making changes to various things, I tried to adjust the size of the columns. I cannot.
    I was able to delete a column, then re-add it then change the size. In my 5th Gen Video ipod I could just but the cursor on the right side of the column and click, it would adjust to the size of the largest, Name, Artist, Album etc. I am able to change column sizes in itunes, just not the ipod.
    I've looked through threads to find something that resembles my problem but most seem to be with itunes and not the ipod. Both computers I use are updated to 7.4.1
    I was wondering if I restore the factory settings would I be able to change the column sizes without having to delete and re-add them? Or is this another new lovely and VERY annoying update to itunes/ipod?
    Thanks.

    I can confirm that it's not (specifically) your iPod and it's not your OS. I'm running the newest iTunes through Mac OS 10.3.9 with a 3G iPod and just made a playlist with the same problems. NONE OF MY OTHER PLAYLISTS are affected - the columns there adjust just fine, but any NEW playlists I generate on my iPod will not allow me to individually adjust columns. Right-clicking on a column header does not even allow me to "Auto Size Column", but only to affect ALL the columns, or choose a column to add or remove.
    Interestingly enough - new playlists I generate in iTunes (not on the iPod) work normally. However, it isn't feasible for my 10GB hard drive to automatically sync with my 15GB iPod, so I can't test and see if dragging a playlist to the iPod will generate one with alterable columns.
    My opinion is that this is in some way related to the 7.4 or 7.4.1 update. I believe I last generated a playlist before the 7.4 update, and had no problems.

  • How to increase the column size of Alv tbale

    Hi All,
    I created an Alv table to display the content of my database table. In one of the column the entire data from my database are not displayed the last few characters are missing. The data type for that column in the database is char. Can any one help me how to increase the column size in my Alv table or any suggestions to resolve this issue.

    Hi Vadiv,
    Try with this..
    DATA: LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
    LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,
    LR_CMDL TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
    LR_TABLE_SETTING TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
    IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
    LR_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    " get reference to the ALV model
    LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALV( ).
    LR_CMDL = LR_IF_CONTROLLER->GET_MODEL( ).
    LR_TABLE_SETTING ?= LR_CMDL.
    " Set column width
    DATA LR_COL TYPE REF TO CL_SALV_WD_COLUMN.
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    LR_COL->SET_WIDTH( '70' ) .
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'ENAME' ).
    LR_COL->SET_WIDTH( '100' ) .
    LR_TABLE_SETTING->SET_FIXED_TABLE_LAYOUT( ABAP_TRUE ).
    You can refer to webdynpro component SALV_WD_TEST_TABLE_PROPS. Go to the view TABLE and look inside the method SET_COLUMN_SETTINGS. I hope this will help you.
    Cheers,
    Kris.

  • SQL-developer 4 EA unable to change the column sizes

    when viewing data, it is not possible to change the column sizes like you do in a spreadsheet by sliding between the column-headers.
    regards Karsten

    when viewing data, it is not possible to change the column sizes like you do in a spreadsheet by sliding between the column-headers.
    regards Karsten

  • Changing column size

    Hi
    I am working on oracle 8i. I have requirement to change a column size from varchar(3) to varchar2(4). I know the command to change the column size. all I need to know, their are 6 child tables. they are referencing this tables column.
    what is the best way do I need to change child tables column size first and then i need to change column sixe of main table. do i need to consider to change views and triggers ans indexex.
    please help me

    Hello,
    You would increase dramatically your chances to get an answer by posting in the Database forum.
    Francois

  • ALV Columns

    Hi! I have a problem with the ALV columns in 4.7 extension set 2.0.
    The columns on my ALV report appear to be automatically re-sizing themselves whenever the report is printed from the list view.  This never used to happen in the past, even if I had enabled the "Optimize columns" on the "View" tab on the saved version of the grid view layout.  You could size the columns in the list view (to get a predictable record length for printing purposes) and they would stay that way.  My user says the print problems associated with this column re-sizing started happening in mid-February. The user's issue is if the columns grow and the total record length exceeds 170, SAP automatically changes the printing page format from X_58_170 to X_65_200 and the resulting printout becomes difficult to read. Is there a way to correct this?
    Thanks in advance!

    Hi Liz,
    the solution to your problem is not with the ALV itself.
    Which output device are you using ?
    If you are the basic device type SWIN for the output device type LP01 or LOCL.
    then you need to configure the page format in SAP.
    this can be by going through the Transaction  SPAD and then choose -> Full Administraion. Then choose the Device type tab.and then clik on SWIN or SAPWIN if it so.
    And then the FORMATS icon/ push button. then select the particular page format like X_15_200 etc. tparticular o configure the same as default for your printer
    Hope that this may solve your problem.
    With Regards,
    Venugopal.T

  • Report Generation excel column size

      Dear,
    In the project, I save the data in Excel with Report Generation. I would like change just the column size of my Excel report. There is an explanation in the labview help but I have always an error when I run the VI.
    I work with labview 8.2
    A VI is joined with a simple example.
    Regard
    Julien
    Attachments:
    report table graph.vi ‏21 KB

    Julien,
    I realize you only want to modify columns, but you need to put in a start and stop row value other than -1.  Try setting the start and stop rows to 0.

  • Data type column size does not match size of values returned

    I've tried searching but couldn't find what I was looking for, sorry if this has been answered or is a duplicate.
    I am using the (Java) method below to get the column definitions of a table. I am doing this through an ODBC connection (using Oracle ODBC driver) and I have NO CHOICE in the matter.
    The problem I am having is that one particular column has a column size is smaller than the size of the data it purportedly holds (ie attendance_code = varchar size 3 but data value is "Absent". I suspect the data is actually a look up to situation, where my attendance_code column has a value of 'ABS' and Oracle goes and fetchs the "Absent" value.
    My issue is that the meta data returned from ODBC is the actual column definition (ie varchar(3) and not varchar2(10) for example).
    The resultset metadata has a size of 3 for the column in question, and querying the schema also yields 3 for that column.
    How do I resolve this? I do not have access to all_columns table etc. I have to do it using ODBC metadata only.
    I've tried recreating the situation using the Oracle XE DB, but as I am not familiar with Oracle, I do not know how to recreate this scenario (which would then lead me to test other options with ODBC).
    TIA.
    The select I am using is SELECT * FROM <tableName>.
    public ArrayList<SchemaColumn> getColumnsForTable(String catalog,
    String schema,
    String tableName) {
    ArrayList<SchemaColumn> columns = new ArrayList<SchemaColumn>();
    ResultSet rs = null;
    try {
    DatabaseMetaData metaData = connection.getMetaData();
    rs = metaData.getColumns(catalog, schema, tableName, "%");
    SchemaColumn column;
    while (rs.next()) {
    column = new SchemaColumn();
    column.setName(rs.getString("COLUMN_NAME"));
    column.setDataType(rs.getInt("DATA_TYPE"));
    column.setTypeName(rs.getString("TYPE_NAME"));
    column.setColumnSize(rs.getInt("COLUMN_SIZE")); <-------- this is the value that is coming back smaller than the data it actually returns
    column.setDecimalDigits(rs.getInt("DECIMAL_DIGITS"));
    column.setNumPrecisionRadix(rs.getInt("NUM_PREC_RADIX"));
    column.setNullable(rs.getInt("NULLABLE"));
    column.setRemarks(rs.getString("REMARKS"));
    column.setDefaultValue(rs.getString("COLUMN_DEF"));
    column.setSqlDataType(rs.getInt("SQL_DATA_TYPE"));
    column.setSqlDateTimeSub(rs.getInt("SQL_DATETIME_SUB"));
    column.setCharOctetLength(rs.getInt("CHAR_OCTET_LENGTH"));
    column.setOrdinalPosition(rs.getInt("ORDINAL_POSITION"));
    columns.add(column);
    } catch (Exception e) {
    Log.getLogger().error("Could not capture table schema");
    closeResultSet(rs);
    return columns;
    }

    I can't say I've ever seen a case where a column held more data than it was declared as, and would have to file that under "see it to believe it" category.
    Even if that somehow were the case, I'd expect the ODBC driver to return what the column is defined as anyway, not the data. The data changes with every row, but I'd expect the table metadata to be consistent, and refer to the table definition.
    For grins though, can you provide system.out.println output of the metadata, and also a "describe xxxx" from sqlplus if you can, where xxx is the table name?
    ie,
    while (rs.next()) {
    System.out.println("column name is " + rs.getString("COLUMN_NAME"));
    System.out.println("data type is " + rs.getInt("DATA_TYPE"));
    ..etc..
    Greg

  • Set maximum matrix row and column size

    I hope someone can help me with this. Is there any way to set the row and column size of a matrix control? I have not been able to find a solution. The only way I've been able to set the size is by resetting matrix to its previous state if the user inputs a value outside of the bounds I would like to set. This is done in the 'value changed' event case.
    The matrix is large and therefore I cannot increase the size of the control to be the maximum size and then hide the row and column index controls. These have to be displayed.
    Any suggestions or help would be greatly appreciated. Thanks in advance.

    Here's a quick and dirty way.
    Simply hide the index controls and replace them with some fake numeric controls and set the data range accoding to your requirements.
    In the attached example (LV8.0), the fake index controls are limited to 0..2, the array size is 5x5 and the displayed array portion is 3x3. Seems to work fine.
    (Of course you could add a bit more code to set the limits automatically based on the various sizes.)
    You could also make it more fancy and turn the entire thing into an Xcontrol.
    Message Edited by altenbach on 06-06-2007 05:32 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LimitArrayControl.vi ‏18 KB

  • Show image in Web Dynpro ALV column

    Hello everybody,
    I have a WD component with an ALV table bound to a context node. Works very fine so far.
    Now in the first column of the node I have put an image source (MIME object in my WD component).
    I configured the first ALV column as Link To Action and now would like to link it to the image source. My problem is that the image is not loaded in the ALV.
    This is my coding (INIT method of my view):
    METHOD wddoinit .
      DATA: lo_alv_cmp         TYPE REF TO if_wd_component_usage,
                  lo_alv_if          TYPE REF TO iwci_salv_wd_table,
                  lo_alv_config      TYPE REF TO cl_salv_wd_config_table,
                  lo_column_settings TYPE REF TO if_salv_wd_column_settings,
                  lo_column          TYPE REF TO cl_salv_wd_column,
                  lo_link_to_action  TYPE REF TO cl_salv_wd_uie_link_to_action.
    get instance of ALV component
      lo_alv_cmp = wd_this->wd_cpuse_alv( ).
      IF lo_alv_cmp->has_active_component( ) IS INITIAL.
        lo_alv_cmp->create_component( ).
      ENDIF.
    get instance of ALV Interface Controller
      lo_alv_if = wd_this->wd_cpifc_alv( ).
    configure ALV
      lo_alv_config = lo_alv_if->get_model( ).
      lo_column_settings ?= lo_alv_config.
      lo_column = lo_column_settings->get_column( 'IMAGE' ).
      CREATE OBJECT lo_link_to_action.
    fix settings for test purpose (how must I change it to get the information from the context node??)
      lo_link_to_action->set_image_height( '50px' ).
      lo_link_to_action->set_image_width( '50px' ).
      lo_link_to_action->set_image_source( 'ICE Flottenportal.jpg' ).
      lo_column->set_cell_editor( lo_link_to_action ).
    ENDMETHOD.
    Thanx a lot in advance for any help!!

    Thanks a lot for your helpful advice.
    I now found that method cl_wdr_utilities=>get_mime_path is the best way to get the path.
    But one question is still open:
    How can I retrieve my image source from the context? Do I have to read the context and then write it to the image_source attribute? Or ist there a more elegant solution?
    Thank you for any help!

  • JTable column size

    Hi,
    I have a few question.
    I'm programming by using Sun One studio 4 up 1 CE.
    I want to use the JTable of 2 column and make each columns diffrent size.
    On that IDE shoud I do to change the column size?
    And This is Off Topic. But I 'd like to ask you.
    I use the CE version of studio. Is it OK for me to provide the product for commerce?

    This section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Tables shows how to change column sizes.

Maybe you are looking for

  • Issue with Variable Substitution

    Hi, We have a scenario where we need to use the data from Payload for further processcing of the messeges.The payload looks like the one given below. <?xml version="1.0" encoding="utf-8" ?> - <ns1:MT_NOTIFICATION xmlns:ns1="http://WM_ERRHAND"   xmlns

  • HP Pavilion All-in-One MS225 Desktop PC

    I have a MS225 pavilion, which have a 320GB seagate product and i replace the hard disk 500gb seagate product, it has being working fine but now the hard drive is always fail, i have to keep on booting before it will display the windows7, but when i

  • JCORBA Clients created using JDeveloper not running

    Hi! This is about a problem that I'm facing creating and running JCORBA clients on JDeveloper 1.1. I followed the example provided in the documentation for JCORBA applications provided in the site www.olab.com. 1. The server object compiles just fine

  • CC&B Integeration with BI Publisher(OBIEE 11g)

    Hello Friends, we are using BI Publisher coming with OBIEE 11g, But in ccb installation document consist support for bi publisher 10g , can any one pls explain how we can configure CC&B with BI publisher coming with OBIEE 11g.Any documentation availa

  • Debug mode for forms 9.0.4.0.19

    Hello there, i have been trying to run the form in debug mode.I inserted a break point at "exit_form". how do i run the form and see results. I tried clicking on "debug->debug_windows" and see results but could not find anything. Please help me. than