HTMLB TableView Iterator & Edit columns, cells

Hi friends,
I am getting errors when , I tried to edit the columns, & Cells of  HTMLB TableView by using Iterator.Actually, I got the whole edit buttons and when I edit the values of particular column & cell fileds, it is not saving the values, instead it is giving same old values. The code I used is as follows.
<u><b>To Edit the  columns,</b></u>
method
IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.
  APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
<def>-COLUMNNAME = 'STUDENTID'.<def>-EDIT = 'X'.
endmethod.
<u><b>To Edit the  cells,</b></u>
RENDER_CELL_START Method:
method
IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
CASE p_column_key.
WHEN 'ICON'.
WHEN 'STUDENTID'.
       IF p_edit_mode IS NOT INITIAL.
ENDIF.
WHEN 'SDATE'.
       IF p_edit_mode IS NOT INITIAL.
ENDIF.
ENDCASE.
endmethod.
<u><b>To Edit the SDATE cells,</b></u>
WHEN 'SDATE'.
  IF p_edit_mode IS NOT INITIAL.
DATA: date TYPE STRING.
date = m_row_ref->SDATE.
p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                      id        = p_cell_id
                       value     = date
                       type      = 'DATE'
                         showHelp  = 'TRUE'
                         cellValue = 'TRUE' ).
                           ENDIF.
Why the either column or cell is not saving the new values, when I edit them? where it went wrong? please mail me in this regard.
regards
CSM Reddy

Hi REDDY CSM 
To learn coding these Methods.
You need to learn everything from scratch about MVC.
To learn functionalities of Methods in Controller and how to use them,its Better,if you start with some tutorial(Little application) on MVC.
Here is link,Just follow this,You will get some Exposure to these methods.
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
Rest keep posting whenever you face and Problem..
Happy Coding..!!
Vijay Raheja

Similar Messages

  • HTMLB TableView Iterator

    Hello,
    I try the weblog OF Brian McKellar corresponding to the HTMLB TableView Iterator and as like certain people, the Dropdownlist of the column 'CURRENCY' is empty. This is cetainely due of how in the constructor the table is declared. So, for those which succeeded in replir the Dropdownlist of the column 'CURRENCY' can they give me the code of your constructor.
    Thanks a lot.
    Farid BERRA

    Hello Ariel,
    Thanks to your councils, i succeeded to get data in the DROPDOWNLISTBOX.
    In the method RENDER_CELL_START, for CURRENCY, i have:
        WHEN 'CURRENCY'.
          IF P_EDIT_MODE IS NOT INITIAL.
            DATA: DROP_DOWN TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
            DROP_DOWN = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
                                ID                = P_CELL_ID
                                SELECTION         = M_ROW_REF->CURRENCY
                              TABLE             = ME->M_CURRENCIES_REF
                                NAMEOFKEYCOLUMN   = 'NAME'
                                NAMEOFVALUECOLUMN = 'VALUE' ).
            GET REFERENCE OF TT_CURR INTO DROP_DOWN->TABLE.
            P_REPLACEMENT_BEE = DROP_DOWN.
          ENDIF.
    And in the constructor:
      DATA: LS_TCURT TYPE TCURT,
            WA_LINE TYPE LINE OF TIHTTPNVP.
      SELECT WAERS LTEXT
             INTO (LS_TCURT-WAERS, LS_TCURT-LTEXT)
             FROM TCURT.
        CLEAR WA_LINE.
        MOVE LS_TCURT-LTEXT TO WA_LINE-NAME.
        MOVE LS_TCURT-WAERS TO WA_LINE-VALUE.
        APPEND WA_LINE TO TT_CURR.
      ENDSELECT.
    And finally, I declared in the Instance Attribut:
    TT_CURR TYPE REF TO TIHTTPNVP.

  • Radiobuttons in tableView/iterator environment

    Hi,
    I'd like to build and display a matrix of radiobuttons with a name/title for each row and also for each column. Every row of the matrix should form a radiobutton group, i.e. per line one and only one radiobutton should be selectable.
    Both dimensions of the matrix are dynamic so I thought I could use a <htmlb:tableView> with a column-definitions table defining the number and names of the columns, the 'actual' table containing the names of the rows and an iterator which just renders these names in the first (i.e. 'zeroth'-) column and radiobuttons in all other columns.
    The code in <i>if_htmlb_tableview_iterator~render_cell_start</i> pretty much contains only the lines
    rowindex_as_id  = p_row_index.
    colindex_as_key = p_column_index.
    p_replacement_bee = cl_htmlb_radiobutton=>factory( id  = rowindex_as_id key = colindex_as_key ).
    Unfortunately the radiobuttons don't get rendered, the resulting page contains the desired table with the row and column titles but empty cells. The html sources contains the comments
    <!-- *** Unidentified control NOT rendered *** -->
    Now, this might be due to a missing radiobutton group that would contain the radionbuttons of one line.
    I don't understand however how a <i>cl_htmlb_radiobutton</i> object gets to know its radiobutton group container. Neither the factory used above nor the constructor nor any other method allows to set a reference to a radiobutton group object. It does contain an attribute <i>radiobuttongroup</i> though, but this is protected!?!
    Does anybody have an idea/experience with this?
    Regards,
    Sebastian

    Hallo Sebastian,
    First let me address your questions concerning the "parent" of a tag. In principle it is only possible to process a tag in context of a BSP page. In this context "process" means either writing the tag on a BSP page, or dynamically processing the tag. When the tag is processed, it is placed on a stack. The opening sequence puts the tag on the stack, the close sequence removes the tag from the stack. Each tag can query the stack of previous tags to find a specific type or parent. Typical code would be:
      DATA: rbg TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
      rbg ?= m_page_context->GET_CLASS_NAMED_PARENT(
              class_name = 'CL_HTMLB_RADIOBUTTONGROUP' ).
    <b><u>OR</b></u>
      DATA: rbg TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
      rbg ?= m_page_context->GET_ELEMENT_NAMED_PARENT(
              extension = 'HTMLB'
              name = 'RADIOBUTTONGROUP' ).
    <b><u>OR</b></u>
      DATA: rbg TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
      rbg ?= m_page_context->GET_DIRECT_PARENT( ).
    Next aspect is the error message "Unidentified control NOT rendered". What this means is that deep down in the code we get a reference onto a control which we can not render anymore. It is suddenly not known. Hmmm... let us dig.
    What I then checked is with the use of the <htmlb:radioButton>. This control insist that it can only be used inside a <htmlb:radioButtonGroup>. Which actually makes sense. So if no group, then raise error.
    Which brings us to your message above. While deep in the rendering, these types of unknown problems are caught and dropped. This is when you get this generic message. It is actually the exception about the missing radioButtonGroup on the stack.
    What we usually do, is place the <htmlb:radioButtonGroup> around the <htmlb:tableView>. But this only works when you are using one column of radioButtons. Which you are not.
    Current feeling would be to look at some executive programming: consider to use a <phtmlb:matrix> and just roll your own. For an idea of where the journey can go, look at the examples of <phtmlb:formLayout>.
    brian

  • Passing Parameters to tableview iterator class

    Hi all,
    I have a tableview with 2 fields say A and B.
    When i click any of the field(row) i want to open a new page with the parameters A and B.
    I have used iterator and able to get the value for either  field-A or field-B..How to get both field values in
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
    This my code,
    *Oncreate*
    create object tv_iterator type ycl_salary_review.
    method if_htmlb_tableview_iterator~render_cell_start .
        data: wf_text type string,
            wf_url type string,
            test type char1.
      data: htmlstring type string ,
      rono type string .
      field-symbols: <fs> type any ,
                       <l_a> type any,
                     <l_b> type any.
      assign p_row_data_ref->* to <fs>.
      case p_column_key.
        when 'A'.
          assign component p_column_key of structure <fs> to <l_a>.
          wf_text = <l_a> .
        concatenate 'page2.htm?field_a=' wf_text into
          wf_url.
          call method cl_htmlb_link=>factory
            exporting
              id        = p_cell_id
              reference = wf_url
              target    = '_self'
              text      = wf_text
            receiving
              element   = p_replacement_bee.
      endcase.
    Rgds,
    Venkonk

    Hi Ven,
    pls Go thro this step-by-step creation of Tableview with iterator...
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
    Look at the Standard BSP Application BSP_MODEL --> Page Name:- table.htm
    *pls assign points,if link is useful*
    Regards
    CSM reddy

  • HTMLB TableView: Edit first Line

    Hi,
    I have implemented an HTMLB TableView with the attribute selection mode 'singleselect'.
    The users can mark one row to edit. This works so far.
    But as the users have to maintain at least one row, the first row should initially be editable <b>without mark it</b> and raising an event.
    Thanks in advance

    set the selectedRowIndex = 0 or 1 to whatever number of the row you would like initially checked in your OnCreate or OnInitialization Event Handler with selectedRowIndex being defined in your Page Attributes and then assigned to the tableView.

  • Freeze the column headers for htmlb:tableView using CSS

    Hi
    I am using a <htmlb:tableView > in BSP to display data.
    i want to freeze the column headers so that they dont scroll when table data is scrolled.
    Is it possible ?
    Regards
    Rajendra

    Hi Rajendra,
    Have a look at the links below:
    [Freeze tableview header-I|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3088768]
    [Freeze tableview header-II|Freeze table header in HTMLB Tableview]
    [Freeze Columns of tableview|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3517748]
    Search the forum and you will find information on this.
    Regards,
    Anubhav

  • 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

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • Bsp table with editable columns

    Hi,
    I want to create a table with some columns and include check box.
    Is it possible?
    I want to do this
    Table :
    Date   Time    Checkbox   Checkbox
    Also how can i make the columns editable ?
    Thank you

    hello,
    The basic idea would be use ITERATOR class reference in your 'Tavleview' HTMLB element
    Iterator class should user interface 'IF_HTMLB_TABLEVIEW_ITERATOR', here you can modify column properties (GET_COLUMN_DEFINITIONS method) and cell properties (RENDER_CELL_START)
    For your need:
    RENDER_CELL_START method, example coding would be:
    CASE p_column_key.
         WHEN 'Column name'.
        p_replacement_bee = cl_htmlb_checkbox=>factory(
                            id       = p_cell_id
                            _checked = p_cell_binding
                            disabled = 'X' ).
      ENDCASE.
    Thanks

  • TableView Iterator in WebDynpro as in BSP

    Hi all,
    i'm planning to move from BSP to WebDynpro ABAP and have a question:
    Does WD ABAP provide the same kind of <htmlb:tableView> as BSP? Especially, does it support the concept of an tableview iterator?
    Thx & Regards,
    Daniel

    Yes you'll find everything.
    You'll find also the ALV extension of a table.
    I was familiar with iterator and I like it so much; in WDA you can reach the same result but in a different way.
    Basically you have to prepare, in advance, all the data in the table rows and then in the table configuration you'll describe the rules for each column (even with variants per row).
    You have to study the Table UI object with table cell variant and then ALV features.
    Sergio

  • Issues in TableView Iterator

    Hi,
       We have two tableviews on a page and we created two different table view iterator classes for those two table views to make some columns of those table views editable. I am able to get the editable columns in the first table view and some how the second table view is not enabling the editable columns. Can anybody know why this problem is occuring? Is there any limitation on using multiple iterators in a single page. Thanks in advance.

    Hi,
         I created two Iterator classes with column definitions and other methods.
    In the page of BSP application, in onCreate event I am using the following code.
    <b>CREATE OBJECT lv_iterator TYPE Z_MM_ITERATOR1.
    CREATE OBJECT lv_iterator1 TYPE Z_MM_ITERATOR2.</b>
    In the Layout....
    <b>      <htmlb:tableView id              = "LVMVOL"
                           selectionMode   = "none"
                           filter          = "server"
                           iterator        = "<%=lv_iterator%>"
                           table           = "<%= IT_TABLE1 %>"
                           >
          </htmlb:tableView>
          <BR>
          <BR>
          <htmlb:tableView id              = "LVMVOL1"
                           selectionMode   = "none"
                           filter          = "server"
                           iterator        = "<%=LV_iterator1 %>"
                           table           = "<%= IT_TABLE2 %>"
                            >
          </htmlb:tableView></b>
    In the page attributes...
    <b>lv_iterator TYPE REF TO IF_HTMLB_TABLEVIEW_ITERATOR
    lv_iterator1  TYPE REF TO IF_HTMLB_TABLEVIEW_ITERATOR</b>

  • Regarding HTMLB TableView Celclick

    Hi All,
    I have an HTMLB tebleview where the first column is a LINK .
    When i click this cell (link) , i have following values n the method DO_HANDLE_EVENT of my class :
    htmlb_event->name = 'tableView'.
    table_event->event_type = 'cellClick'.
    I need to capture the DATA of the ROW for which the CELL was clicked in an internal table .
    The HTMLB TableView in the looks like:
    <htmlb:tableView id              = "list"
                           emptyTableText  = "<%= otr(BBP_SUS_UI/LIST_ORDER_NO_ENTRIES_FOUND) %>"
                           selectionMode   = "MULTISELECT"
                           sort            = "SERVER"
                           onHeaderClick   = "onmyHeaderClick"
                           onNavigate      = "onMyNavigate"
                           onRowSelection  = "onMyRowSelection"
                           visibleRowCount = "<%= lepp %>"
                           visibleFirstRow = "<%= iv_list_nav_index %>"
                           width           = "100%"
                           table           = "//model/order_list"
                           headerVisible   = "<%= IV_HEADER_VISIBLE %>"
                           headerText      = "<%= status %>"
                           iterator        = "<%= io_iterator %>" />
    Thanks,
    Anubhav.

    Hi Anu,
    actually you haven't tried my code. You've changed it.
    You have moved the double-quote (") signs to different places and added an asterix (*).
    In ABAP a asterix (*) in the first character of a line comments out the entire line. A double-quote (") sign comments out the remainder of the line it appears in.
    The comments I placed in the code where to show you the names of the attributes that hold the values you are looking for.
    So in other words the attribute
    tableview_event->selectedrowindex
    contains the index of the selected row. You can then use this attribute in further ABAP statements.
    You say that
    the issue is retriving the value of ROW_INDEX
    - well you do not need to retrieve it. It is already in the attribute tableview_event->selectedrowindex.
    I also suggest you use the debugger to look at the other attributes that are visible in this object.
    Cheers
    Graham Robbo

  • No Margin if I use TableView Iterator

    I am using a htmlb:TableView with Iterator.
    I noticed that the cell-margin disappears if I a htmlb:textView in the iterator.
    For example, if I have two columns, and in only the second column I show a textview as a replacement bee, the second column will have no cell-margin while the first one has.
    METHOD if_htmlb_tableview_iterator~render_cell_start .
      DATA lr_text  TYPE REF TO cl_htmlb_textview.
      FIELD-SYMBOLS <fs_row>  LIKE LINE OF ##mytable##.
        CASE p_column_key.
          WHEN 'MYCOLUMN2'.
            CREATE OBJECT lr_text.
            lr_text->id       = p_cell_id.
            lr_text->wrapping = cl_bdv_co=>c_true.
            lr_text->text     = <fs_row>-mycolumn2.
            p_replacement_bee = lr_text.
        ENDCASE.
    ENDMETHOD.
    Is there anything I can do about it?

    p_class is depreciated as on design 2003. check this thread for more on this.
    Note 816352: Rendering Differences between DESIGN 2002 and 2003.
    instead what you an do is place a raw html table with cellpadding and one cell containing your text into this cell.
    DATA: rad_gp TYPE REF TO cl_bsp_bee_table.
          CREATE OBJECT rad_gp.
          rad_gp->add_html( html = '<table cellpadding="2" ...' ).
          p_replacement_bee = rad_gp.
    Regards
    Raja

  • HTMLB:TableView

    Hi,
    I have used the table view in my BSP application and use the concept of iterator class inherited from  interface 'IF_HTMLB_TABLEVIEW_ITERATOR' to manipulate the column of each row
    ABAP CODE:
    <%data: LV_ITERATOR  type ref to if_htmlb_tableview_iterator.
      create object LV_ITERATOR  type zcl_test
             exporting ir_context_node = db_controller
                       data_tab = =<LT_TABLE1>
    %>
    BSP CODE:
    <htmlb:tableView
                             fillUpEmptyRows = "true"
                             id              = "ResultTable"
                             onNavigate      = "navigate"
                             selectionMode   = "SINGLESELECT"
                             table           = "<%=<LT_TABLE1>%>"
                             visibleFirstRow = "1"
                             visibleRowCount = "8"
                             width           = "100%"
                             filter = "server"
                             sort = "server"
                             iterator        = "<%=LV_ITERATOR %>"
                             keyColumn = "template_id"
                             design = "alternating"
    <%--                         columnFilters="<%=filters%>"--%>
                             tabIndexCell = "FALSE"
                    selectedRowIndexTable = "<%=LT_SELECTEDROWINDEXTABLE%>"
                             >
    and implemented class 'zcl_test' , for some reason something strange is happening , the BSP page will be something like
    at the top there are buttons and below this is the TableView that display the content store in internal table 'LT_TABLE1'
    now the table contain 10 records,the 1-8 records are displayed on page1 and next 2 records are displayed on page2.
    So the issue is , if i naviagte to page2 and press any of the button on top of table view ,it redirect me to page1(display 1-8 records) and don;t stay back on 2'nd page.
    Please let me know how i can achieve this of staying on the same page

    Hi All,
    Sorry for the delay,explanation provided is amazing and may help other searching for the same issue but unfortunately selected row travel back to page index1
    and i don;t understand why the selected record is the first record in the internal table of iterator class and that result in this record to appear on page index1
    any how i have resolve this by pointing always to page index1.
    Code that can be useful:
    View:
    <htmlb:tableView fillUpEmptyRows = "true"
                     id              = "tvTempl"
                     onNavigate      = "navigate"
                     selectionMode   = "SINGLESELECT"
                     table           = "xyz"
                     visibleFirstRow = "<%= lv_first_rowindex %>"
                     selectedRowIndex = "<%= lv_selected %>"
                     visibleRowCount = "8"
                     width           = "100%"
                     filter          = "server"
                     sort            = "server"
                     iterator        = "<%= lr_iterator %>"
                     keyColumn       = "template_id"
                     design          = "alternating"
                     tabIndexCell    = "FALSE" />
    code in do_handle_event  or in do_request:
    DATA: lv_row_index TYPE i,
                  lv_page_index TYPE i,
                  lv_mod TYPE i,
                 lr_html_table_view TYPE REF TO cl_htmlb_event_tableview.
            lr_cl_descriptor = cl_abap_refdescr=>describe_by_object_ref( htmlb_event ).
            IF lr_cl_descriptor->absolute_name CS 'CL_HTMLB_EVENT_TABLEVIEW'.
              lr_html_table_view ?= htmlb_event.                                                                            // parameter: importing in method   HTMLB_EVENT  Type Ref To   CL_HTMLB_EVENT
              CASE lr_html_table_view->navigationtype.
                WHEN 'pageUp'.
                  MOVE mv_first_rowindex TO lv_row_index.
                  lv_row_index = lv_row_index - lr_html_table_view->visiblerowcount.
                  MOVE lv_row_index TO mv_first_rowindex.
                  WHEN'pageDown'.
                  MOVE mv_first_rowindex TO lv_row_index.
                  lv_row_index = lv_row_index + lr_html_table_view->visiblerowcount.
                  MOVE lv_row_index TO mv_first_rowindex.
                  WHEN'top'.
                  MOVE mv_first_rowindex TO lv_row_index.
                  lv_row_index = 1.
                  MOVE lv_row_index TO mv_first_rowindex.
                WHEN 'bottom'.
                  MOVE mv_first_rowindex TO lv_row_index.
                  lv_mod =  lr_html_table_view->rowcount MOD lr_html_table_view->visiblerowcount.
                  lv_row_index = lr_html_table_view->rowcount - lv_mod + 1 .
                  MOVE lv_row_index TO mv_first_rowindex.
                WHEN 'Index'.
                  READ TABLE mt_last_formfields INTO ls_formfields WITH KEY name = 'notificationstv_pager_index'.
                  IF ls_formfields IS NOT INITIAL.
                    MOVE ls_formfields-value TO lv_page_index.
                    lv_row_index = 1.
                    IF lv_page_index > 1.
                      lv_page_index = lv_page_index - 1.
                      DO lv_page_index TIMES.
                        lv_row_index = lv_row_index + lr_html_table_view->visiblerowcount.
                      ENDDO.
                    ENDIF.
                  ENDIF.
                  MOVE lv_row_index TO mv_first_rowindex.
              ENDCASE.
            ENDIF.

  • Attributes in tableview iterator

    how to retrive my inputField value in tableview iterator ?
    I have a page with inputField : eno
                    & tableview (and onclicking the cellvalue in the column it goes to other page)
    <i>
    <b> here i want to get the value of my inpufield </b>
    concatenate 'preview.htm?ref_no=' wf_text into wf_url.
          call method cl_htmlb_link=>factory
            exporting
              id        = p_cell_id
              reference = wf_url
              target    = '_self'
              text      = wf_text
            receiving
              element   = p_replacement_bee.
    </i>
    Pts Assured.
    Thanks,
    JBP.
    I have added the field also in the row iterator and now able to get its value.
    Message was edited by: P24101990

    Hi Mark,
    Thanks for your reply. I tried that in DO_INIT and in DO_REQUEST as well. I started of this application well with the values selecting from Dropdown and then rendering the table columns. But now I have commented everything and just trying to render one column of the table....
    I have one concern.
    I have declared like this
    tv_iterator type ref to ZITERATOR.
    and in DO_INIT I have instantiated. Create Object tv_iterator.
    If you have any suggestions please let me know....
    Thanks

Maybe you are looking for