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

Similar Messages

  • Error when displaying amount field in HTMLB Tableview

    Hi all,
       I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
    Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
    Thanks and Regards ,
    Harikrishna .

    Hi Hari,
    But reference(currency) field of that amount field is in other table . I know it gives the error.
    It will not give any error , you can use the currency key field of other table or structure .
    Alternatively you can use  predifined type DEC instaed of CURR  .
    Regards,
    Anubhav

  • Grouping Key Rows In HTMLB Tableview BSP

    Hello Experts,
    I've a HTMLB Tableview in BSP Application. I need to group the key rows with same value into one.
    Current Layout
    KEY  VALUE 1    VALUE 2
    A       X                 Y
    A       X                 Y
    B       X                 Y
    B       X                 Y
    Required Layout
    KEY  VALUE 1    VALUE 2
    A       X                 Y
              X                 Y
    B       X                 Y
             X                 Y
    It's somewhat similar to grouping the key rows in ALV. Not sure how to achieve this in BSP.
    Please help....
    Regards,
    Satyajit
    PS: Posted this thread in BSP Forum earlier and haven't got any response yet. So reposting it in ABAP General for a quick response.

    Hi Satyajit Mohapatra,
    please refer to fixedColumns. Therefore check on your system:
    BSP: SBSPEXT_TABLE
    Page: TableViewFixedColumns.bsp
    There you can find the solution.
    Regards, Jonas

  • How open URL in an htmlb TableView ?

    Hi guys,
    Here is my problem:
    - I have in my BSP an HTMLB:TableView which display a table of Document Info Record.
    - In this table of DIRs, there is a column which contains an URL in order to open an original.
    ex of url :
    https://daplmdv.sylvania.com:10443/sap/bc/bsp/sap/CVAW_VIEW_DOCFILE/ViewDocFile.htm?pa_document_key=ZPI000000000000000000185255000FR&pa_file_id=4B5DB6C66C9B0094E1008000C61CAA2D&filename=C:\Copie de SSO on PLP.pdf
    - At the moment in htmlb:tableViewColumn, I use the property onCellClick which call a javascript function :
    window.open( "<%= application->url%>", target='_blank' , 'toolbar=no, menubar=no, resizable=yes, scrollbars=yes');
    - It works in IE6 but I tested it in IE7 and it doesn't work.
    My question :
    Is it possible to open directly the link through the tableView and without using javascript ?
    I tried the property linkClickTarget but it doesn't work
    Thanks for your help

    Hi Regis,
    If you need a new window to load the document contents, then you should use the Javascripts. Because only a javascript could openup a new window in a BSP applicaiton.
    But if you do not want to open up the document in a new window and want to load it by replacing the current page, then you could do it by navigating to another page which could render the document contents in this page.
    Hope it helps!
    Regards,
    Maheswaran

  • BSP htmlb:tableView id="TV_VBAK" table= "//select/I_VBAK"

    Hai Experts,
    I have a small doubt in bsp appllication,
    shall we write like...
    <htmlb:tableView id="TV_VBAK" table= "//SELECT/I_VBAK">
    I am using Class
    ZCL_CONTROLLER_SALES1
    in controller.
    thanks in advance...
    with regards
    babu

    hai
    than q for ur reply.
    point will be rewarded...
    with regards
    babu
    Edited by: babu rs on Mar 5, 2008 4:49 PM

  • HTMLB TableView in customer CI/CD layout

    Hello,
    i want to create a BSP with htmlb tableview, so
    i can simply use the given features (sorting, filter, ...) but the customer want to adapt hic CI/CD Colours Blue and Orange to the hole application.
    Is there a chance to use a own stylesheet instead of design2002 or design2003 or is it prossible to create a own design.
    I`ve searched this topic in forum, and gets only answers that mixing design and css is not good, and there is a way with EP6 - but we have no portal.
    Thanks for any help.
    Regards
    Marcus

    Hi Ulli and Marcus,
    I'm currently designing my own style (not in Portal, I'm using 6.20), and yes, it might not be straightforward customizing the design.
    But I started with following approach:
    After implementing the basic layout of my page (like header pictures and so on) I added the functional parts (htmlb elements, ...) and tried to change them one by one ... that's how I did it:
    - add a htmlb element to the layout
    - access the page via browser to get the generated html code
    - in this code just look for all the classes used for your htmlb elements
    - edit the .css file that gets included in the html header accordingly
    Important Points you have to be aware of:
    *) There might be styles used for your elements which are not shown in every html code (because element might be displayed differently from page to page). You can either call every possible page combination in order to get all the used classed (not recommended, you could still miss something), or have a closer look at the class names - the classes that belong to a certain element are named in a way you can tell which class belongs where.
    (like "urBdyStd" for the body-tag, "urbtn*" for buttons, ...)
    From the postfix after the element name part you can guess the detailed function of the class - with a little patience and looking at many different classes used in the html code you can figure out what to change for your style.
    *) Be careful which .css-file gets included when looking at the html code. There are css files for different browsers and versions, so if you want to make your application look the same way on all supported browsers (which you probably want), then don't forget to edit these files as well.
    *) Changing a css file and testing the results on the WAS is very complicated, so I recommend you create sample html files (which contain one htmlb element each for example), edit the css file and also test it locally, so you don't get caugt in importing a new file version just for changing that one nasty little style attribute that is wrong
    Ok, after writing all of this, I can see that it really is a bit of work ... but seeing how your application gets your personal touch is worth it (at least for me) ... and you don't have to change all of the styles, I found that some of the standard styles fit into my design quite good, so I didn't change them. (I copied the chrome design to start from)
    Cheers,
    Max
    P.S.: Would such a topic be worth a weblog?

  • 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

  • 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

  • Htmlb:tableView Recover the selected row

    Hi.
    How can I recover the selected row in a internal table, with the htmlb:tableView, in the onInputProcessing?
    Thanks very much!
    I'm using this sentence in the "layout":
    <!-- Visualizamos Línea de selección + tabla interna -->
        <htmlb:tableView id             = "myTableView"
                         visibleRowCount = "<%= c_ver_registros %>"
                         width                 = "<%= c_ancho_tabla %>"
                         selectionMode    = "SINGLESELECT"
                         table                  = "<%= T_TABLA %>" >
        </htmlb:tableView>
    null

    hi Marcos,
        While calling the Tableview in the layout get the selected row index in the attribute <b>selectedRowIndex = "<%= var_selectedindex %>"</b>   { where var_selectedindex should be defined as a pageattribute} the tableview definition should be like this..
    <htmlb:tableView id = "myTableView"
    visibleRowCount = "<%= c_ver_registros %>"
    width = "<%= c_ancho_tabla %>"
    selectionMode = "SINGLESELECT"
    <b>selectedRowIndex = "<%= var_selectedindex %>"</b>
    table = "<%= T_TABLA %>" >
    </htmlb:tableView>
    And in the <b>inputprocessing</b> ,
    Try this code..
    IF htmlb_event IS NOT INITIAL AND htmlb_event->if_htmlb_data~event_name = 'tableView' AND
         ( htmlb_event->if_htmlb_data~event_type = 'cellClick'   OR
           htmlb_event->if_htmlb_data~event_type = 'rowSelection' OR
           htmlb_event->if_htmlb_data~event_type = 'navigate' ) .
        DATA  tableview_event TYPE REF TO cl_htmlb_event_tableview.
        tableview_event ?= htmlb_event.
          IF lr_tableview_event->selectedrowindex IS NOT INITIAL .
               var_selectedindex  =  tableview_event->selectedrowindex.
        ENDIF.
      ENDIF.
    regards,
    Bhanu.

  • Htmlb:tableView and group building

    Hi,
    in abap alv-lists, it is possible to build groups like you can see in the following example:
    4711 12345 asdfaslöfkj
    4711 68686 asdfljsadflj
    4711 97777 salfjljfaksl
    and now in abap-alv
    4711 12345 asdfaslöfkj
         68686 asdfljsadflj
         97777 salfjljfaksl
    Is this possible with htmlb:tableView or something like this?
    Regards,
    Jens

    Yes you can make the first column to display data at the first appearance only as a Grouping. For this in the Iterator GET_Column_definition method set the FIXEDCOLUMN attribue of the column definition structure tableviewcontrol for which the grouping should apply(in your case first column).
    Code goes like this...
    data: ls_col_def  type tableviewcontrol.
      clear ls_col_def.
      move: '<FieldName>'    to ls_col_def-columnname,
            'Icon'          to ls_col_def-title,
            'X'             to ls_col_def-encode,
            'X'             to ls_col_def-FIXEDCOLUMN,
            '1%'            to ls_col_def-width.
      append ls_col_def to p_column_definitions.

  • Tree functionality in htmlb:tableView

    I heard that with the newest SPs, you can add tree functionality (hierarchies; expand/collapse) to a htmlb:tableView.
    Does anybody have a good example for this?
    Regards,
    Daniel

    This code works fine.
    data: lt_tree        type TVIEW2,
                lwa_tree       type TVIEWNODE2,
                ls_DESTINATION type string,
                ln_facture(10) type n.
          if sy-host          = 'MANSOLDEB02'.
    *       Dev
            ls_DESTINATION    = 'AMMDEX01'.
          else.
    *       Prod
            ls_DESTINATION    = 'MANPRX01'.
          endif.
          ln_facture = lwa_ligne-zfacture.
          CALL FUNCTION 'ZGET_TREE' destination ls_DESTINATION
            EXPORTING
              P_IN_FACTURE = ln_facture
              P_IN_TREEID  = p_cell_id
            IMPORTING
              PT_OUT_TREE  = lt_tree.
          GET REFERENCE OF lt_tree INTO lt_table.
          CALL METHOD CL_HTMLB_TREE=>FACTORY
            EXPORTING
    *                          HEIGHT           = '400'
                              ID               = lwa_ligne-zfacture
    *                         ID_POSTFIX       =
    *                         ONTREECLICK      =
    *                         RESTOREVIEWSTATE = 'TRUE'
                              SHOWTITLE        = 'FALSE'
                              TABLE2           = lt_table
    *                          TITLE            = lwa_ligne-zfacture
                              TOGGLE           = 'TRUE'
                              TOOLTIP          = 'Détail de la facture'
            RECEIVING
              ELEMENT          = lo_tree.
          CALL METHOD lo_tree->if_bsp_bee~render_to_string
            EXPORTING
              page_context = page_context
            RECEIVING
              result       = ls_texte.
          cellule_bee->add_html( level  = 1
                                 html   = ls_texte ).
          p_replacement_bee =  cellule_bee.
    Regards,
    Thierry Chiret

  • Sums in htmlb:tableView

    Hi Community,
    how to you guys usually display a line with sums under a htmlb:tableView.
    As far as I have understood this, I can do either one of the following two ways:
    1) I add a line to the internal table where I calculate the sums I need. I then have to make sure that this line will always be displayed at the bottom after sorting, filtering etc. and that the sums are re-calculated after filtering.
    2) I display a second htmlb:tableView underneath the first, which will have only one line containing the sums. By this, I have to make sure that the widths of the columns of both tableViews has to be equal (which is not that easy when you text in the table that is larger than the allowed width).
    Is there another way? What is the preferred way?
    Daniel

    you can also handle it thru iterator. but the easiest would be add another row to itab and handle the sorts and filter and positioning of the total row yourself.
    samle code for iterator.
    RENDER_CELL_START method.
    assuming you have 10 rows in the itab.
    IF p_row_index EQ 10 .
      DATA: icon_plane TYPE string.
            icon_plane = cl_bsp_mimes=>sap_icon( id = 'ICON_WS_PLANE' ).
            if_first = cl_htmlb_image=>factory( id = p_cell_id id_postfix = '_first' src = icon_plane onclick = 'image_click' ).
            CLEAR icon_plane .
            icon_plane = cl_bsp_mimes=>sap_icon( id = 'ICON_WS_PLANE' ).
            if_bus = cl_htmlb_image=>factory( id = p_cell_id id_postfix = '_bus' src = icon_plane onclick = 'image_click' ).
            CREATE OBJECT multi_bee.
            multi_bee->add( if_first ).
            multi_bee->add_html( html = '<div style="border-top-style: solid; border-top-width: 1px;  padding-top: 1px">' ).
            multi_bee->add( if_bus ).
            multi_bee->add_html( html = '</div> ' ).
            p_replacement_bee = multi_bee.
    in the above example if_bus is for holding the last row value and if_bus is for holding the total value .
    in the above example i just showed how you have have two rows in the last row and just rendered two images.
    Regards
    Raja

  • htmlb:tableView : (table) Attribute value is not a valid reference

    Hi All,
    In Table view i am getting the following error.
    The following error text was processed in the system:
    <htmlb:tableView>: (table) Attribute value is not a table
    My code in View is
    CREATE OBJECT  MODEL TYPE  ZCL_HREPAN_MODEL_MAIN.
    CREATE OBJECT tv_itr1 TYPE ZCL_HREPAN_MODEL_ITR_STATUS exporting model = model.
    %>
         <htmlb:tableView  id              = "reportsTable1"
                           headerVisible   = "true"
                           headerText      = "All PANs:"
                           footerVisible   = "true"
                           design = "alternating"
                           visibleRowCount = "20"
                           width           = "100%"
                           fillUpEmptyRows = "false"
                           columnWrapping  = "false"
                           columnWidth     = "200"
                           sort = "server"
                           selectionMode = "lineEdit"
                           iterator        = "<%=tv_itr1%>"
                           table           = "//MODEL/DATE_RANGE_PAN" >
          </htmlb:tableView>
    in above DATE_RANGE_PAN is table from model 'ZCL_HREPAN_MODEL_MAIN'
    Controller as below:  DO_REQUEST.
    if lr_event is bound and lr_event->server_event = 'allpans'.
      lo_model ?= get_model( 'model_id_status' ).
      lo_display_view->set_attribute( name = 'model' value = lo_model ).
      lo_display_view = create_view( view_name = 'allpans.htm').
      call_view( lo_display_view ).
      ENDIF.
    DO_INIT as below
    lo_model ?= create_model( class_name = 'ZCL_HREPAN_MODEL_MAIN'
                                model_id   = 'model_id_status').
    please help me how to solve this??
    REgards,
    Kishan

    I think DATE_RANGE_PAN is not table. Make sure its a table. If issue persist, post the data type declaration here.
    Raja

  • HTMLB: tableview filter problems

    Hi,
    We developed a BSP application in CRM Web_IC. Whenever user goes to this screen, it retrieves the results from SAP CRM table and lists the entries. We used htmlb:tableview with filter attribute set to 'SERVER'. The first row of the entry is used to filter the entries displayed based on wildcard search and redisplay the same.
    We noticed that all this handled by client side eventing (Java Script) and it works okay in our development and testing environment.
    But we got wierd results when it went for user testing. On some of the machines, the page looks refreshed but the list display does not change based on the search. We thought it might be caching problem so we tried with different IE settings, it looks okay for some time on one of the machines but the problem gets repeated after wards. The situation is we cannot afford intermittent problems.
    OS are win'2000 and XP and browser is IE 6 with sp1 and sp2. The problem is not consistent so none of the combinations actually suggested if the problem is related to one area.
    Has anyone experienced similar to above. Any ideas are welcome.
    Message was edited by: Raju Datla

    Thanks Rainer,
    Without making any changes, today majority of the users are did not encounter the problem. I could not check the browser server cache settings as the BSP is using MVC and these fields are missing.
    Thanks and Regards,
    Raju
    I lost how to add points. I remember there was a document on how to add points, which I could not get by search. Could you help me how I can award points to you.
    Sorry for that and Thanks
    Message was edited by: Raju Datla

  • ICWC htmlb:tableview filter problems

    Hi,
    We developed a BSP application in CRM Web_IC. Whenever user goes to this screen, it retrieves the results from SAP CRM table and lists the entries. We used htmlb:tableview with filter attribute set to 'SERVER'. The first row of the entry is used to filter the entries displayed based on wildcard search and redisplay the same.
    We noticed that all this handled by client side eventing (Java Script) and it works okay in our development and testing environment.
    But we got wierd results when it went for user testing. On some of the machines, the page looks refreshed but the list display does not change based on the search. We thought it might be caching problem so we tried with different IE settings, it looks okay for some time on one of the machines but the problem gets repeated after wards. The situation is we cannot afford intermittent problems.
    OS are win'2000 and XP and browser is IE 6 with sp1 and sp2. The problem is not consistent so none of the combinations actually suggested if the problem is related to one area.
    Has anyone experienced similar to above. Any ideas are welcome.

    Hi Sasi,
    Unfortunately I could not get any direct solution to the problem. I chased SAP OSS and SAP direct consultant who was working with us with no solution. Last time, I heard it was sent to htmlb team at SAP. I stopped chasing after that as project gone live and I fixed the problem by putting a search area and button using client side eventing. 
    If you read the source code once the page is displayed, you can see that SAP writes Javascript to handle the search. I copied the code as Javascript function and placed a button to fire this function which handles the filter as normally SAP does.
    Regards,
    Raju

Maybe you are looking for