BSP application locked when Browser closed..

Hi ,
How can handle the logging off my BSP application when browser is closed..
we had some thing setting of dirty flags in SRM ,which will take care of this..
Any clue on custom BSP application..
Can i override window.close() function to logoff
Regards
Prasad
Message was edited by: Ranganatha Prasad Kurupati
Message was edited by: Ranganatha Prasad Kurupati

Create yourself a page with flow logic, this will be your initial entry to your application.
Paste this code below, make sure to set the target_page.
<%@page language="abap" %>
<%
   DATA: target_page TYPE STRING VALUE 'zapp.do'.
   DATA: do_not_delete_sso2_cookie TYPE XFELD  VALUE SPACE.
   CL_BSP_LOGIN_APPLICATION=>SET_LOGOFF_URL_PARAM( page = page ).
%>
<html>
<script language="JavaScript">
<%
   DATA: guid TYPE GUID_32.
   CALL FUNCTION 'GUID_CREATE' IMPORTING ev_guid_32 = guid.
%>
var frame_A = "<%=guid %>_A";
var frame_B = "<%=guid %>_B";
function startLoader(name)
    doc=window.frames[name].document;
    doc.writeln('<html><body onload="document.f.submit();">');
    doc.writeln('<form id="f" name="f" target="<%=guid %>_B" method="POST" action="<%=target_page %>">');
    <%  DATA: ffs TYPE tihttpnvp, ff  TYPE  ihttpnvp.
        request->get_form_fields( changing fields = ffs ).
        DELETE ffs WHERE name cs '~'.
        LOOP AT ffs INTO ff.
     %>
          doc.writeln('<input type="hidden" name="<%=ff-name %>" value="<%=ff-value %>">');
    <%ENDLOOP. %>
    doc.writeln('<table border="0" width="100%" height="100%"><tr><td align="CENTER" valign="MIDDLE"><span style="font-family:Arial,sans-serif;">Loading...</span></td></tr></table>');
    doc.writeln('</form></body></html>');
    doc.close();
    <%=runtime->GET_DOMAIN_RELAX_SCRIPT( )  %>}
function exitBSPApplication(newTargetUrl)
{<% if runtime->session_manager->is_running is initial.  %>
  <%CLASS cl_bsp_login_application DEFINITION LOAD. %>
  var url  = "<%=CL_BSP_LOGIN_APPLICATION=>GET_SESSIONEXIT_URL( page = page ) %>";
  <%IF do_not_delete_sso2_cookie IS NOT INITIAL. %>
      url += "&bsp_do_not_delete_sso2_cookie=X";
  <%ENDIF. %>
  var prop = 'height=100,width=400,top='(screen.height-100)/2',left='+(screen.width-400)/2;
  var out = window.open(url,'_blank',prop);
<%endif. %>
  document.getElementById("<%=guid %>_FRAMESET").onunload = null;
  if(newTargetUrl) window.setTimeout('{document.location.href="'newTargetUrl'";}', 750);
function getHiddenFrame()
    if (document.body.rows=='*,0') return "<%=guid %>_B"; else return "<%=guid %>_A";
function getShownFrame()
    if (document.body.rows=='*,0') return "<%=guid %>_A"; else return "<%=guid %>_B";
function swapToFrame(frame)
    if (frame == '<%=guid %>_A') document.body.rows=',0'; else document.body.rows='0,';
var sap_basis_A_active = false;
var sap_basis_B_active = false;
function frameLoaded(name)
    if (name=="<%=guid %>_A" && sap_basis_A_active==false) { sap_basis_A_active = true; return; }
    if (name=="<%=guid %>_B" && sap_basis_B_active==false) { sap_basis_B_active = true; return; }
    var newShowFrame   = getHiddenFrame();
    var newHiddenFrame = getShownFrame();
    try
      doc=window.frames[newShowFrame].document;
      for (var i = 0; i < doc.forms.length; i++) {
        var frm = doc.forms<i>;
        if (frm.target=="") frm.target = newHiddenFrame;
    } catch(e) {}
    swapToFrame(newShowFrame);
    //if (window.frames[newShowFrame].window.sapOnResize)
    //    window.frames[newShowFrame].window.sapOnResize();
    if (window.frames[newShowFrame].window.sapScrollTo)
        window.frames[newShowFrame].window.sapScrollTo();
</script>
<frameset id="<%=guid %>_FRAMESET" rows="*,0" onUnLoad="exitBSPApplication();" resize="no" framespacing="0" frameborder="0">
    <frame name="<%=guid %>_A" src="javascript:parent.startLoader('<%=guid %>_A');"  onload="frameLoaded('<%=guid %>_A');">
    <frame name="<%=guid %>_B" src="about:blank"                                    onload="frameLoaded('<%=guid %>_B');">
    <noframes>This browser does not support frames.</noframes>
</frameset>
</html>

Similar Messages

  • Run Time Error  while executing BSP application in Safari browser

    Hi Frens,
      I am new to BSP application. I have made changes for an existing BSP application which has to be executed on both IE and Safari browsers. I made changes in the View for IE browser and it is executing correctly. I have done the same changes in the Safari view also but when executed in Safari, the browser hangs up and in the backend in SAP it goes to dump. The dump message is as below:                                                                           
    " An exception occurred. This exception is dealt with in more detail below         
    . The exception, which is assinged to the class 'CX_BSP_ELEMENT_EXCEPTION', was  
    not caught,                                                                     
    which led to a runtime error.                                                    
    The reason for this exception is:                                                
    <htmlb:gridLayoutCell>: Class <htmlb:gridLayout> (CL_HTMLB_GRIDLAYOUT) was not   
    found as BSP parent element.           "
    Can anyone help me in understanding this?                                          
    Regards,
    Priya.

    Hi Priya,
    I don't think, you need to change in code for Safari. Please check the following thread.
    Re: BSP's with htmlb - Tags on Browsers for Apple Computers
    Regards,
    Sagar

  • Lock button on.  iPad won't lock when lid closed

    Lock button is on but iPad will not shut off and lock when lid closes

    Maybe the magnets on the lid are askew?
    This read may provide insight: http://www.ifixit.com/Teardown/iPad+2+Smart+Cover+Teardown/5089

  • Firefox not closing promptly when browser closed

    Firefox continues to run after being closed, and doesn't allow me to reopen a new browser window for 5 to 10+ seconds. This is a fairly recent problem and I think it began when I downloaded most recent version of Firefox/Mozilla. Very frustrating.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • How can I execute a query from a BSP application?

    How can I execute a query from a BSP application?
    I´m trying to execute a Query from intranet. I´ve been looking for examples, but the templates I´ve found doesn´t help me.
    does anybody has an example?
    Thanks.

    Hi
    Have you designed the BSP application ?
    design it first with one page
    page will have layout and Event handlers
    Design the layout with the fields
    in the event handler there are events
    in the event On Initiailization or ON inputprocessing write the select query similar to what we write in routine ABAp and fetch the data into ITAB and that has to be passed to the Layout
    see the doc
    BSP
    To learn how to create Web applications with Business Server Pages, you can work through the simple tutorials that build on each other. You should be able to run through all of the steps described here in your own system.
    If you want to develop Web applications with BSPs, your system must meet the following requirements: Prerequisites for Creating Web Applications.
    The following tutorials are available:
    · First Tutorial: First Steps with Business Server Pages…
    · Second tutorial: A Small BSP Application and A Small BSP Application with HTMLB
    · Third tutorial: Our First Online Bookshop
    · Fourth tutorial: Further Developing the Bookshop
    · A small Tutorial is also available for your first steps with the Model View Controller design pattern.
    · For a more complex MVC tutorial based on the third tutorial, see: Our Little Online Bookshop Using MVC and HTMLB
    When creating BSP applications, note the browser dependencies described in Note 598860.
    steps:
    1) start the transaction RZ10.
    2) now u u have to select Profile name, so select the INSTANCE Profile from the list of options given with the Profile parameter list.U may find multiple instance profile in the list, so select the profile in which ur server name is given.
    3) u will also find three options in the same window.
    Administrator data, Basic Maintenance, and Extended Maintenance. So select the last one from that.
    4) Now click on change button.
    5) here u will find parameter icm/host_name_full, so now set it as FQDN.
    6) Now copy ur settings with new version number.
    7) Activate that version.
    8) And now please restart ur WAS.
    So this will set ur FQDN, and also don't forget to login using Admin User.
    Now u also check for following service are active in your ICF setting or not,( just start transaction code SICF)
    /default_host/sap/bc/bsp/sap
    /default_host/sap/bc/bsp/sap/system
    /default_host/sap/bc/bsp/sap/public/bc
    /def ault_host/sap/public/bc
    /default_host/sap/public/bc/ur
    /default_host/sap/public/bsp/sap/public
    /default_host/sap/public/bsp/sap/public/bc
    /defaul t_host/sap/public/bsp/sap/system
    /default_host/sap/public/bsp/sap/htmlb
    if not then activate all.
    check this link
    Read this weblog...
    /people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
    http://www.thespot4sap.com/articles/SAP_WAS_Creating_BSP_Apps.asp
    it consists of screen shots also
    Check it.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/bb153aab4a0c0ee10000000a114084/frameset.htm
    Regards
    Anji

  • BSP Applications step by step

    hi,
        could any one send me the step by step procedure to create web enabled report through BSP Applications. or pls send any related links.
                   thnx in advance,
                   santosh.

    Hi
    To learn how to create Web applications with Business Server Pages, you can work through the simple tutorials that build on each other. You should be able to run through all of the steps described here in your own system.
    If you want to develop Web applications with BSPs, your system must meet the following requirements: Prerequisites for Creating Web Applications.
    The following tutorials are available:
    ·         First Tutorial: First Steps with Business Server Pages…
    ·         Second tutorial: A Small BSP Application and A Small BSP Application with HTMLB
    ·         Third tutorial: Our First Online Bookshop
    ·         Fourth tutorial: Further Developing the Bookshop
    ·         A small Tutorial is also available for your first steps with the Model View Controller design pattern.
    ·         For a more complex MVC tutorial based on the third tutorial, see: Our Little Online Bookshop Using MVC and HTMLB
    When creating BSP applications, note the browser dependencies described in Note 598860.
    steps:
    1) start the transaction RZ10.
    2) now u u have to select Profile name, so select the INSTANCE Profile from the list of options given with the Profile parameter list.U may find multiple instance profile in the list, so select the profile in which ur server name is given.
    3) u will also find three options in the same window.
    Administrator data, Basic Maintenance, and Extended Maintenance. So select the last one from that.
    4) Now click on change button.
    5) here u will find parameter icm/host_name_full, so now set it as FQDN.
    6) Now copy ur settings with new version number.
    7) Activate that version.
    8) And now please restart ur WAS.
    So this will set ur FQDN, and also don't forget to login using Admin User.
    Now u also check for following service are active in your ICF setting or not,( just start transaction code SICF)
    /default_host/sap/bc/bsp/sap
    /default_host/sap/bc/bsp/sap/system
    /default_host/sap/bc/bsp/sap/public/bc
    /def ault_host/sap/public/bc
    /default_host/sap/public/bc/ur
    /default_host/sap/public/bsp/sap/public
    /default_host/sap/public/bsp/sap/public/bc
    /defaul t_host/sap/public/bsp/sap/system
    /default_host/sap/public/bsp/sap/htmlb
    if not then activate all.
    check this link
    Read this weblog...
    /people/brian.mckellar/blog/2003/09/25/bsp-in-depth-fully-qualified-domain-names
    http://www.thespot4sap.com/articles/SAP_WAS_Creating_BSP_Apps.asp
    it consists of screen shots also
    Reward all helpfull answers
    Regards
    Pavan
    Message was edited by:
            Pavan praveen

  • Run BSP Application

    Hi All,
    I created a simple BSP application. and when I tried to run the application it is giving some BSP error on the browser. I just wanted to know what should put in the host file.
    Regards,
    Jeetu

    instead of "some BSP error" if you tell us the exact error message, it would help us help you better.
    i would suggest you to search this forum, BSP wiki area and the BSP weblog area and if you dont find a solution, then you can post your question with clear explanation of whats not working, whats the error message, etc.
    this weblog may be of help to you
    Running your first BSP application in SAP NetWeaver 04 ABAP Edition - NSP
    Raja

  • Doubt in CIC BSP application

    Hai,
    Please any one provide me a solution, when i execute the CRM_IC BSP application in the browser, the time out error comes. Where can i change the timing of the BSP application.
    thanks
    Tamil

    Hi,
    In this BSP(CRM_IC) you are executing the which initial bsp?
    Please run the default.do and check the FQDN.
    Or.
    Check the parameters in controller(default.do) page
    Status:           
    Unchanged
    Stateless from Now On
    Statefull from Now On           
    Lifetime            2 Session             
    Thnx
    Suriya.

  • BSP Application showing run time error

    Hi All,
    I have created bsp application but when I am testing with that in browser that time it is showing me page not found ?

    Dear Nishad
    U need to make configuration into host file i.e go to run type drivers in that there is a folder called ETC in that open host file in notepad & there give ip of your server with name
    Example
    0.0.0.0  Eccides.com

  • How to increase the field lenght of file uplaod in BSP application

    Hi All,
       I am facing a problem with u201Cuploadu201D filed length in BSP application.
    When we upload the file in BSP page, the path displayed should be the full path (i.e. from where the file is being upload the file)
    Now this field is appearing 20 char length
    Now I want to increase the length of the upload field (Input field) to be 100 char so that the path is visible.
    In the current application the file upload is being done through a structure (attributes)
    In this structure the fields are like this
    PAGE_NAME
    ID
    FOR
    TAGS
    ROW_INDEX
    COLUMN_INDEX
    OTR_NAME
    REQUIRED_NAME
    MAXLENGTH
    SIZE
    TABLE_NAME
    ON_SELECT
    VALUE
    DISABLED
    ONCLICK
    TEXT
    TYPE
    Using this method:
    CALL METHOD cl_htmlb_fileupload=>factory
              EXPORTING
                Id      = ls_form_save-id
              RECEIVING
                Element = lv_fileup.
            bee_table->add ( level = 2 element = lv_fileup ).
    This cl_htmlb_fileupload is named as class interface.
    Which has the CLG_HTMLB_FILEUPLOAD (it is a class) it is defined in attributes.
    In this class it has the attribute u201CSIZEu201D by default string 20.
    Now I need to change this attribute length from 20 to 100
    For this I copied the standard class CL_HTMLB_FILEUPLOAD into ZCL_HTMLB_FILEUPLOAD.
    This ZCL_HTMLB_FILEUPLOAD contains all attributes of the standard class CL_HTMLB_FILEUPLOAD
    Including the one class (CLG_HTMLB_FILEUPLOAD), this is defined as an attribute (ABOVE MENTIONED?)
    This class is appearing in non editable mode, so   I have copied this class into zclass (ZCLG_HTMLB_FILEUPLOAD).but still I am not able to edit the attribute called u201Csizeu201D
    And also I am not bale to add the zclass in place of the ZCLG_HTMLB_FILEUPLOAD
    Kindly tell me how to modify the length of the field u201Csize u201Cand also how to add the zclass in the attributes of one class (syntax)
    Thanks in advance
    Rambabu.A

    Hi,
    Class CLG_HTMLB_FILEUPLOAD is a class automatically generated when a BSP Element is created. You should not change/create such a class, unless by creating your own BSP Element.
    As per your requirement, you can use the SIZE parameter of method factory:
    ls_form_save-size = '100'.
    CALL METHOD cl_htmlb_fileupload=>factory
    EXPORTING
    Id = ls_form_save-id
    Size = ls_form_save-size
    RECEIVING
    Element = lv_fileup.
    Regards,
    Tanguy

  • How to use GUI_DOWNLOAD inside BSP Application event

    Hi All,
    I am facing one issue while using GUI_DOWNLOAD inside BSP Application. When the processing goes at GUI_DOWNLOAD it gives me unknown error where as the same code is working when used in report program. My requirement is to save password into excel file at my local machine. I am using FM MS_EXCEL_OLE_STANDARD_DAT to save password in excel file but this function module fail when it reach at GUI_DOWNLOAD . Can you please help me out.
    Thanks and Regards
    Pradeep Kr. Rai

    Dear Pradeep,
    Find the below link which explains a simple data download to excel from a table view.
    www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
    Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
    Hope this will be helpful.
    Regards,
    Gokul.N
    Edited by: Gokul on Oct 8, 2009 9:57 AM

  • Debugger not working for BSP application

    Hi All,
    I have 4.6C sap installation and the debugger is not working for BSP Application even when i hard code the break points.
    Can anyone help me on this issue.
    Thanks and Regards
    Shilpa

    Hi Shilpa,
    How many number of sessions are open ? If there are already six sessions open and then you try and get the debugger, it will not start, and you won't be able to catch that error also...!
    Other than that there is no possibility that the debugger doesn't start, unless ofcourse, the logic doesn't reach the debugger point....
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • EREC-BSP-How to call a bsp application from another bsp application

    Hi Experts,
    In E-Rec one of my bsp application zapp_e_ext calling another standard bsp application hrrcf_searchhlp when user click on search help button.
    i made a zcopy (zhrrcf_serchhlp) of std application hrrcf_searchhlp,and did some changes,
    now the problem is how to replace the std application with zapplication so that zapplication should be called in place of std application when user click on search button.
    Cheers,
    Amod

    try exec()ing the cad program with the name of the file as a command line parameter...
    Runtime.getRuntime().exec("CADProg.exe Test.prt");
    i have no clue if this will work but it seems like it's worth a try.

  • Catch Browser closing

    Ahh come on, has anyone found a workaround for detecting the browser closing so the session may be ended. This seems like a major in working with web apps.

    Hi!
    Use HttpSessionListener for session tracking.
    It provides two methods sessionCreated() and sessionDestroyed().
    When browser closing you get an event to sessionDestroyed method, there is also such event on session timeout.
    Regards,
    parasolko

  • Download the PDF Form as a attachment when button click in BSP application

    Hi All,
    I have scenario, when button click in the BSP application PDF Form want to download in the IE (like one window open with Open,Save and cancel button).
    I have written this code:
    data: pdf type fpformoutput-pdf.
    < Logic for populate value to pdf field ....
    .>
    response->set_header_field(
                         name  = 'cache-control'
                         value = 'max-age=0' ).
      response->set_header_field(
                         name  = 'content-disposition'
                         value = 'attachment; filename=webforms.pdf' ).
      response->set_data( data   = pdf ).
    Once button is clicked pop up is opened and closed automatically because of browser or adobe reader issue.
    How can I resolve this problem ?
    In the IE i need to change any settings ?
    IE version = 7.0
    Adobe reader = 9.0
    I have tried in the same code with IE = 6.0 and adobe reader 8.1.2 its getting download the pdf form working fine.
    The same think i want in IE 7.0 and adobe reader 9.0, what needs to be done ?
    Regards,
    Boopathi M

    Hello Ravi,
    Best would be to bind the dataSource of the InteractiveForm ui element to the parent node containing the table's data. Then specify a name of a template to be created in the templateSource and hit <enter>. Some popups later, the system will have created a template from the structure of the context. All you need to do now is to drag&drop the data structure inside the template designer to the template itself. This will result in a table. Save, activate and return the Web Dynpro view. Don't forget to unbind the pdfSource and enjoy.
    Best regards,
    Thomas

Maybe you are looking for