Calling a Browser window from a method

Hi All,
I have added a new button in the toolbar of a PCUI application. My requirement is to open a new browser window on click of this button.
I have created a class ZCL_BSP_ACC_ACCMOD which is inherited from CL_BSP_ACC_ACCMOD. In this method IF_CRM_BSP_MODEL_ACCESS_IL~PROCESS_EVENT handles all the events. I have redefined this method , given a call to parent method and added my custom code after this.
My question is:
Why FMs like CALL_BROWSER & GUI_RUN does not run here?
I am getting an exception as 'frontend_error' here but these FMs run fine in SE37.
Can anybody help me !
Thanks
Amit

may be try this in CRM forum for a quicker response.
SAP CRM: Webclient UI - Framework
Regards
Raja

Similar Messages

  • Open new browser window from a JApplet

    Hi,
    I want to open a new browser window from a JApplet.My first thought was to use the Live Connect technology but it worked only with simple applets not with JApplets.Then i tried it by getting the Applet context (getAppletContext() method) but it still didn't work with JApplet...(it worked with Applet).I believe it has something to do with the applet security but i haven't yet figured it out.
    For example when i call the getAppletContext() method from a JApplet i get an java.security.AccessControlException ... .Thanks

    I must correct myself now :).
    The getAppletContext() method does work with JApplets too.Still , i have problems with the Live connection alternative.It seems that it by importing the netscape.javascript package i get the security eror that i mention above...

  • Closing browser window from an Applet?

    I've written a series of applets that perform different functions. I placed a button on each applet with the purpose to close the window in which that applet is running. However I don't even know where to start looking to find out how to make my applet close it's own browser window. I know how to open a new browser window from an applet but not vice versa.
    Can anyone help please?
    Mark.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • New browser window from uix

    How can I open a new browser window from an event handler in UIX?
    Thanks in advance,
    Martmn Patrici

    I just tried your suggestion. Unfortunately, it did not work. Here's the UIX code I used:
    <tableSelection>
    <singleSelection model="${bindings.MPOOrdersView1Iterator}" text="Select">
    <primaryClientAction>
    <firePartialAction targets="_uixState MplistsView11" source="MPOOrdersView10" event="select"/>
    </primaryClientAction>
    <contents>
    <submitButton formName="mlrhomeform" text="Print Lists" event="print" />
    <submitButton text="View Merge Reports" event="mergerpts" formName="mlrhomeform" targetFrame="_blank"/>
    </contents>
    </singleSelection>
    </tableSelection>
    The only difference from the original code is the addition of the targetFrame="_blank" in the submitButton.
    It had no effect. My redirected page showed up in the same browser window. This left me with an expired page when I press the Back button on the browser.
    My assumption is the response.sendRedirect() call wipes out the targetFrame setting.
    Does anyone know how the browser (Internet Explorer in this case) actually gets notified to open a new window? There's got to be something that the targetFrame="_blank" sets up to cause it.
    I know that Netscape supports a "Window-target:" header, but unfortunately IE doesn't. Is there some "standard" header that I can put in a response.addHeader() call that would tell all browsers to open a new window?
    Of course, a UIX solution would be preferrable!
    Any other ideas?

  • Closing browser window from Flash movie on CD

    I have to put a flash lesson I created on a cd for a client and while testing it I noticed that my exit button in the movie no longer seems to function.
    This is my close window function
        function closeWindow(evt:Event)
            var url:String = "javascript:window.opener=self; window.close()";
            var request:URLRequest = new URLRequest(url);
            try
                navigateToURL(request, "_self");
            catch (e:Error)
                trace("Error occurred!");
    Can anyone tell me why this wouldn't work when the movie is launched in a browser window from a CD?

    Fi it is at all possible you cannot do that with url request.
    Try using ExtrenalInterface class:
    ExternalInterface.call("javascript:...");
    It may not waork though depending on security settings and embed parameters.

  • Invoke a Browser Window from any screen.

    I've added my own menu after "System Help" on all screens by adding it in MENUSYST status MEN. I want to call Function Module CALL_BROWSER to start a Browser in Windows which will provide Training information for Users. I'm doing this by using 'T' type menu entries to Call a Report Transaction to call the FM but this resets the original SAP transaction (as if you'd typed /N in the OKCODE). This is possibly becuase my calling transaction is not in a new task. I can't find a suitable Exit in SMOD as an alternative.
    How can I invoke a Browser Window from any screen (that a User might use) without resetting the calling transaction?

    A

  • How do I open a new browser window from Flash

    I wish to open a new browser window from Flash and when the new window closes to return to the location from whence I started.
    ThomasChen

    The command to open a new window would be the "_blank" part of a command to link to a web page in the code below.
    navigateToURL(new URLRequest("http://www.anothersite.com", "_blank"));
    As far as the new window closing and getting back to where you were in the original window, I don't understand where that original window might have gone to... You should be wherever you last left it.

  • Open new browser window from Hyperlink in BIP PDF output report?

    Hello,
    Is there a way to open a new browser window from Hyperlink in PDF report?
    Thank you all in advance.
    MT

    Dear Friend,
    It is not supported for PDF Report. But below links helps you, to accombish this task in PDF report.
    [url http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html]http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html
    Thanks & Regards
    Ahamed Rafeeque Cherkala

  • How can I open a new browser window from UIX?

    I need to open a new browser window from an event handler. How that can be done? HELP!
    Thanks!
    Martin Patrici

    HTML doesn't really let you do this on the server side; the client is in charge
    of creating new windows, not the server.
    If you know that clicking a certain link/button, etc. will always raise a new window,
    then you should use Javascript or "targetFrame" accordingly.
    If the decision will only be made on the server side, then you could reload the current
    window, only this time use an "onLoad" on the <body> to raise a window.

  • Close a browser  window from a servlet

    I am newbie and am trying to close the browser window from my servlet without prompting as my servlet is designed to run as a batch app.
    The servlet is invoked by a scheduling agent and performs the batch function , but leaves the browser window open . I
    need help
    Thanks
    VK

    I am newbie and am trying to close the browser
    window from my servlet without prompting as my
    servlet is designed to run as a batch app.
    The servlet is invoked by a scheduling agent and
    performs the batch function , but leaves the browser
    window open .I don't see the problem with that. The users can easily close the browser if they want to. It's possible that some Javascript could be used to close the browser window but it's user-unfriendly and shouldn't normally be done.

  • Calling a new Browser Window from Web Dynpro Application - Empty Context

    Hello,
    I want to open a view in a new browser window, and followed the same way which is described in this thread:
    Open view in new browser window
    My first try was creating two applications, which refer to the same Component Controller. The opening of a new browser window is triggered by an action, which is called in the other application. As both applications have the same Component Controller, I thought, the context content has to be the same, but actually the context attributes are empty after opening of the new window.
    In my second try I created two applications with two different Component Controllers, mapped via embedded Interface Controller. The effect is the same - I have no context content in the view.
    Please, can anybody help me?
    Thank you in advance.
    Ilona Seifert

    I done something like this:
    [code]
    try {
    strURL =
         WDURLGenerator.getApplicationURL(
                        "$<b>PROJECT_PATH</b>$/$<b>PROJECT_NAME</b>$",
                                            "$<b>APPLIC_NAME</b>$");
    } catch (WDURLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
    strURL += "?par1=";
    strURL +=  var1;
    strURL += "&par2=";
    strURL +=  var2;
    strURL += "&par3=";
    strURL +=  var3;
    [/code]
    and after i retrieve them:
    [code]
    Var1Value= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var1");
    [/code]

  • Opening a new browser window from flash

    Does anyone know of a method fo opening a link in a new
    window in firefox from within flash that isn't blocked by the popup
    blocker. It seems like the security in FF 2.0.0.6 (I'm on 2.0.0.11)
    has been tightened to prevent any _blank or window.open calls from
    flash getting through. I've tried the standard getURL, fscommand
    and ExternalInterface call to a javascript window.open method.
    Nothing now works.
    I understand the need for the popup blockers, but this is a
    legitimate popup only invoked on user interaction (click) - the
    same window.open call in an onClick event outside of flash works
    fine and I guess it is blocked from within flash because there is
    no way of knowing if the call is invoked from user interaction or
    automatically - but seems a shame.
    So any other way of getting a new browser window to open from
    within flash in firefox?

    Use target="_blank" in your form declaration.<FORM METHOD=POST ACTION="someAction" TARGET="_blank">The _blank keyword tells the browser to load the results in a new window.
    If you need more control over your window (size, address bar, etc.) you'll need to use javascript.<SCRIPT>
    function submitForm(windowName){
       newWin = window.open("",windowName, "menubar=no,resizable=no,...");
       document.myForm.target = windowName;
       document.myForm.submit();
    </SCRIPT>
    <FORM NAME="myForm" METHOD=POST ACTION="some.jsp" TARGET="">
    <INPUT TYPE=BUTTON VALUE="Submit" onclick="submitForm();">
    </FORM>

  • Getting hang/crash problem when I try to close browser window from applet

    I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded.
    The Applet window is a PopUp window from one of my application's window. First time I start my application and load that Applet the button works fine. It calls the Javascript method and the Method closes the window using the self.close() method.
    But now if I open the applet window again and click on the button to close the windows, it hangs. I put in trace statements and saw that it hangs on JSObject.getWindow() window.
    I am using JDK Plugin 1.4.2_07 and 5.0 , if I work out on IE browser, it works fine.But when I use firefox or mozilla it gives problem of hanging/crashing.
    Note that in case of 1.4.2_07 this problem experienced some times but in case of 5.0 it gives always for other than IE browser.
    Please, if somebody could give me some clue about why this would happen, I will really appreciate that. and code related to this is given below
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class TestApplet extends JApplet implements ActionListener{
    protected JButton closeButton = null;
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    this.closeButton = new JButton("Close Browser Window");
    this.add(this.closeButton);
    this.closeButton.addActionListener(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    alreadyClosed = true;
    TestApplet.this.stop();
    frame.show();
    public void actionPerformed(ActionEvent ae){
    stop();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    frame.dispose();
    closeLaunchedBrowser();
    System.gc();
    System.runFinalization();
    private void closeLaunchedBrowser() {
    final TestApplet thisObject = this;
    Runnable r = new Runnable() {
    public void run() {
    try {
    JSObject win = (JSObject)JSObject.getWindow(thisObject);
    if (win != null && win.toString() != null) {
    //win.eval("top.opener=self;self.close();");
    //win.call("close", null);
    win.eval("self.close();");
    } catch (Exception e) {
    Thread t = new Thread(r);
    t.start();
    Thanks.

    I am waiting for any reply. I have tried for all these below options still I am getting Problem. I heard this is because of javascript, it wont call methods more times .Thats
    why I need other than JSObject or java script solution.If some one know anything about this or any modifications I have to made for the below options to avoid that problem please let me know.
    // URL durl = new URL(thisObject.getCodeBase(), "test/CloseMe.htm");
    // System.out.println("URL :" + durl.toString());      
    // thisObject.getAppletContext().showDocument(durl);
    //     thisObject.getAppletContext().showDocument(new URL("javascript:window.close();"), "_self");
    //win.eval("top.opener=self;top.close();");
    //win.call("close", null);
    //Object[] args = { "close", new Integer(50) };
    // win.call("setTimeout", args);
    //win.eval("setTimeout("close", new Integer(50));");
    If it is the problem of JRE I just need it should work on 1.4.2_01 or higher.
    thanks.

  • Problem in Closing Browser window from an Applet.

    I have wriiten a small Applet progarm that calls a Javascript function in the opening window, to close the window in which it is loaded.The Applet window is a PopUp window from one of my application's window.
    First time I start my application and load that Applet and then close the frame window,it works fine that the browser window will close, when the frame window is closed.It calls the window closing event in that applet stop method is called and In stop methd a closeLaunchedBrowser method will called this has a Javascript method and the Method closes the window using the self.close() method.
    But now if I continue this process of launching applet and then closing frame window, initial 1 or 2 steps it has know problem when I continue this, after 3 or 4 steps, it result in browser hang/crash.
    I am using java version 1.4.2_01 or higher and IE or Firefox(any other NetScape based) browser to load applet.It works fine with IE but getting problem in case of Firefox(any other NetScape based).
    The error dialog information and related event log generated is shown below :
    The dialog which is displayed before crashing of firefox has information :
    "firefox.exe has generated errors and it will closed by windows.you will need to restart the program.
    An error log is being created."
    The error log information :
    Source : Browser Event ID: 8032
    "The browser service has failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{611A64A2-8F4B-409E-9AB2-0D9BF741E791}. The backup browser is stopping.
    The code related to this is given below.
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class TestApplet extends JApplet {
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    TestApplet.this.stop();
    frame.show();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    closeLaunchedBrowser();
    System.gc();
    System.runFinalization();
    private void closeLaunchedBrowser() {
    final TestApplet thisObject = this;
    Runnable r = new Runnable() {
    public void run() {
    try {
    JSObject win = (JSObject)JSObject.getWindow(thisObject);
    if (win != null && win.toString() != null) {
    //win.eval("top.opener=self;self.close();");
    //win.call("close", null);
    win.eval("self.close();");
    } catch (Exception e) {
    Thread t = new Thread(r);
    t.start();
    }If any one know solution regarding how to aviod this crash of browser please let me know. I will be very thankful to you.
    Thanks.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • Close browser window from applet

    I have a simple applet that is called
    from another application through HTML.
    When the applet is done, I'd like to have
    it exit and close its browser window.
    How is this done? I tried System.exit(),
    and that didn't do it. Neither did
    destroy().

    The only thing I can think of is to have a function defined in JavaScript on your html page and have the applet call the method. For you to be able to do this you will have to have a MAYSCRIPT set in your applet tag.
    IE:
    <script language="JavaScript">
    function closeWindow()
    window.close();
    </script>
    <APPLET code="XYZApp.class" codebase="html/" align="baseline" width="200" height="200"
    MAYSCRIPT>
    </APPLET>
    In your applet:
    Make sure that you import the following.
    import netscape.javascript.*;
    JSObject win = JSObject.getWindow( this );
    win.call( "closeWindow", null );// Calls the closeWindow() on the HTML page.

Maybe you are looking for

  • WRT54G v5 freezes every ~48 hours, advice?

    Greetings! I purchased this router around summer of 2006, and it worked flawlessly without a reboot up until around the end of December. I didn't have physical access to it until early January, when I disconnected its power to rewire, and then reconn

  • Simple question about flex and AS 3.0

    Hi, this might sound like a simple question so I apologize... I have both a copy of flex 2 and 3, and i want to simply code in AS 3.0 not mxml. I referred to the help of both flex 2 and 3, and all i could come up with is "you can add dynamic behavior

  • OID 10.1.4.2.0 for Linux Preview Install

    I am trying to install the preview. I am using example provided in OID-LinuxWorld-Demo-OAS_viewlet_swf.html. Any insight on why this fails? see below... [oracle@akaoradev-vm1 ~]$ su - root Password: [root@akaoradev-vm1 ~]# up2date oracle-oid Fetching

  • Webdynpro ABAP Caching Problem in Portal

    Hi All, We have developed custom applications using Webdynpro - ABAP, using FPM and accessing those applications through SAP Netweaver Portal 7.0. I have deactivated all the caching techniquies in Portal @ iview level and Page level, Portal Runtime a

  • VERY Pleased with my Photo Books!!!!

    Since discussion boards often are overweighted with critical sentiments and questions of problems, I thought it would be worthwhile posting that I created two separate Photo Books, one of my daughter and wife, and another of my Father-in-Law's work o