Table view column rendering

Hello -
I am using <htmlb:tableViewColumn> in <htmlb:tableView>  to specify  titles and columnName of the internal table.
Probelm i am getting here is :
One of the column type is material which is type of domain matnr ( character type ) . My leading zero's in material not getting rendered.
At the same time,another quantity field type NUMC getting leading zeros automatically.
I want to have leading zeros as it is in material and remove leading zeros in quantity field. any ideas?
Ex:Matnr(Char):  00613994560285 is rendering as 613994560285
and quantity(NUMC)  - 1 rendering as 000001.
i want to render as it is .
Thanks
Hari

hello,
SAP internally interpret and match the type mentioned in domain of the field...
so for matnr it gets type C
and for quantity gets type P with /  without decimal type....
solution of problem:
build one customize DDIC structure with type N for matnr and suitable one for quantity
create one table type with that structure...
use that table type to build an internal table to get data displayed in table view...
Thanks
Krish

Similar Messages

  • Calling a Breadcrumb image inside a Table view column

    Hi
    I want a sample code to call any bread crumb related image inside a table view column.
    Please help with a code snippet.

    I mean that, inside the iterator class of the tableView, write this code in the RENDER_CELL_START method.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'ICON'.
    p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(       id        = p_cell_id                              src      = '@3J@'  ).
        ENDCASE.
    Inside the method, GET_COLUMN_DEFINITIONS you need to append a column for icon, see the code below:
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-COLUMNNAME = 'ICON'.
        <def>-TITLE      = 'Display Icon'.
    For more info you can refer to weblog on HTMLB TableView Iterator by Brian.
    Hope I am clear.
    Regards,
    Ravikiran.C

  • Table view column cell Focusing while editing.

    I have a table view with single column. I have defined custom cell factory for this column. When the table renders, a text value is shown for each cell in that column. When the user start editing the cells , then the contents of the cell changes and it shows 2 buttons, few check boxes and few radio buttons. Once the user selects his choice and clicks on a button inside the cell, the cell's editing is completed and cell's content is replaced with a plain text field.
    Now while editing if the user clicks on any other cell, the current editing cell's cancel method is called and text field is show. However, if the user clicks mouse outside the table, the cell is still in editing state.
    1) how to call the cancel editing method automatically here.
    2) Also, if we try to associate with focus property, how to do it. i.e. on which component should I associate focused property since the cell now is replaced with a bunch of components.
    3) If the user tries to use up or down arrow, then how to stop or start editing on the next cells.
    Thanks.

    Have you assigned an action to the CheckBox.onSelect event? If not, there is no server roundtrip triggered and the visibility is not updated.
    I would create two context attributes "ColumnsVisible" (boolean) and calculated attribute "ColumnsVisibility" (Visibility), assign an empty action to the CheckBox.onSelect event, bind CheckBox.checked to "ColumnsVisible", TableColumn.visible to "ColumnsVisibility" and implement the calc. attribute getter as
    WDVisibility getColumnsVisibility(...)
      return element.getVisible() ? WDVisibility.VISIBLE : WDVisibility.NONE;
    Armin

  • Table view column headings

    Hello All,
           I populated an internal table and passed it to the table view.
    1, But here since I was not getting the Heading of each
       column properly i used TableviewColumn attribute of
       htmlb and manually gave the title for each column.
    2, Now I'm able to get the proper headings for each of my
       column.
    3, But I'm not getting the sort functionality for any of
       the columns.
       But,this functionality came before i used the
       TableviewColumn attribute.
      Can anyone help me in getting the <b>SORT</b>
      functionality along with my <b>Column Headings</b>.
    Regards,
    Deepu.K

    just for managing column definition you dont need to use iterator, you can use the following method.
    page attribute:
    col_control_tab     TYPE     TABLEVIEWCONTROLTAB
    col_wa     TYPE     TABLEVIEWCONTROL
       <%
      clear col_wa .
      move: 'EMP_NUMBER' to col_wa-columnname ,
      'Employee Number' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment ,
      'X' to col_wa-edit .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'EMP_NAME' to col_wa-columnname ,
      'Employee Name' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'COSTCTR' to col_wa-columnname ,
      'Cost Center' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      clear col_wa .
      move: 'CCTR_DESC' to col_wa-columnname ,
      'Description' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
      clear col_wa .
      move: 'LOC' to col_wa-columnname ,
      'Location' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment .
      append col_wa to col_control_tab .
          %>
          <htmlb:tableView id                  = "tv1"
                           allRowsEditable     = "TRUE"
                           design              = "STANDARD"
                          <b> columnDefinitions   = "<%= col_control_tab %>"</b>                       selectionMode       = "NONE"
                           table               = "<%= emp_tab %>"
                           width               = "100%"
                           columnHeaderVisible = "true" />
    Regards
    Raja

  • Check box in a table view column

    Hi,
    I want to have a check box in a table (htmlb for java) for one column. In the table header when checked should automatically check all the check boxes in that column.
    Also let me know how to read the column if it is checked or not.
    Promise to reward you with points. Thanking u in advance.
    Subu.

    Hi ,
    just add the following code in your jsp page---
    for (int i = 1; i <= no_of_rows ; i++){
         for (int j = 1; j <= no_of_columns ; j++){
              if(i%2!=0){
    mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL2);
    else{
         mytableView.setStyleForCell(i , j, TableCellStyle.GROUP_LEVEL3);     
    as it is obvious,this code is to set different colors in alternative rows.
    myTableView is the id of TableView.
    Refer this link for different colors...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/26/f79241e9129f09e10000000a155106/frameset.htm---
    Hope this helps.
    Regards,
    Swarna
    Message was edited by: SwarnaDeepika

  • Showing Icons in the table view column

    I am using a tableview.
    In that tableview first column, i want to display the status as icon_green_light, icon_red_light like that as an icon.
    I am having these status values in my table...
    when i am assigning that itab to this tableview it is showing the text icon_green_light instead of showing the icon...
    please help me.

    check out this weblog
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator

  • Sorting table view columns

    Hi ,
    In my application i want to sort specific tableview columns.When i am keeping Sort="server" .Now the hand point showing sort on every column.I wanted to restrict this to specific column.If you have information can you give how exactly sort option will work when sort by server and sort by application.
    Any weblogs available on sorting of tableview columns.
    Regards
    Usman

    Hi Usman,
    you can do this either with a tableview iterator or with the extension htmlb:tableviewcolumn.
    With the iterator you can change the behaviour of your columns in the method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. The attribute P_COLUMN_DEFINITIONS is of type TABLEVIEWCONTROLTAB. With this attribute you can check "SORT" for a special column.
    With the extension htmlb:tableviewcolumn you can use the attribute SORT.
    Hoping this helps.
    Regards,
    Rainer

  • How to not display the column header in the table view?

    I do not want to display the column header in the table view, how can I achieve it?

    If you're using JavaFX 8 you can use the following in an external style sheet:
    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    If you're using JavaFX 2.2, the -fx-pref-height attribute is not available in css, so I think you have to resort to a lookup:
    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    As always, I feel obliged to point out that I don't really like lookups. Sometimes they seem to be the only way, though.

  • How to color a table view header's text via css

    I have managed to change font-name, background and text alignment of my table view header, but the text-fill line is just ignored! What's the correct way to do this?
    Example:
    .table-view .column-header, .table-view .filler {
    -fx-text-fill: white;
    -fx-font-family: "Helvetica";
    -fx-font-size: 10px;
    -fx-font-weight: bold;
    -fx-size: 25;
    -fx-border-style: solid;
    -fx-border-insets: 0 1 1 0, 0 0 0 0;
    -fx-border-width: 0.083333em, 0.083333em;
    I also added:
    .table-view.column-header.label{
         -fx-text-fill: white;
    Wich was recommended on a site, but didn't work either..

    I think you need
    .table-view .column-header .label{
      -fx-text-fill: white;
    }(with spaces between the class selectors).

  • Modify a Table View Header

    I need to modify the header of a tableview and I've tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
    }However, I can not edit any table header but only the headers of each column.
    Sorry for the English and grammatical errors. I am Spanish speaking
    I put an image to make it more clear
    http://img823.imageshack.us/img823/49/tableexample.png
    Edited by: biochemistry43 on 30-oct-2012 13:17

    It is there in the CSS documentation, though it's not really very easy to pick out. See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview and look at the section called "Substructure".
    I'm not claiming that I get everything I need to know from the CSS docs, though. I often need to look at the default stylesheet, caspian.css, which you can extract from the jfxrt.jar file (it's at com/sun/javafx/scene/control/skin/caspian/caspian.css).
    Edited by: James_D on Nov 5, 2012 6:10 AM (fixed path for caspian.css)

  • Table css column-header text color not working

    When setting
    -fx-text-fill: red;
    in a css table, it does not change the header to tex to red. Is there another value? .table-view .column-header {                                                                                                                                                                                                                                                                                                                   

    You have to override the following from the caspian.css:
    .table-view .column-header  {
        -fx-text-fill: -fx-selection-bar-text;
        /* TODO: for some reason, this doesn't scale. */
        -fx-font-size: 1.083333em; /* 13pt - 1 more than the default font */
        -fx-size: 25;
        -fx-border-style: solid;
        -fx-border-color:
              Inner border: we have different colours along the top, right, bottom and left.
              Refer to RT-12298 for the spec.
            derive(-fx-base, 80%)
            linear-gradient(to bottom, derive(-fx-base,80%) 20%, derive(-fx-base,-10%) 90%)
            derive(-fx-base, 10%)
            linear-gradient(to bottom, derive(-fx-base,80%) 20%, derive(-fx-base,-10%) 90%),
            /* Outer border: */
            transparent -fx-table-header-border-color -fx-table-header-border-color transparent;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header-background {
        -fx-background-color: -fx-body-color;
        -fx-padding: 0;
    }

  • Dynamically Hiding Column in a Table View in VC Model

    How to dynamacally hide the columns in a table view in a VC model. Through the expression in Control Property, Form element/field or table view as a whole can be made hidden, however, the individual column can not seem to be hidden.
    I am using VC server version 700.8.0.1.
    Any help would be much appreciated.
    Kind Regards
    Sanjoy

    In this scenario, if the source is SAP BI, you can use the webapi commands. If not, you would have to have 2 separate tables in different layers and you can show and hide those layers or UI elements...

  • BSP: How to create check box in a column of a Table View

    Hi All,
    I have a table view in Web IC scenario. my requirement is to display check box in one of the column of the table view.. so that i can select multiple lines from the table and do some calculations!.
    Anybody have any hint/clue
    Thanks in advance,
    sudeep v d.

    Hi,
    This can be achieved by using a Table iterator.
    Please check the standard examples for this.
    Thanks,
    Rashmi.

  • Lock rows and columns header in a table view report. It is possible?

    hi,
    I have a Dashboard that displays a report in "Table View" with many rows and columns.
    Is it possible to set a lock on the rows and columns like Excel?
    This would have blocked such headers that contain attributes and measures and to browse the report (eg with a scroll bar) had always viewed the headers.
    Can you help me?
    Thanks

    hi,
    please go through this discussion
    Re: SCROLL BAR to FREZZ HEADERS
    thanks,
    saichand.v

  • Adding up entries of 2 different columns of a table in a single view column

    Hi All,
             I have a requirement wherein I have to add up the entries of 2 different columns of 2 different database tables and show it in one column of a View.
    Eg. Table A has column A and Table B has column B. I create a view C with column C.
    Now Col C = Col A + Col B
    Can anyone please let me know how this view can be created?
    Thanks,
    Momdipa

    Hi Momdipa,
    ABAP Table View does not support dynamic arithmetic operations. So, you can't achieve this business logic in the view. There are no operators in the view which can help you to do this.
    If you need this functionality, you need to create a ABAP Report to calculate the sum on the execution of the Report. And then you can update the View based on your own business logic.
    Hope this helps.
    Thanks,
    Samantak.

Maybe you are looking for