EP 6.0 SP2: Update a HTMLB TableView after onClick Event

Hello,
i generate a TableView from a JDBC database selection.
Outside this TableView there are 3 Buttons.
Now the problem:
If one of the buttons will click, the TableView has to be updated with a new database result. Have somebody an idea, how to update the TableView?
Stephan

Could you be more precise?
Default behaviour/coding is that an onClick event effects a request to the server - as your component/dynpage handles this request, you should be able to present anything that you like on this occasion. Maybe you code does not react to the HTMLB event properly?
Regards,
Armin

Similar Messages

  • 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

  • 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

  • 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

  • Problems with System Update 3.14.0019 after installation SP2

    Have you encountered problems with System Update 3.14.0019 after installation SP2 for Windows Vista?
     After this upgrade I view  this error: "An error occurred while gathering user information."
    Thanks for the help

    A known issue.  It wasn't supposed to be supported until SP2 is RTM.  However, look at the stickied post in the forum for some bad news about SU.
    x61s

  • 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

  • Vista SP2 Update Failed To Install

    Can anyone help?  I am having a problem with this particular Microsoft update. 
    I have my Lenovo 3000 N500 set to automatic updates for Windows.  However, the SP2 update has failed to install on numerous occasions.  I get an error number but am unable to check what this means.  I have had no problem with my Dell desktop installing the same update.

    I have already tried that before I came here.  I have tried everything without success.
    I can only assume I must have a fault with my original Vista installation.  Bought the laptop new last May.

  • 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

  • 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

    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.

Maybe you are looking for