JavaScript for BSP (Dropdownlistbox in a tableview iterator)

...unfortunatly i have problems to put the generated html into the post...if anyone would like to have it i will be glad to send it to you by email.

This parameter does not actually allow you to enter your own style - I got annoyed by it myself when I started working with iterators.
If you debug a bit into the code of the method R_TXT_CELL of class CL_SAPTABLECELL you come across this part:
IF p_style IS NOT INITIAL.
  SPLIT p_style AT ';' INTO TABLE styletable.
  LOOP AT styletable ASSIGNING <style>.
    SPLIT <style> AT ':' INTO stylename stylevalue.
    TRANSLATE stylename TO LOWER CASE.
    IF stylename EQ 'celldesign'.
From this (and the follow-up lines) we can learn that the only style attribute that can be used has to be called <b>'celldesign'</b>, and its allowed values are the ones in the table m_tableview->m_htmlb_tableview->mc_render_lib_d2_rt_validation->_et_stcd (runtime name of course).
For a quick reference, here are the values of this table:
STANDARD
ALTERNATING
TRANSPARENT
NEGATIVE
POSITIVE
TOTAL
SUBTOTAL
SUBTOTAL_LIGHT
BADVALUE_DARK
BADVALUE_MEDIUM
BADVALUE_LIGHT
CRITICALVALUE_DARK
CRITICALVALUE_MEDIUM
CRITICALVALUE_LIGHT
GOODVALUE_DARK
GOODVALUE_MEDIUM
GOODVALUE_LIGHT
GROUP_HIGHLIGHTED
GROUP_HIGHLIGHTED_LIGHT
KEY_MEDIUM
GROUP_LEVEL1
GROUP_LEVEL2
GROUP_LEVEL3
MARKED
FILTER
FILTERICON
POPIN
So, we have to live with this possibility - otherwise you would have to use a HTML element which you place into the cell, and which you can apply your styles to.
Cheers,
Max

Similar Messages

  • Event for Editing a cell in Tableview Iterator

    Hi,
    I'm doing a program for displaying the Material Details with Quantity as Editable Field.
    I want to edit the Quantity during runtime & it should reflect it in the Internal Table.
    If i edit the Quantity field & goto the next row then then the Quantity that i entered is getting refreshed.
    Thanks & Regards,
    Padmam.

    when ever you make server round trip, you need to read each selected row & column to get the updated value.
    Refer the Standard program "SBSPEXT_TABLE" Page "TableViewMultiLineEdit.bsp". This will solve the issue.
    Raja T

  • 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

  • BSP tableview Iterator

    Dear Experts,
    I am currently working with BSP tableview iterator.
    I have use many internal tables and the data are store in my class.
    My question is how can i use certain data which already store in my class and display them in my tableview with iterator.
    I use another internal table in my tableview, but when i try to refer my other data which already stored in my class, the internal table is empty.
    Please guide and advise.
    Thanks and regards,
    Simon Kiew

    Hi Bin,
    You can use HTMLB Link in your RENDER_CELL_START method.
    WHEN 'LINK'.
    p_replacement_bee = cl_htmlb_link=>factory(  id    = p_cell_id
    reference= 'http://www.yahoo.com/'
    text      = 'YAHOO'
    target = '_new' ).
    Hope this helps,
    Regards,
    Ravikiran.

  • Problem with tableview iterator

    Dear friends.
    I try to adopt tableview iterator in my customer's BSP pages. So, I programmed test page.
    METHOD if_htmlb_tableview_iterator~render_row_start .
      m_row_ref ?= p_row_data_ref.
    ENDMETHOD.
    M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"
    z3tydisp has structure as below
    REQNO          NUMC     12
    VGUBUN          CHAR     1
    DSCOFVGUBUN     STRING     0
    REQDT          DATS     8
    RNAME          CHAR     10
    VCOMP          CHAR     30
    VNAME          CHAR     10
    VPLACE          CHAR     5
    VPLACEDSC     CHAR     20
    APPROVAL     CHAR     1
    DSCOFAPPROVAL     STRING     0
    AND... p_row_data_ref has structure below
    REQNO     N     12
    VGUBUN     C     1
    DSCOFVGUBUN     g     0
    REQDT     D     8
    RNAME     C     10
    VCOMP     C     30
    VNAME     C     10
    VPLACE     C     5
    VPLACEDSC     C     20
    APPROVAL     C     1
    DSCOFAPPROVAL     g     0
    In my option, p_row_data_ref has same structure compared with z3tydisp. But there is "CX_SY_MOVE_CAST_ERROR". How I have to define "z3tydisp"????

    >><b>M_ROW_REF is "Static Attribute" and "Public" and "Type Ref To Z3TYDISP"</b>
    instead of this make your M_ROW_REF a instantaneous attribute. since static attribute are intantiated only once when object created and are shared by all other intances. m_row_ref contains data about the table you are going to render using tableview. so it should be public, so that get different data for different iterator objects.
    your p_row_data_ref must be of type ref to data which is superior class of data types.
    and if you have defined iterator "IF_HTMLB_TABLEVIEW_ITERATOR" in your interfaces. then you need not to define structure for p_row_data_ref, its already there in interface.
    hope this will solve your problem,
    regards,
    hemendra

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

  • Link inside tableview iterator

    Hi Experts,
    I kept a link inside tableview iterator it is working fine, when i click the link it shows error, i cant understand it.
    The error is
    The following error text was processed in the system:
    BSP Exception: Das Objekt targetbspapplication/page.htm in der URL /sap(bD1lbiZjPTgwMA==)/bc/bsp/sap/ztableview1/targetbspapplication/page.htm?link=WWW.SDN.SAP.COM ist nicht gültig.
    please help me to solve it.
    Thanks & Regards,
    Arun

    Hi Arun,
    You can try the method mentioned below:
    RENDER_CELL_START
    when 'ACTION'.
            if p_edit_mode is not initial.
              data: bee_table  type ref to cl_bsp_bee_table,
                       link       type ref to cl_htmlb_link.
              data: cell_id_del(20).
              cell_id_del = p_cell_id.
              create object bee_table.
              link ?= cl_htmlb_link=>factory( id = p_cell_id
                                               text = 'Modify Entries'
                                               on cli ck = 'modify').
              bee_table->add( element = link level = 1 ).
              p_replacement_bee ?= bee_table.
            endif.
    OnInputprocessing of BSP page:
    when 'modify'.
          gv_flg_tv_popup = 'X' .
          gv_matcode = gs_materials-matnr.
    In Layout:
    <%
      if gv_flg_tv_popup is not initial.
            %>
            <s cript type='te xt/ jav ascript'>
            var m atcode="<%= gv_matcode %>";
            windo w.open('tv_popup.htm?ma tcode='+ma tcode+'&end','my window','width=450,height=230,res izable=no');
            </s cript>
            <%
      clear gv_flg_tv_popup.
            %>
            <%
      endif.
            %>
    In the above code , I have a tableView in which last  column is a link.On Click of this link a new window is opened in whicn details of one material is displayed in tableview.on click of link OnInputprocessing is trigered and I read the row no for which link is clicked and the material numnber for that row.Now in OnCreate of popup window I fetch the data for that material and display it in the tableView.
    Regards,
    Anubhav

  • How to read vales from dropdownlistbox placed in tableView Cells

    Hi,
      Thanks for reply.. I got problem of reading values from Dropdownlist box placed in tableView Cells. Please correct me or give some sample to read vales from dropdownlistbox placed in tableView Cells.
    TableView column defined as
            <htmlb:tableViewColumn columnName = "OT_REASON_CODE"
                                   title      = "OT Reason"
                                   type       = "User"
                                   width = "6"
                                   edit       = "true" >
              <htmlb:dropdownListBox id                = "rcode"
                                     table             = "<%= I_YH008 %>"
                                     nameOfKeyColumn   = "OT_REASON_CODE"
                                     nameOfValueColumn = "OT_REASON_DESC" />
            </htmlb:tableViewColumn>
    OnInput processing I am trying to read dorpdown list values selected.
              W_YH022-ENDUZ = TABLE_EVENT->GET_CELL_VALUE(
              ROW_INDEX = SY-TABIX
              COLUMN_INDEX = 3 ).  " Get time
    DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    DATA: value type string.
         value = TABLE_EVENT->GET_CELL_ID( row_index    = SY-TABIX
                                      column_index = '7').  " get Cell ID
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                     request = runtime->server->request
                                     name    = 'dropdownlistbox'
                                     id      = value
    IF data IS NOT INITIAL.
    W_YH022-OT_REASON_CODE = data->selection. " +Cell Values...I am not getting cell values here+
    endif.

    Hi:
    Do like this
    Layout
          <htmlb:dropdownListBox id="mydropdownlist" >
            <htmlb:listBoxItem key   = "bpno"
                               value = "Business Partner Details" />
            <htmlb:listBoxItem key   = "bpaddress"
                               value = "Business Partner Address" />
          </htmlb:dropdownListBox>
    OnInpurProcessing event - >
    DATA: lcl_dropdown TYPE REF TO cl_htmlb_dropdownlistbox.
    data : selection2 type string.
    lcl_dropdown ?= cl_htmlb_manager=>get_data(
        request = runtime->server->request
        name    = 'dropdownListBox'
        id      = 'mydropdownlist' ).   
    IF NOT lcl_dropdown->selection IS INITIAL.
      selection2 = lcl_dropdown->selection.
    ENDIF.
    Regards
    Shshi

  • Nested image Tag in tableview iterator

    In the past I use the tableview tag "tableViewColumn". In this tag a nested image tag inside a link tag was used.
    Now I use the tableview iterator. But I can only define one p_replacement_bee in the RENDER_CELL_START method.
    Does anyone knows a solution for my problem?
    Example:
    <htmlb:tableViewColumn columnName = "transport"
    tooltipColumnKey = "transport_tooltip"
    type = "user"
    title = "<%= otr(zinternet/tracking) %>"
    horizontalAlignment = "center" >
    <htmlb:link id = "$TVCID$"
    reference = "$TRANSPORT_LINK$"
    target = "_blank" >
    <htmlb:image src="$TVCVALUE$" />
    </htmlb:link>
    </htmlb:tableViewColumn>

    Just off hand I see one problem.  In your reference you have 'www.sap.com'.  This link wouldn't work (and might be causing your problem, because without the http:// on the front it would assume that was a relative path.
    Other than that I don't see a problem off hand.  I normally don't render my elements to BEEs and then add the BEEs to the BEE Tree. I prefer to render to elements and then use the ADD method instead of the ADD_BEE method:
            data: tag_gl       type ref to cl_htmlb_gridlayout,
                  tag_glc_if1  type ref to cl_htmlb_gridlayoutcell,
                  tag_glc_if2  type ref to cl_htmlb_gridlayoutcell,
                  tag_glc_if3  type ref to cl_htmlb_gridlayoutcell.
            tag_gl       = cl_htmlb_gridlayout=>factory(
                        columnsize  = '3' rowsize  = '1' ).
            tag_glc_if1 = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '1' rowindex = '1' ).
            tag_glc_if2  = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '2' rowindex = '1' ).
            tag_glc_if3  = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '3' rowindex = '1' ).
            data: seats_bee type ref to cl_bsp_bee_table.
            create object seats_bee.
            seats_bee->add( level = 1 element = tag_gl ).
            seats_bee->add( level = 2 element = tag_glc_if1 ).
            seats_bee->add( level = 3 element = if_first ).
            seats_bee->add( level = 2 element = tag_glc_if2 ).
            seats_bee->add( level = 3 element = if_bus ).
            seats_bee->add( level = 2 element = tag_glc_if3 ).
            seats_bee->add( level = 3 element = if_econ ).
            p_replacement_bee = seats_bee.

  • Matrix in tableView iterator

    Hi,
    I have created a composite BSP element that outputs a matrix with two cells, the first containing an icon, the second with a description.  This works fine when placed in a BSP page.
    When, however, I try to use the element in a tableView iterator, it blanks the whole table.  Do I need to do something special to get the element working inside a tableView?
    My element code is posted here:
    METHOD if_bsp_element~do_at_beginning.
    * use matrix to control alignment
    * <phtmlb:matrix width = "100%" >
      DATA: phtmlb_matrix TYPE REF TO cl_phtmlb_matrix.
      phtmlb_matrix = cl_phtmlb_matrix=>factory( width = '100%' ).
    * create matrix and set alignment
      WHILE m_page_context->element_process( element = phtmlb_matrix ) = co_element_continue.
        CLEAR:  phtmlb_matrix->mc_backgrounddesign,
                phtmlb_matrix->mc_col,
                phtmlb_matrix->mc_design,
                phtmlb_matrix->mc_row,
                phtmlb_matrix->mc_halign,
                phtmlb_matrix->mc_separation.
        phtmlb_matrix->mc_valign = 'MIDDLE'.
        phtmlb_matrix->mc_halign = 'LEFT'.
        phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
    *   get status info
        data: ls_status type /baasow/status.
        clear: ls_status.
        select single * from /baasow/status
          into ls_status where status = status.
        DATA: html TYPE string.
    *   no status found
        if sy-subrc ne 0.
          html = status.
          me->print_string( html ).
          exit.
        endif.
    *   status icon
        DATA: lr_icon TYPE REF TO cl_htmlb_image.
        lr_icon = cl_htmlb_image=>factory(
                src = ls_status-icon ).
        WHILE m_page_context->element_process( element = lr_icon )
          = co_element_continue.
        ENDWHILE.
        CLEAR:  phtmlb_matrix->mc_backgrounddesign,
                phtmlb_matrix->mc_col,
                phtmlb_matrix->mc_design,
                phtmlb_matrix->mc_row,
                phtmlb_matrix->mc_halign,
                phtmlb_matrix->mc_separation.
        phtmlb_matrix->mc_valign = 'MIDDLE'.
        phtmlb_matrix->mc_halign = 'LEFT'.
        phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
    *   status text
        html = ls_status-TEXTSH.
        me->print_string( html ).
      ENDWHILE.
      rc = co_element_done.
    ENDMETHOD.

    Hi,
    I have created a composite BSP element that outputs a matrix with two cells, the first containing an icon, the second with a description.  This works fine when placed in a BSP page.
    When, however, I try to use the element in a tableView iterator, it blanks the whole table.  Do I need to do something special to get the element working inside a tableView?
    My element code is posted here:
    METHOD if_bsp_element~do_at_beginning.
    * use matrix to control alignment
    * <phtmlb:matrix width = "100%" >
      DATA: phtmlb_matrix TYPE REF TO cl_phtmlb_matrix.
      phtmlb_matrix = cl_phtmlb_matrix=>factory( width = '100%' ).
    * create matrix and set alignment
      WHILE m_page_context->element_process( element = phtmlb_matrix ) = co_element_continue.
        CLEAR:  phtmlb_matrix->mc_backgrounddesign,
                phtmlb_matrix->mc_col,
                phtmlb_matrix->mc_design,
                phtmlb_matrix->mc_row,
                phtmlb_matrix->mc_halign,
                phtmlb_matrix->mc_separation.
        phtmlb_matrix->mc_valign = 'MIDDLE'.
        phtmlb_matrix->mc_halign = 'LEFT'.
        phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
    *   get status info
        data: ls_status type /baasow/status.
        clear: ls_status.
        select single * from /baasow/status
          into ls_status where status = status.
        DATA: html TYPE string.
    *   no status found
        if sy-subrc ne 0.
          html = status.
          me->print_string( html ).
          exit.
        endif.
    *   status icon
        DATA: lr_icon TYPE REF TO cl_htmlb_image.
        lr_icon = cl_htmlb_image=>factory(
                src = ls_status-icon ).
        WHILE m_page_context->element_process( element = lr_icon )
          = co_element_continue.
        ENDWHILE.
        CLEAR:  phtmlb_matrix->mc_backgrounddesign,
                phtmlb_matrix->mc_col,
                phtmlb_matrix->mc_design,
                phtmlb_matrix->mc_row,
                phtmlb_matrix->mc_halign,
                phtmlb_matrix->mc_separation.
        phtmlb_matrix->mc_valign = 'MIDDLE'.
        phtmlb_matrix->mc_halign = 'LEFT'.
        phtmlb_matrix->do_set_data( element_name = 'matrixCell' ).
    *   status text
        html = ls_status-TEXTSH.
        me->print_string( html ).
      ENDWHILE.
      rc = co_element_done.
    ENDMETHOD.

  • 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

  • Composite Element in Tableview Iterator

    I want to use a <phtmlb:matrix> element in a tableview iterator to arrange the content of a cell.
    I tried to follow Brians Weblog on composite elements.
    In my test example, I just want to combine two fields of t000 into one cell. Of course I know, that concatenation would be more easy here, but that would not answer my questions.
    Thought it could look like this:
    METHOD render_cell_start.
      DATA:
        l_o_matrix             TYPE REF TO cl_phtmlb_matrix,
        l_o_bsp_element        TYPE REF TO cl_bsp_element,
        l_string               TYPE STRING.
      CASE p_tableview_id.
        WHEN 'TABLE_T000'.
        l_o_matrix = cl_phtmlb_matrix=>factory( ).
        WHILE o_page_context->element_process( element = l_o_matrix )
          = cl_bsp_element=>co_element_continue.
    Cell 1
          CLEAR: l_o_matrix->mc_backgrounddesign,
                 l_o_matrix->mc_design,
                 l_o_matrix->mc_separation.
          l_o_matrix->do_set_data( element_name = 'matrixCell' ).
          l_string = me->t000-mandt.
          l_o_bsp_element = cl_htmlb_textview=>factory( text = l_string ).
          WHILE o_page_context->element_process( element = l_o_bsp_element )
           = cl_bsp_element=>co_element_continue.
          ENDWHILE.
    Cell 2
          CLEAR: l_o_matrix->mc_backgrounddesign,
                 l_o_matrix->mc_design,
                 l_o_matrix->mc_separation.
          l_o_matrix->mc_halign = 'LEFT'.
          l_o_matrix->mc_valign = 'TOP'.
          l_o_matrix->do_set_data( element_name = 'matrixCell' ).
          l_string = me->t000-mtext.
          l_o_bsp_element = cl_htmlb_textview=>factory( text = l_string ).
          WHILE o_page_context->element_process( element = l_o_bsp_element )
           = cl_bsp_element=>co_element_continue.
          ENDWHILE.
        ENDWHILE.
        p_replacement_bee = l_o_matrix.
      ENDCASE.
    ENDMETHOD.
    However, that does not work.
    First, the list of T000-MANDT fields is rendered twice:
    into the tableview and into a list before the tableview.
    Second:  T000-MTEXT does not show up at all.
    What do I do wrong?
    I feel that I do not completely understand how the rendering is processed.
    Thanks for our help.
    Juergen

    The following is the example from Brian's weblog, updated for design2003.  It doesn't use the Matrix however.  Perhaps it will help.
    It still doesn't render quite like it did under design2002.  I'm not sure if there is a good way to combine multiple input fields into one cell any longer.  I know others have had a problem with this as well.  I will have to look closer at your matrix attempt.
    when 'SEATS'.
          if p_edit_mode is initial.
            data: max type string, occ type string,
                  value type string.
            max = m_row_ref->seatsmax + m_row_ref->seatsmax_b
                + m_row_ref->seatsmax_f.
            occ = m_row_ref->seatsocc + m_row_ref->seatsocc_b
                + m_row_ref->seatsocc_f.
            condense: max, occ.
            concatenate occ ` / ` max into value.
            p_replacement_bee = cl_htmlb_textview=>factory(
                text = value ).
          else.
            data: icon_plane2 type string.
            icon_plane2 = cl_bsp_mimes=>sap_icon(
                 id = 'ICON_WS_PLANE' ).
            data: image type ref to cl_htmlb_image.
            image = cl_htmlb_image=>factory(
                 id = p_cell_id
                 src = icon_plane2 ).
            data: if_first type ref to cl_htmlb_inputfield.
            if_first = cl_htmlb_inputfield=>factory( id = p_cell_id
                id_postfix = '_first'
                type = 'INTEGER' size = '4' ).
            if_first->value = m_row_ref->seatsocc_f.
            data: if_bus   type ref to cl_htmlb_inputfield.
            if_bus   = cl_htmlb_inputfield=>factory( id = p_cell_id
                id_postfix = '_bus'
                type = 'INTEGER' size = '4' ).
            if_bus->value = m_row_ref->seatsocc_b.
            data: if_econ  type ref to cl_htmlb_inputfield.
            if_econ = cl_htmlb_inputfield=>factory( id = p_cell_id
                id_postfix = '_econ'
                type = 'INTEGER' size = '4'  ).
            if_econ->value = m_row_ref->seatsocc.
            data: tag_gl       type ref to cl_htmlb_gridlayout,
                  tag_glc_if1  type ref to cl_htmlb_gridlayoutcell,
                  tag_glc_if2  type ref to cl_htmlb_gridlayoutcell,
                  tag_glc_if3  type ref to cl_htmlb_gridlayoutcell.
            tag_gl       = cl_htmlb_gridlayout=>factory(
                        columnsize  = '3' rowsize  = '1' ).
            tag_glc_if1 = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '1' rowindex = '1' ).
            tag_glc_if2  = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '2' rowindex = '1' ).
            tag_glc_if3  = cl_htmlb_gridlayoutcell=>factory(
                        columnindex = '3' rowindex = '1' ).
            data: seats_bee type ref to cl_bsp_bee_table.
            create object seats_bee.
            seats_bee->add( level = 1 element = tag_gl ).
            seats_bee->add( level = 2 element = tag_glc_if1 ).
            seats_bee->add( level = 3 element = if_first ).
            seats_bee->add( level = 2 element = tag_glc_if2 ).
            seats_bee->add( level = 3 element = if_bus ).
            seats_bee->add( level = 2 element = tag_glc_if3 ).
            seats_bee->add( level = 3 element = if_econ ).
            p_replacement_bee = seats_bee.
          endif.
    Message was edited by: Thomas Jung

  • Drop Down Menu for BSPs

    Hello,
    I´m a student and I have to do a housework concerning ABAP programming. I have to create a database for employes which runs on BSP. For this I created a normal table with different topics like name, surname, title etc. For topics like "Titles" (e.g. Doctor, B.Sc.) I created a value table. But now, I have a problem. As I have to do the whole thing on BSPs, I cannot simply transfer value table. For the BSP I need a kind of dropdown-menu which shows the different titles to select.
    But I have no idea how to do this...
    Can you help me?
    Thanks in advance!!!

    Hi Andi,
    welcome to SDN.
    There is a BSP forum where you should put this question.
    Look at the BSP sample applications to see how to do this. They are SBSPEXT_HTMLB, SBSPEXT_PHTMLB and SBSPEXT_XHTMLB.
    Anyway, here is a simple example how to populate a dropdown listbox in BSP.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%
      data: lt_ddtab type scarr_tab.
      select * from scarr into table lt_ddtab.
    %>
    <htmlb:content design="design2003" >
      <htmlb:page title="DDListBoxtest" >
        <htmlb:form>
          <htmlb:dropdownListBox id                = "ddtest"
                                 table             = "<%= lt_ddtab %>"
                                 nameOfKeyColumn   = "CARRID"
                                 nameOfValueColumn = "CARRNAME" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    The online help for the dropdownListBox element shows how to perform event handling.
    Cheers
    Graham Robbo

  • Handling ActiveX events with Javascript inside BSPs

    Hi,
    Has anyone any experience with handling events from ActiveX objects (using the <object> tag) with Javascript, inside BSPs?
    I'm developing solely for the IE browser. Reading other threads, I know that the usual way this is done is via the below code excerpt:
    <i><script type="text/javascript" for="MyObject" event="Object_Event">
         js_function();
    </script></i>
    I create a HTML page, with the <object>, <script..for..event> tags, etc. Everything works fine when the page is run from my local system. However, when the code is run from WebAS (Activate then Test (F8)), the ActiveX object loads fine. But the javascript does not respond to events thrown by the ActiveX object.
    I wonder if anyone can share their experiences on this issue.
    Thank you.
    Amos

    It's the Skype4COM (v1.0.0.17) wrapper for the SkypeAPI, available at https://developer.skype.com/Download
    (Note: NOT the v1.0.0.16, which comes with the Skype ActiveX Tools package).
    I'm trying to use javascript to handle the event "CallStatus", thrown by Skype4COM, as shown in the code excerpt below.
    <i><script language="javascript" type="text/javascript" for="Skype" event="CallStatus(Call, Status)">
                 handleCallStatus (Call, Status);
    </script></i>
    It works locally, but not when in a BSP.
    It's rather interesting to mess with Skype calls from a webpage. Do let us know how your experience goes
    Amos

Maybe you are looking for