Htmlb:tableView event navigation within frameset

hello,
i have a problem with event navigation in a frameset triggered from htmlb:tableView. the structure of my bsp-application:
DEFAULT.HTM
      <frameset noresize cols="70%,*">
          <frame src="links.htm" name="left">
          <frame src="rechts.htm" name="right">
      </frameset>
PAGE LEFT in the frameset with the tableView
<htmlb:form target = "right">
      <htmlb:tableView id="myTable"
                       headerText = "Mitarbeiter"
                       headerVisible = "true"
                       design = "alternating"
                       visibleRowCount      = "10"
                       fillUpEmptyRows      = "true"
                       onRowSelection       = "MyEventRowSelection"
                       selectionMode        = "singleselect"
                       table                = "<%= table_csks %>" >
      </htmlb:tableView>
PAGE RIGHT in the frameset shuold display details of the selected tableView row:
<htmlb:form target = "right">
     <br>
     <%= lstable_csks-mandt %>
     <br>
     <%= lstable_csks-kostl %>
     <br>
     <%= lstable_csks-verak %>
     <br>
     <%= lstable_csks-ersda %>
     <br>
    </htmlb:form>
PROBLEM description:
when row is selected, displaying of the details on the right frame works well. but when another event of the tableView is triggered eg. browsing between table pages, the wohle table is displayed in the right frame instead to turn the table-page but stay in the same frame. of course this is done, because i have set the form-target attribute.
and here the question: how can i differentiate between the onRowSelection-Event (navigation to the right frame) and the page-browsing event (stay in same frame but change the tableView page)?
thanks a lot!
kalina

<i><htmlb:tableView keyColumn       = "smtp_addr"
                           id              = "searchhelp"
                           table           = "<%= t_searchhelp %>"
                           visibleRowCount = "10"
                           selectionMode   = "SINGLESELECT"
                           onRowSelection  = "setHelp" ></i>
since you dont have sort or filter option for your table value, you can simply use the rowindex to read the itab.
read table itab index selectedrowindex.
on your other question of using more than one field in the itab for key of a record.
declare  another field in the itab and fillit with the concatenation of the key fields (say concatenate recornumber itemnumber into keyfield) and dont show it in the tableview. declare this field as the key column in tableview.
onrowselection this key value will be available in
tabvie->selectedrowkey which you can use to read the itab. however in your case this is not required as you dont use sort or filter.
Raja

Similar Messages

  • BSP: HTMLB TableView Event Types

    Hello Experts-
       When the HTMLB TableView control creates/returns an event, how do I distinguish between whether it is an event for selecting a row or if it is for changing pages?
    Thank you,
    - Vik.

    Hi,
    The event type is 'rowSelection'. The object will be of type "CL_HTMLB_EVENT_TABLEVIEW".
    You can see this easily in the debugger for code that looks like:
    data event TYPE REF TO cl_htmlb_event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    set the break point here.....and see the variable event
    Re
    Shiv

  • 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

  • Navigation within a pop-up window.

    Hi,
    I have a question regarding navigation within a pop-up window.
    The pop-up window is generated as below, the component usage is defined in the runtime repository for the main window.
    lo_contracts_popup     = comp_controller->window_manager->create_popup(
        iv_interface_view_name = 'TEST_REPS/MainWindow'
        iv_usage_name          = 'RepsList'
        iv_title               = lv_reps_otr ).
      lo_contracts_popup->set_window_width( '800' ).
      lo_contracts_popup->set_window_height( '500' ).
      lo_contracts_popup->open( ).
    Within the component, there are two views defined and assigned to that window.  If the component is tested by itself navigation is possible in the usual manner using a navigational link,  clicking the button calls the outbound plug, then the inbound plug then the bsp page and then the screen changes to show the new view, this uses the following code
    CALL METHOD op_toamendrep( ).
    Then in the outbound plug:-
      me->view_manager->navigate( source_rep_view = me->rep_view
                                  outbound_plug   = 'ToAmendRepresentative' ).
    However when the same chain of events is actioned in the pop-up, the navigational link is called the plugs are called and the associated BSP code is run through in the debugger, but the actual screen in the pop-up window is still shows the first view, not the second as we would expect.
    Can you please help me to resolve this issue?
    Thanks in advance,
    Gareth Smith

    I had the same issue and I found turning off safai extensions fixed the issue.  Must be an extension that's causing this problem.

  • 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.

  • 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

  • HTMLB TableView Tab Stops

    We have some HTMLB TableViews in our JSPDynPage developed portal application.  After we upgraded to NetWeaver 7.0(2004S) the table views now require the users to tab across each cell within the tableview.  The accessibility flag is turned off within the users profiles so that is not what is causing it.  Is there a way to disable this functionality.  I would hope so otherwise I would have to say that SAP did a bit of a dis-service to some of it's customers.
    Thanks.
    Curtis

    Hi Curtis,
    We are also facing the same problem. Customer is complaining for this. Could you please tell us what needs to be done to go to the next editable cell.
    Thanks in Advance....
    Satya

  • 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

  • Htmlb:tableView - automatic refresh

    <b>Hi,</b>
    I use htmlb:tableView  to display data.
    Have you any idea how to do automatic refresh to the tableView ?
    <b>Thanks, Natalia.</b>

    Here is the Sample code which reload every 2 seconds..
    Look at the ouput:
    http://grizzlyweb.com/webmaster/javascripts/examples/refresh.htm
    <html>
    <head>
    <title>Refresh JavaScript Example</title>
    <noscript>
    <meta http-equiv="refresh" content="2">
    </noscript>
    <script language="JavaScript">
    <!--
    var sURL = unescape(window.location.pathname);
    function doLoad()
        // the timeout value should be the same as in the "refresh" meta-tag
        setTimeout( "refresh()", 2*1000 );
    function refresh()
        window.location.href = sURL;
    //-->
    </script>
    <script language="JavaScript1.1">
    <!--
    function refresh()
        window.location.replace( sURL );
    //-->
    </script>
    <script language="JavaScript1.2">
    <!--
    function refresh()
        window.location.reload( false );
    //-->
    </script>
    </head>
    <!--
        Use the "onload" event to start the refresh process.
    -->
    <body onload="doLoad()">
    <script language="JavaScript">
    <!--
        document.write('<b>' + (new Date).toLocaleString() + '</b>');
    //-->
    </script>
    </body>
    </html>
    For more detail look at the below link..
    http://grizzlyweb.com/webmaster/javascripts/refresh.asp
    <i>* Reward each useful answer.</i>
    Raja T

  • HTMLB Tableview: questions..;

    Hello,
    Simply I output my table as follows :
    <htmlb:form>
      <htmlb:tableView id              = "tv1"
                       visibleRowCount = "10"
                       selectionMode   = "lineEdit"
                       table           = "<%=mytable%>"
                       iterator        = "<%=iterator%>" />
    </htmlb:form>
    (NOTE: where iterator is type IF_HTMLB_TABLEVIEW_ITERATOR)
    Ok, its nice, but I need to customize things a bit.  I have 5 fields... and I want 4 uneditable, and the 5th able to be updated and modified back into the SAP table.
    How can I do this?
    Thanks,
    Timothy

    Hello,
    I have read many times the iterator weblogs, especially 830.  I understand most but still have trouble.  Allow me to show you what I have, and please tell me what is wrong.
    My BSP, index.htm:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="EPCOT" >
        <%
      SELECT * FROM ZEPCT002 INTO TABLE epcots
               WHERE ZANNE = anne
               AND   ZPAYS = pays.
        %>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "12"
                           selectionMode   = "lineEdit"
                           table           = "<%= epcots %>"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    For my iterator, I have made the 5th field an input field (CL_HTMLB_INPUTFIELD).  And the 6th field an ICON:
    image2->onclick = 'OnSaveClick'.
            image2->src = cl_bsp_mimes=>sap_icon( `ICON_SYSTEM_SAVE` ).
    I want, when user selects a line, enters text in this 5th field, and then clicks the icon... an event to write/modify directly this change into my table (SAP table I created).  So, for index.htm, in OnInputProcessing, I have:
    DATA: event TYPE REF TO CL_HTMLB_EVENT,
          id type string,
          row type string,
          col type string,
          other type string.
    CLASS cl_htmlb_manager DEFINITION LOAD.
    clear: event, id, row, col, other.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    id = event->id.
    split id at '_' into other row col.
    case col.
    WHEN '6'.
    <b>?????</b>
    endcase.
    My <b>?????</b> is where I have tried many things and just dont get it.  In weblog 830, I see what he is doing, but some things he does don't work for me, like:
    id = htmlb_event->id.
        case htmlb_event->server_event.
          when 'OnUpdateUserClick'.
            data: event1 type ref to cl_htmlb_event_selection.
            event1 ?= htmlb_event.
            read table model->ug_users index i_row assigning <irow>.
    this <b>htmlb_event->id</b>, <b>htmlb_event</b>, and <b>model->ug_users</b>... for these I get syntax errors.
    So, could you tell me what I need to do here?
    Any guidance would be greatly appreciated,
    Thanks,
    Tim

  • 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

  • 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

  • Link in a htmlb:tableview

    is it possible to add links to a htmlb:tableview.
    for example, i have a table with 4 columns. i'd like to let the entries in column 1 appear as links with the content of column 4 as the link target. (column 4 should be invisible for the user)

    Hi Daniel,
    You didn't study enough before posting...
    Take a look at:
    1. Documentation on your WebAS (accessible by <i>Tag Browser</i>);
    2. <b>SBSPEXT_TABLE</b> BSP Application on your system;
    3. other posts in this forum.
    Good search.
    Dany

Maybe you are looking for