Button in BSP tableview

Hi All,
  I am very new in BSP. I want to put a button and a link in the tableview .when user will click on that button or link it will open a new page with necessary data.
I heard that its possible via iterator .
Please let me know how its possible.
Its needed urgently.
Thanks,
Jigs

Hi Jigs,
have a look at weblog /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
there everything is described in detail. Instead of a dropdownListbox you can add other elements the same way.
Regards,
Rainer

Similar Messages

  • Call an ABAP Function module on click of Button in BSP page

    Hello ,
    i would like to run a ABAP function module on click of a button in BSP page.
    or in other words i want a Funtion module ex: 'test1' to run after clicking this button ex: 'button1'
    and how to pass the values for a function module after clicking the button.
    i an new to bsp application .
    Can anyone help me on this .

    Hi Shalaxy,
    Triggering a URL to WDJ:
    I suppose the URL of WDJ app. is also a portal URL. I assume that from a BSP application inside portal you need to trigger the WDJ url.
    But the catch is that you cannot hotcode this URL, since it varies for a development, quality and production systems(diff. portal environments).
    To solve this issue, ABAP provides a system variable named sy-sysid, which says want system your ABAP system is, normally a development R/3 system will be associated to development portal system and quality R/3 to quality portal ans so forth.
    So you could have a internal table/db table/ variable for dev, quality or prod portal urls and from the bsp on button click based on the value in the sy-sysid you can trigger the url accordingly.
    Creating a URL in WDJ
    The above is about triggering a WDJ from BSP. But if you dynamically want to create a link in WDJ on a button click, then apparently you could not do that from BSP, since the applications are different. All you could do is to pass some URL parameters to WDJ application from BSP app. Then based on the URL parameters the WDJ application has to dynamically create a link and add it to its application.
    Hope it helps.
    Regards,
    Maheswaran
    Edited by: Maheswaran B on Mar 1, 2010 4:17 PM

  • How to provide a button in bsp that downloads data from SAP into powerpoint

    hi,
    how to provide a button in bsp that downloads data from SAP into powerpoint
    this absurd requirement is needed by my client.
    thanks
    saad

    Hi,
    Look at tools like the things mentioned above or things like
    http://www.investintech.com/products/developer/creatorsdk/creatorsdkmain/
    http://command-line-image-converter.qarchive.org/
    You need to look for tools that can run via the command line and thsu be executed as external command (http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971d4543b11d1898e0000e8322d00/frameset.htm)
    Eddy
    PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

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

  • Looking for a way to "deselect all" and "hold page" for bsp tableview

    Hallo Experts,
    I'm quite new to bsp programming. My first application is nearly complete, but I'd like to add some more convenience. I got two issues to solve, both connected with the tableview element.
    1) User is clicking through the pages of the table control, marks some lines and hits submit button. After the submit, the table is back to page 1. Is there a way to keep the page that was last viewed?
    2) Same situation. After the user has hit the submit button, I retrieve a list of all marked table lines. After I'm done, I'd like all lines to be unmarked. Does anyone know how to achieve that?
    Any help or hints are highly appreciated.
    Christian

    Hi Chris,
    1)User is clicking through the pages of the table control, marks some lines and hits submit button. After the submit, the table is back to page 1. Is there a way to keep the page that was last viewed?
    declare a global variable gv_visiblefirstrow.
    In EventHandler
    when 'submit'.
    gv_visiblefirstrow = request->get_form_field( 'your_tableview_id_visiblefirstrow' ).
    In Layout:
    Add the below line to code of your tableview
    visibleFirstRow     = "<%= gv_visiblefirstrow %>"
    2) Same situation. After the user has hit the submit button, I retrieve a list of all marked table lines. After I'm done, I'd like all lines to be unmarked. Does anyone know how to achieve that?
    After you are done..just add the code..
    Data: lv_total_rows type i.
          describe table itab lines lv_total_rows.
          cl_htmlb_manager=>check_tableview_all_rows(
          rowcount = lv_total_rows
          request = request
          id = 'tableview_id'
          check = ' '
    As suggested by Raja,pls search the forum before posting a new thread.
    Regards,
    Anubhav

  • How to avoid the page to move up when I click the button on the Tableview?

    Hi, EP fellows.
    I currently have 3 tableViews and 1 header form set in one jsp page (I know, it may not be a good design to put three tableView in one jsp page.....but for the sake of avoiding client side eventing between each tableViews..I combined them into one jsp page). I set the Load/Navigation value to be URL. 
    Here is the problem. Everytimes I click on the Navigation button (Up/Down) to navigate the tableView data to another page, the whole page will move up and away from the table that I navigating.
    I know it is bacause the page get refreshed, and go to the first item of the page. In this case, how do I avaoid the page to move up and away form the tableView? As it is really look bad when user click on the button, they have to scroll back to the tableView they click.
    Thanks for advices.
    Kent

    As far as i remember,this javascript function pops user a dialog to save a file:
    javascript: document.execCommand('SaveAs','1',null);
    But i m not sure will it pop up for pdf, just try to google javascript to save a pdf file.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Hiding Button in BSP.

    Hi all,
    I have a BSP page with a button say "Print". And i am triggering the windows.print thru Javascript and the BSP page is printed.Fine.
    But i want to hide the "Print" button.
    i have used the foll code in my javascript..it's not working
    <i>
    document.formprint.printbutton.style.visibility = 'hidden';
    </i>
    Thanks,
    JBP.

    hi!
    we have attributes like "disable", "visible" in the below element id. try them out.
    <htmlb:button id            = "<%= lw_buttons-id %>"
                      text          = "<%= otr(YP_HRPA/ARCHIVE)%><%=tmp_text%>"
                      tooltip       = "<%= lw_buttons-text %>"
                      <b>disabled      = "<%= l_disabled %>"</b>                  design        = "<%=l_design%>"
                      onClick       = "<%= lw_buttons-id %>"
                      onClientClick = "<%= l_string %>"
                      <b>visible  =</b>
                      width         = "90" />
    regards,
    manasa

  • Data passing from Adobe from submit button to BSP controller with XML

    Dear Friends
    How are you. I am developing one BSP application with Adobe interactive form. To complete this task I have use following linked solution. ( A PDF file that tells how to use Adobe forms with BSP application ).
    My application runs fine 50%. I did the same things what the tutorial told me and I am seeing the page in the webbrowser with Adobe from what i have developed.
    In the form I have put SUBMIT button and I have set properties as well... I have give full url as well for the controller to take data there over XML.
    In the controller I am not receiving any value. I have attached the code beneath as well... please tell me where I am making mistakes. I am thanking you. Any help will be appreciated.
    data: formxml type string.
    formxml = request->get_cdata( ).
    data: streamfactory type ref to if_ixml_stream_factory.
    data: istream type ref to if_ixml_istream.
    streamfactory = g_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    data: document type ref to if_ixml_document.
    document = g_ixml->create_document( ).
    data: parser type ref to if_ixml_parser.
    parser = g_ixml->create_parser( stream_factory = streamfactory
                                    istream = istream
                                    document = document ).
    parser->parse( ).
    data: node type ref to if_ixml_node.
    data: strchecked type string.
    node = document->find_from_name( name = 'ACC_REQ').   <------ Node is empty
    strchecked = node->get_value( ).
    This is the link of the solution what i refered to complete this application:
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417500)ID0005508150DB01147043631230799453End?rid=/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4&overridelayout=true

    Dear Naeem,
    Actually i also tried the same link. For me its displayed the form. After giving the input when i click for submit nothing will happen.
    Its blinked and displayed the same page. I think for the node is getting value and some where its doesnt retrive the value.
    I will check and get back you soon once i found.
    Regards,
    Anita Vizhi Arasi B

  • BSP - TableView overwritten by input fields in same page

    Hi everybody!
    We try to implement a page with a tableview, loading datas in the onCreate with a CallFunction, and then looping on itself to modify the datas before saving in a cookie:
    OnCreate
    OnInitialize <--
    Layout          |
    Processing -
    The tableView is displaying a table "T".
    There is an input field "F" in the table.
    We have a "reset to 0" button in the page affecting the field F of table T.
    The reset is done in OnInputProcessing.
    Problem : when reseting, the TableView displays the input field value, and not 0. Yet, when debugging, I can see that T contains 0, in the Layout execution.
    So I guess the page input fields are overwritting the  table of the tableView.
    Thanks a lot in advance, best regards
    François

    Thanks a lot for your reply
    This is what happens more in details:
    In my page, I have a table with a modifiable column, that maybe I want to reset:
    Let's suppose I have typed "1" in many rows, but aftewards, I want to reset to 0.
    Layout:
            <htmlb:groupBody>
              <%-- TableView with columns description table  --%>
              <htmlb:tableView id              = "tvX"
                               table           = "<%= requisition %>"
                               design          = "ALTERNATING"
                               headerVisible   = "TRUE"
                               keepSelectedRow = "TRUE"
                               visibleRowCount = "15"
                               fillUpEmptyRows = "true"
                               onHeaderClick   = "MyEventHeaderClick"
                               onRowSelection  = "MyEventRowSelection"
                               selectionMode   = "LINEEDIT"
                               width           = "100%"
                               iterator        = "<%= tv_iterator %>" >
                <htmlb:tableViewColumns>
                  <htmlb:tableViewColumn columnName = "BANFN"
                                         title      = "N° Demande d'achat"
                                         sort       = "true" >
                  </htmlb:tableViewColumn>
                  <htmlb:tableViewColumn columnName = "MENGE_VAL"
                                         title      = "Quantité modifiée"
                                         type       = "INPUT" >
              <htmlb:button id      = "init"
                            text    = "Init"
                            onClick = "onInputProcessing(init)" />
    OnInputProcessing :
    Nothing (so when clicking on "Init", we come back on the same page into OnInitialization)
    OnInitialization:
        loop at requisition into wa_requisition.
          wa_requisition-menge_val = 0.
          modify requisition from wa_requisition.
        endloop.
    The page still displays the "1" whereas I see "0" in debug in the Layout.
    I suppose the tableView is displayed not only from the table "requisition" but from a table corresponding to the inputs in page, which is initialized in the OnCreate part, but not in the On Initialization.
    The iterator is the standard one.
    Do you have an idea?
    Best regards

  • BSP Tableview error when trying to bind an itab within an itab

    Hello dear forum members,
    I got a requirement to dynamically generate tableviews and bind them to a model's attribute (an itab 'model->gt_prd_grps' which holds the actual internal table to display as tableview 'model->gt_prd_grps-prods_table' within it). Below code would give you a correct picture.
    BSP View code:
    LOOP AT model->gt_prd_grps INTO ls_prd_grps.
            lv_idx = sy-tabix.
            CONCATENATE 'ProductsList_' ls_prd_grps-prod_group INTO lv_tableid.
            CONCATENATE '//model/' 'gt_prd_grps[' lv_idx '].prods_table' INTO lv_bind_str.
            CREATE OBJECT lr_tableview.
            lr_tableview->id            = lv_tableid.
            lr_tableview->headertext    = ls_prd_grps-prod_grp_desc.
            lr_tableview->_table        = lv_bind_str.
            lr_tableview->headerVisible = 'true'.
            lr_tableview->footerVisible = 'true'.
            lr_tableview->filter        = 'SERVER'.
            lr_tableview->design        = 'alternating'.
            lr_tableview->sort            = 'SERVER'.
            lr_tableview->fillUpEmptyRows = 'false'.
            lr_tableview->selectionMode   = 'NONE'.
            lr_tableview->iterator        = lo_prdctschtb_iter.
            lr_tableview->emptyTableText  = 'No Products available.'.
            tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).   %>
      <%    lv_col_count_default = 1. lv_row_count_default = lv_row_count_default + 1.   %>
      <htmlb:gridLayoutCell columnIndex = "<%= lv_col_count_default %>"
                            rowIndex    = "<%= lv_row_count_default %>"
                            colSpan     = "3" >
                            <%= tableview_str %>
    </htmlb:gridLayoutCell>
    <% ENDLOOP. %>
    I am encountering dump while trying to run the above BSP view and the error says "BSP exception: No structure component with the name "PRODS_TABLE[1].PRODUCT_ID" exists"
    Actually the user would select from the tableview via a 'select' column which would be rendered as checkbox and the MVC binding would greatly reduce the effort of manually transferring the user selections to the respective model table(s).
    Please suggest if the above way is possible and if so how to overcome the exception i am facing OR do i have to manually capture the tableview selection via CL_HTMLB_MANAGER=>GET_DATA.
    Huge thanks in advance,
    Ram

    Hi Raja,
    I am getting the dump as soon as the view is called. The tableview to be displayed is indeed the nested table only and the user can select the records via the 'checkbok' column in the tableview.
    Also, when i debugged, the dump occurs exactly at the below point:
    tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).
    Regards,
    Ram
    Edited by: Ram Mohan Venkatraman on Mar 11, 2010 12:12 PM

  • Button column in tableview

    Hi All,
    I've got a tableview that I've added a button column onto. The button runs the onRequestClick() method fine but I need to know which particular button was clicked ( on which row ).
    The button has been created using the code :
    col = model.getColumn("REQUEST");
    col.setTitle(bean.getChangeOrderRequestText());
    col.setCellType(-1, TableColumnType.BUTTON);
    col.setOnCellClick("requestClick");
    The event handler is :
    public void onRequestClick(Event event) {
    //TableHeaderClickEvent tne = (TableHeaderClickEvent) event;
    How can I tell which of the 10 buttons ( 10 rows in the tableview) was clicked.
    Cheers
    Richard

    Hi Richard,
    probably clicking the button raises a TableCellClickEvent. You can retrieve the visible Rownumber by
    TableCellClickEvent cellClickEvent = (TableCellClickEvent)event;
    int visibleClickedRow = cellClickEvent.getVisibleRowIndex();          
    Then you have to add the firstVisibleRowNumber in case your table has more than one page, but I don't know the details for sure right now.
    Hope that helps.

  • Enabling button in BSP

    The query goes like this
    OnClientclick of one button i am calling a function which enables another button which is in disabled mode.
    Now the issue is buttonname.disabled = false ; does not work in this case
    Isthere any other way to do the  same in javascript using BSP.
    Thanks

    HI Bhavana,
    Maybe a little workaround can achieve this.We can use an invisible input field with no value initially.BOth the buttons would be visible and would call javascript functions.
    The following code will make it clear
    <head>
    <script language="JavaScript" type="text/javascript">
             function fun1()
               document.form1.ip1.value = "hi";             
              function fun2()
                  if(document.form1.ip1.value == "hi")
                  alert("value is set");
                  return true;
                  else
                  alert("value not set");
                  return false;
              </script>
    </head>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          <center>
         <br><htmlb:inputField id      = "ip1"
                            type    = "STRING"
                            visible = "FALSE" />
       <br><htmlb:button id       = "but1"
                        text     = "Button1"
                        onClientClick = "fun1()"
                         />
       <br><br<br>
        <htmlb:button id = "but2"
                      text          = "Button2"
                      onClick = "myEvent"
                      <b>onClientClick = "if(!fun2(this))htmlbevent.cancelSubmit=true;"</b>/>
          </center>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    If the second button is pressed,it triggers the javascript function fun2(),which checks the value of invisible input field,if it is initial,the onClick event is not trigerred.
    If first button is pressed,it sets the value of the inputfield.Now if the second button is pressd,the values is set and the onClick event is trigerred.
    BUt,in this case,both the buttons are visible as enabled.
    So,with a little more effort,you can use the HTMLB image tag instead of buttons(they also have <b>onClick</b> and <b>onClientClick</b> attributes).Initially,you can show image of disabled button,but on click of first button,you can change the image on client side itself,by preloading it.
    HOpe this solves your problem.
    Regards,
    Siddhartha Jain

  • To create a new session on the clcik of a button in Bsp.

    If have application A.
    On the click of the button i want to create a new session of application B.
    I used the method
    cl_http_ext_webapp=>create_url_for_bsp_application
    for calling the application B.
    but the session is maintained.
    How shall i proceed so that my application creates a new session.

    I am curious.  Both Raja and I suggest the same fix:
    >Now you probably want to add the url parameter sap-sessioncmd. There is the value open that will start a new session
    >'?sap-sessioncmd=open' and use this url for navigating.
    You said that his solution worked and mine did not.  The only difference is that I suggested that you use cl_bsp_runtime=>construct_bsp_url instead of cl_http_ext_webapp=>create_url_for_bsp_application.  This recommendation comes right from the source; cl_bsp_runtime=>construct_bsp_url is the prefered method for constructing URLs.  I am curious the other method somehow produce different results?

  • Data Binding in BSP - tableview entry not getting deleted.

    Dear Gurus,
                    I am very new to the BSP concept.I am told to develop a BSP for creating,updating,deleting entries from a database.I have achieved create and update,But when i am deleting,it gets deleted in backend i.e. in the SAP database,But the entry still appears there in the Front end.And the other 2 events i dont think i have handled well , as all i am doing is, I am appending or modifying the entries in the form_fields and then calling the do_handle_data event.
    Please help me out in how to handle the table view events,I have heard about the selectedrowindex,but i couldnt figure that out.
    Kindly help me out.
    Helpful answers would definitely be rewarded.
    Cheers,
    Deepthee Kasal

    Thanks Beth for your insight,
    The info requested are:
    UWLJWF version: 7.00 SP22
    Neither the Manager nor the Substitute's IDs are deleted. They are both active.
    Just that the Substitute has moved to another Org unit.
    Another information is that, the HR Personnel's here have a Custom program, which would get the Substitute assignments in the Backend - Which also gives the feature of deleting the substitution.
    I suspect that, this particular substitution might have got deleted in the Backend with this Custom Program (TCODE).
    Regardless of this, it seems now that there is inconsistency between backend & portal.
    At this circumstance, is there a way to clear this issue?
    BR,
    Uday
    Edited by: Rama Vankamamidi on Jan 5, 2012 3:14 PM

  • Htmlb tableview - display buttons in columns

    Hi experts,
    I am using HTMLB to display my internal table. I want to display buttons in one of the columns. I am able to display a button in the tableview using the following code.
                <htmlb:tableViewColumn columnName = "button"
                                       title      = "Status"
                                       type       = "Button" >
                </htmlb:tableViewColumn>
    The text of the buttons should display text either On or Off depending on some the flags set in the column of the internal table. Can any one tell me how do I go about it.
    Regards,
    Abdullah

    Hi,
    See this link
    http://help.sap.com/saphelp_nw04/helpdata/en/28/4bae407e69bc4ee10000000a1550b0/content.htm
    Award me if this link is usefull.

Maybe you are looking for