How to open a web page from a BSP ? Or swap from the actual URL to another?

Hi,
I have a BSP, executing some data loading. It works fine.
I am trying to enhance it by adding a call to another URL, at the end of the program.
The same code works when I execute it from transaction SE38. However, when this is executed from the BSP itself, the return code of the function CALL_BROWSER is 2.
I made som debugs, and the CALL_BROWSER function executes another function which is WS_QUERY. And there, SAP seems not being able to find wich system it is running on.
Has someone done that before?
Here is the code of my BSP (the same that works in SE38):
DATA : appname      TYPE string,
       ls_page_name TYPE string,
       cb_true      TYPE boolean,
       cb_false     TYPE boolean,
       url          TYPE string,
       c_url(2054)  TYPE c.
    MOVE : 'ZPC_STKVTES'     TO appname,
           'zpc_stkvtes.htm' TO ls_page_name,
           'X'               TO cb_true,
           '-'               TO cb_false.
    CALL FUNCTION 'UPWB_GET_APPLICATION_URL'
      EXPORTING
        application          = appname
        page                 = ls_page_name
        ib_additional_params = cb_true
        ib_in_subgui         = cb_false
        ic_preview_type      = 'B'
      IMPORTING
        url                  = url.
    CONCATENATE url '&bps-design_messages=X' INTO c_url.
    CALL FUNCTION 'CALL_BROWSER'
      EXPORTING
        url                    = c_url
        window_name            = ' '
        new_window             = 'X'
      EXCEPTIONS
        frontend_not_supported = 1
        frontend_error         = 2
        prog_not_found         = 3
        no_batch               = 4
        unspecified_error      = 5
        OTHERS                 = 6.
Regards
Laurent
Message was edited by: Laurent THIBERT

> Thanks, but can I use such technology within Abap?
YES with report programs or dialog programs but not in BSP framework
> I use the Event OnProcessing of the BSP to execute
> many tasks, and then only I want to open or swap to
> antoher URL.
in that case you can either use
navigation->goto_page(<url>) .
or if you want to open the page in a new window.
inoninputprocessing after all your processing done youc an set a varialbe say opennewwindow = 'YES'
and in the layout write this code.
<% if opennewwindow = 'YES' . %>
<script>
      window.open( '<%= url %>', target='_balnk');
      </script>
<% endif . %>
Regards
Raja

Similar Messages

  • How to open a web page in JFrame.

    Please let me know how to open a web page in the Java Frame.

    HTML code can be viewed in any Swing component you want.

  • How to open a web page using indesigncs3  javascript ?

    i cant able to open web pages using this CS3 js.i anyone tell me the syntex?
    thanks
    subha

    Post your question in the forum 'InDesign Scripting'.

  • How to open a web page using HttpConnection class in cs3

    Hi all!
    Can anyone help me how to open a webpage using HttpConnection class in cs3?
    Thanks
    Senthil

    > If any other way to access database? advice me!
    Instead of using http, you are better off writing a command line script (that
    uses bash or cmd.exe or whatever) that does this and then call that script using
    app.system.
    The code is much simpler and far easier to test and debug.
    -X

  • When I open a web page I've built on my computer, the music doesn't play. It will play if I open it in IE.

    I build web pages on my computer and before I updated Firefox I could hear the music when I opened the page. Since I updated Firefox the music will not play. If I open the page in IE the music plays fine. When I go to my website on the internet, the music plays fine. It only happens when I open a page on my computer. I have Windows XP. I have downloaded all the newer plugins but nothing helps.

    You need to specify a MIME type attribute.<br />
    Otherwise Firefox doesn't know which plugin to use.<br />
    Using <b>type="application/x-mplayer2"</b> will use the Windows Media player.
    <pre><nowiki>
    <EMBED src="foldername/wav name.wav" loop="TRUE" HIDDEN="TRUE" type="application/x-mplayer2">
    <embed src="lessons/CarrieUnderwood-LessonsLearned.wav" loop="true" hidden="true" type="application/x-mplayer2"> </nowiki></pre>

  • Why won't Firefox open a web page if there's an apostrophe in the URL?

    When I click on a link and the underlying URL contains punctuation, specifically an apostrophe, I get a page not found error. Both Safari and Chrome handle these URLs seamlessly.

    If it is a server-side problem, why do I have no difficulty when I use Safari? It is difficult for me to argue with them that it is THEIR problem, if the problem exists only for Firefox users. I have seen others comment on it recently also. It seems to me that Firefox needs to change something to allow a link with an apostrophe to resolve properly.
    Thanks for your response, but it does not solve anything.

  • How to open a web page of given url and open one of its link .

    Hi All,
    I need to write a java program which can open a given URL, fill in the form with given input values and submit it, and then can automatically click on a link (or say open one of the links) on the resulting page.
    It is basically what a testing script does.I want to write it in java.
    I am not able to find keywords i can use to google about this topic.
    Any help would be appreciated.
    Thanks,
    Elan

    That's what you do in the browser, but that isn't what your program would do. Follow the tutorial:
    [http://java.sun.com/docs/books/tutorial/networking/urls/index.html]
    Edit: Although now that I notice you used the word "testing script", you might just want to use HtmlUnit instead of programming that stuff yourself.

  • How to open a web page in java in Solaris system

    i can do this in windows:
    String location = "www.sun.com";
    Runtime.getRuntime().exec("explorer " + location);how could i get it in solaris?
    Thanks

    Isn't this question completely outside the scope of this forum ?
    ... this is a forum for Solaris Zones, not Java or software development.
    http://forum.java.sun.com/thread.jspa?threadID=5075398
    Perhaps your query would be more appropriate in one of these other areas of discussion:
    http://forum.java.sun.com/index.jspa?tab=java

  • How do I open a web page in Adobe Reader from ipad2?  I don't see any buttons to click. I'm new user

    How do I open  a web page in Adobe Reader? I got the app for ipad2, but when a page says I need a certain version of AR, I don't know what to do. I'm a new user and don't know if I have to "open" AR and it automatically reads whatever doc I have up on the web, or is it always running and any web page I'm on should show a button to click in order to open the page in AR?

    If a website says that you need a certain version of Adobe Reader, it is probably attempting to detect whether or not you have the Adobe Reader browser plugin installed. This is something that only works on desktop systems where browser plugins exist. Since browser plugins don't exist on mobile, website developers should take care to present different messages and provide different options for downloading PDF's when visited by mobile browsers. I recommend contacting the website owner and requesting that they implement access for mobile devices.

  • Can't open some web pages... DOES ANYONE HAVE A FIX THAT WORKS?

    I'm unable to open certain web pages. The pages will start to open and than the application will just stall. This seems to have coincided with downloading a security update a while back. I've tried downloading firefox and it too will not open these specific pages. I've searched the forum and as of now I can't find a solution. From what I've hear, Apple isn't even acknowledging that there is an issue. I've repaired permissions, deleted Safari plist files, all with no improvement. I know for a fact that it is not my internet connection, as my powerbook can navigate to these sites without any issues, however my powermac seems to have "forgotten" how to open some web pages.
    Any fixes would be enourmously appreciated!

    Thanks for the reply.
    I don't think that reporting the pages to apple would do much good as it's not the pages themselves that are the issue, it's something on my system that prevents them from opening up properly. My laptop will open the pages without any issue, however my desktop isn't able to for god knows what reason. I know others on this board have had similar problems.

  • I have a Mac Air, I opened a web page and it died within a nano second, then I got the beachball for about 40 mins so I turned it off. Now I cant start it up again, I get the chime, the apple a grey screen then I get the pinwheel, it's still going, help

    I have a Mac Air, and I opened a web page in Safari and it died before the page could load, then I got the spinning beach ball for about 40 minutes so I turned it off. Now When I turn it on I get the chime, a grey screen, then the apple, then the pin wheel  -its been going now for an hour.
    Any help greatly appreciated

    There are several ways to back up a Mac that is unable to fully boot. You need an external hard drive to hold the backup data.
    1. Boot into Recovery (command-R at startup; 10.7 or later), from a local Time Machine backup volume (option key at startup; 10.7.2 or later), or from your installation disc (C key at startup; 10.6.8 or earlier.) Launch Disk Utility and follow the instructions in the support article linked below, under “Instructions for backing up to an external hard disk via Disk Utility.”
    How to back up and restore your files
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode by holding down the key combination command-T at the startup chime. Connect the two Macs with a FireWire or Thunderbolt cable. The internal drive of the machine running in target mode will mount as an external drive on the other machine. Copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    How to use and troubleshoot FireWire target disk mode
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • My MBP can't open some web pages

    Hello.
    I have problem with opening some web pages. It doesn't matter on the browser. It happens as in Safari as in Chrome. All browsers are updated. My MPB is updated. Problem is not in router. My gf has the same MBP and she can open the pages which I can't.
    Thanks for any advice.
    Resume:
    Lion 10.7.1, the latest Chrome and Safari, other computers in my network works fine (win/mac), example of page which I can't open: www.adobe.com

    Thanks for the reply.
    I don't think that reporting the pages to apple would do much good as it's not the pages themselves that are the issue, it's something on my system that prevents them from opening up properly. My laptop will open the pages without any issue, however my desktop isn't able to for god knows what reason. I know others on this board have had similar problems.

  • Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Thanks

    Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Here's the example:
    WING
    GAMES
    MAJORITY
    Thanks

    If the third link you posted (the link containing the word "majority") does not look like the following then you inadvertently installed adware.
    That particular page should resemble the following:
    The word "majority" in the third paragraph should not be a link and should not have the green icon associated with it.
    To learn how this may have occurred, and how to prevent it from occurring in the future, read How to install adware
    Most so-called "news" websites are nothing more than entertainment outlets that cater to prurient interests, and contain advertisements that leave the user about three clicks away from installing junk. If you decide to frequent those websites, Safari's "Reader" feature helps minimize that exposure.
    Try it:

  • Opening a web page from oracle

    Hi ,
    How can i open a web page example : "www.yahoo.com" from pl/sql ?
    One more thing , if this was possible is there a way to provide the username/password to the website to be logged on right when the page is browsed ?
    also how does Oracle know of the browser that is going to be used ?
    Thanks...

    CREATE OR REPLACE PROCEDURE show_url
        url      IN VARCHAR2,
        username IN VARCHAR2 DEFAULT NULL,
        password IN VARCHAR2 DEFAULT NULL
    ) AS
        req       utl_http.req;
        resp      utl_http.resp;
        name      VARCHAR2(256);
        value     VARCHAR2(1024);
        data      VARCHAR2(255);
        my_scheme VARCHAR2(256);
        my_realm  VARCHAR2(256);
        my_proxy  BOOLEAN;
    BEGIN
    -- When going through a firewall, pass requests through this host.
    -- Specify sites inside the firewall that don't need the proxy host.
      utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
    -- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
    -- rather than just returning the text of the error page.
      utl_http.set_response_error_check(FALSE);
    -- Begin retrieving this Web page.
      req := utl_http.begin_request(url);
    -- Identify ourselves. Some sites serve special pages for particular browsers.
      utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
    -- Specify a user ID and password for pages that require them.
      IF (username IS NOT NULL) THEN
        utl_http.set_authentication(req, username, password);
      END IF;
      BEGIN
    -- Start receiving the HTML text.
        resp := utl_http.get_response(req);
    -- Show the status codes and reason phrase of the response.
        dbms_output.put_line('HTTP response status code: ' || resp.status_code);
        dbms_output.put_line('HTTP response reason phrase: ' || resp.reason_phrase);
    -- Look for client-side error and report it.
        IF (resp.status_code >= 400) AND (resp.status_code <= 499) THEN
    -- Detect whether the page is password protected, and we didn't supply
    -- the right authorization.
          IF (resp.status_code = utl_http.HTTP_UNAUTHORIZED) THEN
            utl_http.get_authentication(resp, my_scheme, my_realm, my_proxy);
            IF (my_proxy) THEN
              dbms_output.put_line('Web proxy server is protected.');
              dbms_output.put('Please supply the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the proxy server.');
            ELSE
              dbms_output.put_line('Web page ' || url || ' is protected.');
              dbms_output.put('Please supplied the required ' || my_scheme ||
                ' authentication username/password for realm ' || my_realm ||
                ' for the Web page.');
            END IF;
          ELSE
            dbms_output.put_line('Check the URL.');
          END IF;
          utl_http.end_response(resp);
          RETURN;
    -- Look for server-side error and report it.
        ELSIF (resp.status_code >= 500) AND (resp.status_code <= 599) THEN
          dbms_output.put_line('Check if the Web site is up.');
          utl_http.end_response(resp);
          RETURN;
        END IF;
    -- The HTTP header lines contain information about cookies, character sets,
    -- and other data that client and server can use to customize each session.
        FOR i IN 1..utl_http.get_header_count(resp) LOOP
          utl_http.get_header(resp, i, name, value);
          dbms_output.put_line(name || ': ' || value);
        END LOOP;
    -- Keep reading lines until no more are left and an exception is raised.
        LOOP
          utl_http.read_line(resp, value);
          dbms_output.put_line(value);
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
        utl_http.end_response(resp);
      END;
    END;
    SET serveroutput ON
    -- The following URLs illustrate the use of this procedure,
    -- but these pages do not actually exist. To test, substitute
    -- URLs from your own Web server.
    exec show_url('http://www.oracle.com/no-such-page.html')
    exec show_url('http://www.oracle.com/protected-page.html')
    exec show_url('http://www.oracle.com/protected-page.html', 'scott', 'tiger')Reference
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_web.htm#BGBGBFJJ
    !http://download.oracle.com/docs/cd/B19306_01/dcommon/gifs/oracle.gif!

  • Problem opening live web page (url) from within keynote

    hi.
    i encountered this problem during a recent presentation. i have a standard two-monitor set-up, on my laptop viewing notes etc and presenting on the attached monitor. the transitions between my slides are all set onClick.
    so, when i encounter a hyperlink in my presentation (of the web page type), when i click on it, i am not taken to the web page, but rather to the next slide.
    how do i avoid this? how do i make keynote follow the hyperlink -- i.e. open the webpage during the presentation?
    many thanks in advance for your tips.

    use '_blank' as parameter, not '_self'.
    Guy Dallaire (guest) wrote:
    : Hi,
    : We would like to open a Web Page from a forms running in
    : client/server as well as from a form runningover the web.
    : Over the web, we plan to use SHOW_DOWUMENT (Even tough it
    seems
    : broken, on forms 6.0, the only way we have got it working was
    by
    : using the parameter that overwrites the current page (the
    form),
    : we cannot have it open an URL in another window)
    : In C/S mode, the SHOW DOCUMENT does not work. What is the
    proper
    : way to lauch an URL in a browser in C/S mode ?
    : Is there a way to determine if we're running in CS mode or Web
    : Mode ? We would like to use the same code both on the web and
    in
    : C/S
    : Example pseudo code:
    : if (Running in CS Mode) then
    : open the URL using C/S method
    : else
    : open the URL with show dowument
    : fi
    : Thanks
    null

Maybe you are looking for