Events in BSP

hi all,
   I am new to working with BSPs.
I have used two events onInitialization and onInputProcessing.
Can anyone explain to me the use of other events, viz. :-
onCreate, OnDestroy, OnManipulation, OnRequest.
Is there any documentation avaiable about these events ?
thanks in advance,
Ashish

<b>OnCreate</b>
OnCreate is called once when the page is first created (stateful mode), and performs a once-off data initialization or object creation.
<b>OnRequest</b>
OnRequest is called whenever a request is made for a particular page and is used to restore the internal data structures from the request. This is important when working in stateless mode.
<b>OnInitialization</b>
This event handler is mainly used for data retrieval. For example, it allows data required for displaying the BSP to be read from the database. It can also execute any program.
<b>OnInputProcessing</b>
This event handler checks and processes user input. It can also define navigation, that is, whether the user should be taken to the same page or another when the BSP is called.
<b>OnManipulation</b>
You can use this event handler to manipulate the HTTP data stream later.
<b>OnDestroy</b>
This event handler is available for special functions.
Refer the below link for more detail..
http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
Raja T

Similar Messages

  • Handling HTMLB events in BSPs???

    Hi all,
    can anybody tell me the how to handel events in BSPs??

    Hi Aravind,
    Follow the link  /people/brian.mckellar/blog/2004/07/28/bsp-programming-handling-htmlb-events u can understand.

  • Capture Browse Event in BSP application

    Hi guys,
    i have a BSP page which contains a browse button and a drop downlist. my requirement is to enable a button only when the value is selected from the dropdown list and the text field of the browse event is filled.
    the problem is that am able to capture the selection from teh dropdown list however am not able to determine whether the browse button was clicked and hence a file name been selected.
    i wanted to know if there is any kind of event which is trigger when the browse button is presse in the page.
    thanking you for your aids.
    fardeen.

    I found a piece of code whereby the author insert an Event name(OnInputProceesing) in one of the onaction event.
    I have not tried it yet, but will do it in the near future
    Since i got no replies here, i'l close the thread.

  • Handling events in BSP application using WML tag Extensions

    Hello Everyone  ,
                            We are developing a BSP applications for Mobile handheld using WML tag library. I am looking for some code samples to know how we can handle evevents inside the BSP using the WML tag library.
    Can any one of  you plesae help us by placing a code snippet for handling onInputprocessing() methods (BSP Using WML Tag extensions).
    I mean to ask how we can handle events inside the BSP applications that uses the WML tag library.
    I know about how to handle BSP events using HTMLB and XHTMLB tags frameworks.
    Thanks for your help in advance.
    Thanks,
    Greetson

    Is this WML tag library something that is supplied by SAP u2013 as a BSP Extension Element?  Or are you just using WML tags directly in your layout?  I can tell you in general that if you want to generate HTMLB events from regular HTML code you can generate the JavaScript calls using the htmlbEvent tag of the BSP extension library.  However your tags have to be running within an HTMLB Content tag for this to work.
    If you want to work totally without HTMLB then you need to use the simple HTTP Post but format the input name as OnInputProcessing(<function code>) like this:
    <input type="submit" name="OnInputProcessing(ok)" value="OK">
    This will cause the OnInputProcessing event handler to trigger without needing any HTMLB tags (this is how it was done in WebAS 6.10 before we BSP Extensions).

  • Portal eventing between bsp and VC

    Hi everybody
    I need to use portal eventing to have a bsp and a VC iview communicate.
    The bsp iview should be displayed within the VC iview as html view, raise a portal event with some sort of parameters inside, and then be dynamically hidden by the main iview.
    I have often read about VC and bsp exchanging signals when belonging to the same page, but will this work even with bsp iview within VC iview? Has anyone ever achieved this?
    thanks
    Vincenzo

    Hello Vincenzo,
    It won't work, since the html view is implemented as an iframe on top of the model. If you want to use portal eventing, you should have the iViews inside a portal page which acts as a container and you also have the entire portal framework working for you.
    Regards,
    Natty

  • How can I capture mouse click events on BSP or Web Dynpro ABAP Screen

    hi Guys,
    Currently we have a user inactivity problem,
    the requirement is: if user is clicking on BSP/Web Dynpro ABAP screen, he/she is considered active. so we need an mechanism to capture the mouse click event.
    Using Firebug, we found that this js is in the iframe which contains BSP/web dynpro scrren: /sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    we want to find this js file & put in some javascript code to track user's mouse click, but i cannot find it on server.
    while in ie if we type http://host:port/sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    this file can be downloaded, means this file is there.
    Any one can help on this issue? find the js file or another way to capture the mouse click event.
    Thanks a lot with points!

    Hi  Feng Guo,
                        We can not capture mouse click events on Web Dynpro ABAP Screen . I am not sure about BSP. But as for as I know the portal keep active the iViews until unless mouse clicks happens.
    But for your problem I think you can get solution by setting iView Expiration to some more time period.
    Regards,
    Siva

  • Portal Eventing: communication betn BSP - WD iView

    Hi All,
    i am doing portal eventing between WD Abap iView and BSP iView with the help of blog <a href="/people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony:///people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony.
    i have created page which has both iViews.
    but i am not able to trigger the event from BSP to WD.
    please suggest me some direction regarding this.
    Regards,
    Chandra

    Hi,
    the domain is the first part in your URL, for example www.sdn.sap.com.
    In your case it will probably the hostname of your computer.
    The reason for this is security. The portal eventing is build in Javascript and in Javascript it is not allowed to access other frames that are not in the same domain.
    Best regards
    Renald

  • BSP Development and Client-Eventing

    I am working on a java stack portal, <b>EP 6.0 SP11</b>.  (It does not have the ABAP stack.)
    I want to develop my portal content using BSP's.  I have a <b>BW</b> installation which is version <b>3.1</b>, running on <b>WebAS 6.20</b>, and an <b>R/3</b> installation version <b>4.7</b>, running on <b>WebAS 6.20</b>. 
    I can develop BSP's in either of these systems.  Currently, I am writing them in the BW system, and displaying them in the portal, however I cannot find an example of how to <b>enable client-side eventing in a BSP running in BW on WebAS 6.20, so my BSP can talk to other iViews on a page</b>.  Can someone please explain how I can accomplish this? 
    Thank you,
    Kathryn
    p.s. -- I have read many webforum postings on client-eventing and none of them have directly answered the question I have posed, so please provide more explanation than simply a link to another forum posting, if at all possible.  Thank you!

    Portal Client Eventing is possible in BSP.  The following is small except from the upcomming Advanced BSP programming book from SAP-Press:
    http://www.sap-press.com/product.cfm?account=&product=H1903
    Portal Eventing
    The first element is the <bsp:portalEvent>. This element allows your application to subscribe to a portal event via the Enterprise Portal Client Framework, or EPCF.
    These portal events can then be trapped and responded to by BSP server-side event handlers. The HTMLB event manager will return details about the Portal event. The key here is to look for any event name called PortalEvent.
    DATA: event TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event_ex(
    runtime->server->request ).
    IF event IS BOUND.
    IF event->event_name EQ 'portalEvent'.
    event_dataobject = event->event_server_name.
    event_sourceid = event->event_defined.
    SPLIT event->event_id AT ':'
    INTO event_namespace event_name.
    ENDIF.
    ENDIF.
    SAP does not supply a BSP extension element for raising a portal event since this would not make sense. All you really need is the JavaScript function that exposes
    this functionality from the portal. All the necessary JavaScript functions are rendered out by the method CL_HTTP_EXT_BSP_HTMLB->EVNETS_JS and included
    in your application automatically.
    This example code demonstrates the possibility of raising a portal event from BSP through the press of a <htmlb:button>. It also shows how to pass data from a
    <htmlb:inputField> into the event.
    <htmlb:inputField id = "bookTitle"
    value = "BSP for Fun and Profit" />
    <htmlb:button id = "fireBuyBook"
    text = "Buy Book"
    onClientClick = "portalFireEvent('myBooksEve
    nts','fireBuy',document.getElementById('bookTitle').value);" />

  • Using page attribute in event handler method of controller

    Hi all,
      I have created a page attribute GT_TABLE. I need to use this table in one of the event handler methods of the controller of the same page. I tried to use the GET_ATTRIBUTE method but it always returns an empty table.
      Can someone please guide me in this respect.
      Thanking you in advance,
    Regards,
    Sumit.

    Hi Sumit,
    The page attribute you mention (GT_TABLE) it's an internal table, isn't it? So far I know, the value of internal table will gone when BSP finish to load in server. If you want to keep the data in internal table, you need to load the internal table into Session (in one of page event in BSP).
    Regards
    David

  • Call SAP Transaction from BSP

    Hi,
    I am new to BSP. I have to call SAP Screen on button click event on BSP and also need to pass data at runtime.
    I searched this forum but didn't find the right solution. I tried to call SAP screen from BAPI and through URL but no success.
    Anyone knows how it can be done?
    Regards,
    Usman Malik

    Thanks for your reply,
    Actually I am very new to BSP. I don't understand where to put this code?
    [System]
    Name=DEV
    Description=DEV [Development]
    Client=123
    [User]
    Name=RAJA
    Language=EN
    [Function]
    Title=
    Command=*SU01 USR02-BNAME=raja;
    Type=Transaction
    [Configuration]
    WorkDir=d:xxxxxxSapWorkDir
    [Options]
    Reuse=1
    Second thing is about shortcut. Do I have to place this shortcut on server?
    Thanks,
    Usman Malik

  • BSP Checkbox Application.

    Dear All,
    I am facing an issue.
    I had developed an application using BSP - HTML with ABAP.In this application, i have two pages.I am calling 2nd page from 1st page based on some input on first page.Based on input on first page,second page is displaying values in one table. Second page also has one button called OK.The table is having three columns.First column is checkbox and the other two are material number,base unit of measure.
    Now the question is suppose table has 10 entries and i want to select entry number 3 then i tick mark the checkbox corresponding to entry number 3.But i am not able to get material number and unit based on checkbox selection. How can i read the checkbox value in OnInputProcessing event in BSP.

    hi:
    do like this
    Layout ->
          <htmlb:tableView id              = "Programmer_Data"
                           table           = "<%= t_progmr %>"
                           visibleRowCount = "5"
                           selectionMode   = "SINGLESELECT"
                           onRowSelection  = "rowSelection" >  "check box "
            <htmlb:tableViewColumn columnName = "EMNO"
                                   title      = "Employee Number" />
            <htmlb:tableViewColumn columnName = "DOB"
                                   title      = "Date of Birth" />
            <htmlb:tableViewColumn columnName = "DOJ"
                                   title      = "Date of Joining" />
            <htmlb:tableViewColumn columnName = "SALARY"
                                   title      = "Salary" />
          </htmlb:tableView>
    In OnInputprocessing
          DATA:
            event  TYPE REF TO if_htmlb_data,
            selrow TYPE REF TO cl_htmlb_tableview.
          event = cl_htmlb_manager=>get_event_ex( request ).
          selrow ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'tableView'
                                                id      = 'Programmer_Data).
          DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
          tv_data = selrow->data.
          w_index = tv_data->selectedrowindex.  " It would select the clicked rows
    w_eventid contains the id of button, table-view, etc.
    w_index contains selected-row-index value.
    To catch the event, we make use of Class cl_htmlb_manager and method get_event.
    Regards
    Shashi

  • Integrate BSP with the MSS Teamviewer

    Hi,
    does anybody know how to integrate a bsp application with the MSS teamviewer navigation - like other MSS services are integrated(i.e. receive Teamviewer event in BSP application)?
    Thank you,
    Serge

    Hi sergey,
    I also fedup in searching the integration functionality & finally built the 'TeamViewer' in BSP Page itself.
    It's simple. Pick up your 'directly reporting employees' or 'All employees' from the Org structure using the fn module <b> RH_DIR_ORG_STRUC_GET </b> .
    I hope the foll thread will be helpful.
    /thread/132644 [original link is broken]
    Rgds,
    Jothi.
    Message was edited by: Jothivenkatachalam.P

  • BSP island in WD4A possible?

    Hello,
    I currently attending a WD4A training.
    I know that it is poosible to integrate Sliverlight and Flash Island in WD4A.
    Is it also possible to integrate a BSP island in WD4A in order to add flexiblity to WD4A?
    Which things on architecture and programming have to be considered for the integration?
    How to transfer data between BSP and WD4A application?
    All the best,
    Guido Brune

    >Why it would not BSP spefic?
    Why would you want something BSP specific?  If we were to do some sort of HTML Island, it would be open so that any HTML based content could run in it.  We would use JavaScript as the communication mechanism for events and data into and out of the Island.  This would work fine with BSP as well.
    >Is BSP supporting HTML5?
    Absolutely.  Since you can write your own custom HTML and JavaScript in BSP you can write HTML5 content today.  I wrote some HTML5 prototypes using BSP over the summer.
    Don't expect an HTML5 version of the SAP BSP Extension Elements (HTMLB) anytime soon - if ever. I'm sure our focus will be on an HTML5 version of the Web Dynpro renderer first.
    >How to transfer data between WD4A and BSP island?
    Considering these Islands don't exist (yet), it would just be sepeculation on how to transfer data. If you come to TechEd and attend the What's New in Web Dynpro ABAP session, you might see more on this topic.
    Of the approaches we mentioned that you could do today, you could communicate in a variety of ways. For example if you use the two iViews appraoch you could use Portal Eventing between BSP<->WDA in either direction.

  • ST22: OBJECTS_OBJREF_NOT_ASSIGNED

    Hi SDN, can somebody give me a clue about this ST22 dump:
    Coding OnInputProcessing:
    DATA: event TYPE REF TO cl_htmlb_event.
    DATA: data_t TYPE REF TO cl_htmlb_inputfield.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    IF event->id = 'BZUR' AND event->event_type = 'click'.
    Coding im Layout:
          <htmlb:form method="post" >
            <htmlb:button id      = "BZUR"
                          onClick = "clicked"
                          text    = "zurück"></htmlb:button>
    I thought this is the way to make things work safely - still sometimes I get this short dump:
         1 method _ONINPUTPROCESSING.                                        
         2 * event handler for checking and processing user input and        
         3 * for defining navigation                                         
         4                                                                   
         5 DATA: event TYPE REF TO cl_htmlb_event.                           
         6 DATA: data_t TYPE REF TO cl_htmlb_inputfield.                     
         7                                                                   
         8 event = cl_htmlb_manager=>get_event( runtime->server->request ).  
         9                                                                   
    >>>>> IF event->id = 'BZUR' AND event->event_type = 'click'.            
        11                                                                   
        12 * HOOK_URL ist befüllt und muss nicht erst neu geholt werden      
        13   data_t ?= cl_htmlb_manager=>get_data(                           
        14                               request = runtime->server->request  
        15                               name     = 'inputField'             
        16                               id       = 'I01'                    
        17                               ).                                  
        18   IF NOT data_t IS INITIAL.                                       
        19     hook_url = data_t->value.                                     
        20   ENDIF.                                                          
        21                                                                   
        22   navigation->set_parameter( name = 'HOOK_URL' value = hook_url ).
        23   navigation->goto_page( url = 'start.htm' ).                     
        24 ENDIF.                                                            
    The dump does not occur regularly only seldom randomly.
    regards, matthias
    ps: this is WAS 700
    SAP_ABA      700     0010     SAPKA70010
    SAP_BASI 700     0010     SAPKB70010
    pps: I did some more testing and noticed taht this dump occurs when hitting the submit Button, which is not htmlb but mere html with some css formats:
    <input type="submit" name="onInputProcessing(go)"
                           value="an EVI senden" style="border: solid 1px black;
                           background-color: #C1D3E0; color: #000000; font-size: 11px;">
    Message was edited by:
            Matthias Kasig
    Message was edited by:
            Matthias Kasig

    Hi Matthias,
    I guess as in your case the form is not submitted by the respective JavaScript libraries of HTMLB that some hidden inputfields that contain more information about the type of the event are not filled and therefor the event-manager cannot create the event. To circumvent the dump you can just check whether the event is bound.
    if event is bound and .....
    In case the event is not bound (could not been instantiated) the rest of the if-clause will not be checked.
    The better option from my point of view is to proceed as follows:
    Use the bsp-tag htmlbEvent on the layout to get the javascript for executing an event generated:
    <bsp:htmlbEvent  event_code = "<%=lv_event%>"
                     event_type = "MyEventType"
                     id         = "SubmitMyEvent"
                     name       = "SubmitMyEvent"/>
    If you place this within your layout the variable lv_event contains the javascript that is required to trigger the event. If you put this coding into you Button as onClick:
    <input type="BUTTON" value="Submit" onClick="<%=lv_event%>">
    Then you should be able to handle the event in the onInputprocessing by:
    DATA: event TYPE REF TO IF_HTMLB_DATA.
    event = cl_htmlb_manager=>get_event_ex( runtime->server->request ).
    Now you can find your Id's in the attributes of the interface reference. In case you use standard htmlb-elements to trigger the form submit (e.g. checkbox or dropdown) you can use the following to distinguish what element has fired the event:
    CASE event->event_name.
      WHEN htmlb_events=>checkbox.
      "Checkbox was clicked
      WHEN .......
      "Some other events
    ENDCASE.
    The constants for the htlmb-events are available in class htmlb_events, the ones for phtmlb in phtmlb_events and the ones for xhtmlb in xhtmlb_events.
    Hope that helps.
    Best Regards
    Michael

  • Transaction Launcher - SAP GUI

    Hi Experts,
    We are configuring R3 bespoke transaction to CRM 7.0 UI. We used ITS and it worked but that is very slow. The other option we have is using SAP GUI. So we are in process of configuring the transaction and followed steps available in weblog http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUI-LaunchingtransactionsinGUIforWindows. While using this blog we added all code in OnCreate event of BSP page.
    Now while clicking on screen, it opens blank window. We are using following code.
    DATA: l_shortcut    TYPE string.
    CALL FUNCTION 'SWN_CREATE_SHORTCUT'
      DESTINATION 'PEDCLNT200'
      EXPORTING
        i_transaction           = 'ZORD'
        I_TITLE                 = 'Launching Sales order...'
      IMPORTING
        shortcut_string         = l_shortcut
      EXCEPTIONS
        INCONSISTENT_PARAMETERS = 1
        OTHERS                  = 1.
    REPLACE FIRST OCCURRENCE OF 'Command=ZORD' in l_shortcut WITH
       'Command="ZORD ZTS_HEADER-AUART=ZOR1"'.
    DATA: l_xshortcut   TYPE xstring.
    data: response TYPE REF TO CL_HTTP_RESPONSE." if_http_response.
    create OBJECT response.
    response->set_header_field( name  = 'content-type'
                                value = 'application/x-sapshortcut' ).
    CALL METHOD cl_http_utility=>if_http_utility~encode_utf8
      EXPORTING
        unencoded = l_shortcut
      RECEIVING
        encoded   = l_xshortcut
      EXCEPTIONS
        OTHERS    = 1.
    IF sy-subrc = 0.
      CALL METHOD response->set_data( data = l_xshortcut ).
    ENDIF.
    Any views where we are missing any info.
    Thanks for your help.
    Cheers,

    Hi All,
    Earlier there was some issue with RFC user. So now I am getting l_shortcut but after that screen is still empty.
    Any views please...
    Thanks and Regards

Maybe you are looking for