URL Validation in BSP

Hi All,
      I actually have four URL's,and only one of it will work at anytime.I use the AJAX language to determine the validity of the URL.But now I want to call only the working one among the four.That means,if the first one does'nt work then call the next one and so on.How do I do this?
Regards,
Ramindra

Hi,
You code use the FM described in
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/just%20browsing%20around.article
Eddy
PS. Reward the useful answers and you will get <a href="/people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

Similar Messages

  • BSP Exception: Das Objekt search.htm in der URL /sap/bc/bsp/sap/webserviceb

    Hi
    I am trying to open web service using outside in approach
    http://host:httpport/sap/bc/bsp/sap/webservicebrowser/search.html
    its giving exception sayin
    BSP Exception: Das Objekt search.htm in der URL /sap/bc/bsp/sap/webservicebrowser/search.htm ist nicht gültig
    any add ones to be applied?
    Regards
    shekar chandra

    Hi,
    Please add the follwing inthe hosts file which is located on ur local desktop
    C:\WINDOWS\system32\drivers\etc\hosts
    open it with notepad and add the following,
    <ip adress of the SAP server><tab><Host Name of SAP server>
    eg:
    192.168.1.1     sapproduction     
    Log off and login in windows.
    regards,
    Arun
    Ps:Reward points are welcome

  • Regex for URL Validation

    HI I am validating a field which takes a url as input from the user.So the url may contain http,https,ftp links or the user may specify the ip address.So can anyone please help me out to create a suitable regex for that.I just need to check the validness of link and not that it exists or not.

    here i have changed the regex as suggested by you but
    it returns true even for http://com.com@
    which is invalid.
    So it did not worked :-(It did not work, because you did not use it correct:
    public class Foo {
        private static boolean isValidUrl(String url) {
            return url.matches("(https?|ftp)://www\\.\\w+\\.\\w+");
        public static void main(String[] args) {
            String[] urls = {
                    "http://com.com@",
                    "http://www.com.com",
                    "http://www.com.nl",
                    "http://www.com.co.uk",
                    "http://www.com"
            for(String url : urls) {
                System.out.println(url+" valid? "+isValidUrl(url));
    }

  • URL validation - regular expression

    Hello,
    I searched but didn´t find.
    I need a simple method: isValidUrl
    I tried "new URL(url)", getting error, but it allows a simple url with space... I tried too org.apache.validator but it brought me problems with related .jar...
    I got one validation for e-mail, that work very well using regex. Does anyone have URL validation using regular expression?
    Thanks.

    ^(http|https|ftp)\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\\\+&%\\$#\\=~])*$
    It seems to work.Are you sure?

  • URL of an BSP application

    Hi,
      I wanted to know is there any way to get the URL of an BSP page from any table or any function madule that can be used for this purpose.
    thanks,
    Ganesh

    i guess you want to get the url of the BSP application programatically, if yes you can follow the following method.
    data: url type string .
    DATA:  params TYPE tihttpnvp.
      CALL METHOD
          cl_http_ext_webapp=>create_url_for_bsp_application
          EXPORTING
            bsp_application      = '<BSP application name'
            bsp_start_page       = <start page e.g default.htm>
            bsp_start_parameters = params " any parameter you want to pass along with url
          IMPORTING
            local_url            = url.
    Regards
    Raja

  • How to set up use of relative URLs for a BSP application

    Dear all,
    I need to access a BSP application through our external portal.
    This is failing because generated URLs are absolute URLs (they mention physical server name, not known of course on the internet) where they should be relative URLs (they use external portal URL as prefix).
    How to set this up?
    I'm logged on http://myportal.com/irj/portal and want to call a BSP application. To build this page, my internet client (Internet Explorer) tries to get elements from the server. Looking at HTTP trace, I can see that my IE is trying to reach the physical server, not known on internet of course, then page loading fails.
    Ex absolute URL : http://myservername.domain.com/sap/bw/[...]/image1.gif
    This is the behavior I can see at the moment.
    Relative URL : http://myportal.com/sap/bw/[...]/image1.gif
    This is what I'd like to see.
    Many thanks in advance for your help.
    François

    Any idea ?

  • How to change the port in the URL of a BSP Iview

    Hello,
    we have several appraisal templates released in our R/3 system and we can access them by the portal.
    We are changing our systems and we are implementing a load balanced in order to improve the connections with the portal. So we need to know how can we change the port of the server that appears in the URL when we go to MSS ->teamviewer and select one appraisal to see the information of the template.
    We need to change it and indicate the port of the load balanced http://emsapl404pre.endesa.es:8000/sap/bc/bsp/sap/hap_document...) not the port of one of the WAS server as we have now http://emsapl404pre.endesa.es:8302/sap/bc/bsp/sap/hap_document...)
    Thanks in advanced.
    Best regards.
    Seshen

    Hi,
    Just view any BSP Application in SE80 and the click on Utilities(M)->Settings.
    This will fgive you option to change URL and port number of the URL..
    It will be under the Business server Pages tab in the settings window.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • URL Link to BSP with MVC

    Hi,
    I have a BSP with MVC design.
    I assume that the URL link to the application is the URL I see when I go into the Controller page under the BSP in SE80.
    Is that correct?
    The problem is that when I take that URL and copy paste it into a web browser, I get the first view but when I click on any button, the controller class is not called.
    If I do a right click on the BSP and select the TEST option, all is working perfectly.
    Do you have any idea why this is happening or do I do something wrong?
    Thanks,
    Itay

    Hi Stefan,
    Same issue i have as well.
    My Understanding is, in NWBC desktop, if you open a non sap (eg: html) page, NWBC becomes an IE Browser.
    That means you are now out of SAP for that tab (with html page) and whenever you try to launch any SAP transaction (using the method from HTML) it will launch in a new window and ask for Login.
    May be Experts like Samuli Kaski & Melinda Ludanyi can put some light on it.
    But, I have one more solution for this which is partially working in my case. May be helpful in you case as well.
    Issue: From some SAP transaction in NWBC (say tab A), you are launching the html page (say tab B) and then want to launch another SAP transaction (Say tab C) from html.
    Solution: Embed the HTML in SAP using HTML Viewer class and launch SAP custom transaction using the interface IF_LSAPI. It will launch it in new tab as a sap transaction with your html page.
    Now if you want to launch the SAP transaction from your html page (Which is embedded in SAP custom transaction) you can use HTML Viewer class Events and you can pass parameters as well. Re use the same interface IF_LSAPI and launch it in new tab
    In my case i am facing problems as the web developer has so many things on java script and they are not working properly. He is working on it and i am hoping it will be fine.
    Regards,
    Nik

  • Group Boxes and Validation in BSP

    Hi Seniors,
    We have a requirement where in:
    1.  we need to create two group boxes side by side on the page. I am using page fragments in the application. I have created the fields and made the row alignment look like the fields are of two different boxes (no box separation, it is only the row & column alignment). How to attain two boxes side by side in BSP.
    2. There is a check box above the two group boxes which if checked, should leave the group boxes input enabled. Else if not checked, one group box should be disabled for input. How to attain this validation.
    I have searched through sdn but not any with such or similar requirement on group boxes. Your help is highly appreciated.
    Thank you in advance,
    Chaitanya

    along with type=date use doValidate="TRUE" this will enable a javascript validation for the input. The users will not be able to submit the form without correct date type.
    Regards
    Raja

  • Update on question for parameters in URL opening a BSP iview

    Hi again gurus.
    I wanted to do an update on this thread: How do you create a URL with parameters for a BSP iview? but choose to do the update as this new question instead.
    Well, in order to open a BSP iview from an external page shown in an Application Integrator iview in our portal AND FILL IN A FIELD, a link of this type is used on the external page:
    http://<server:port>/sap/bc/bsp/sap/z_purchase_req/process.htm?System=ABG_R3_ARD&mnr%3D9780198603641
    If you read the other thread you will see that I couldn't use a link of the following type since it opened up something like the stuff found under "System Administration > Support > SAP Application" and there asked for BSP application and start page!
    http://<server:port>/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.BSP?System=ABG_R3_ARD&SAP_TCode=Z_PURCHASE_REQ&STARTPAGE=process.htm
    But the first link works so far as it opens up the correct transaction BUT the parameter won't get into the field. Does anyone know how to "format" the parameter correctly? When you open an iview of Transactional type you can use a URL like this (and it works also with writing parameter into a field):
    http://<server:port>/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=ABG_R3_ARD&SAP_TCode=ZARTS2&SAP_Dynp_Params=S_MATNR-LOW%3D9789146212720
    It's the part ...&SAP_Dynp_Params=... that is of interest here. Should it also be used when working with URLs opening BSP iviews or not? Or should something similar be used instead? The name of the field "mnr" is correct in the BSP URL, at least I think so, I found it in the Web Application Builder under tab "Page Attributes". I have tried both "=" and "%3D" in the URL but neither works.
    Any suggestions about the parameter format for this link or another completely different but working URL format would be extremely appreciated!
    Best regards
    Benny Lange

    the Appintegrator Documentation says you can use something like <User.[AttributeName]>, so <User.email> and <User.company> (not sure about capital letters) should work.
    Hope that helps.
    PD

  • Calling a Dynamic URL in a BSP

    Hi all,
    We are calling a BW Web Report from a BSP application . Presently we have hardcoded the BW Web Report but when we move from Devlopement to Quality and subsequently to Production we would need to pass the respective URL’s.
    One way of achieving the above, is to write Case statements specific to Development, Quality and Production System -IDs, Is there any other way in which we pass the  URL’s dynamically to the BSP.
    Thanx in advance.

    to dynamically construct BW web report url you can do the following
    call the following FM
    CALL FUNCTION 'TH_GET_VIRT_HOST_DATA'
       EXPORTING
         protocol             = 1 " 1 for http 2 for https
         virt_idx             = 0
      LOCAL                = 1
      IMPORTING
        hostname             = server
        port                 = port
      EXCEPTIONS
        not_found            = 1
        internal_error       = 2
        OTHERS               = 3 .
    now you can use something like below.
    concatenate `http://` server `:` port
    `/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&INFOCUBE=<cubename>&QUERY=<queryname>` into bwurl.
    Hope this is clear. If not do get back.
    please note that if you are using webdispatcher then you may have to follow a different approach.
    Regards
    Raja

  • How to check URL validation in webdynpro?

    I get the error message in the webdynpro application of nw04 as followed:
    com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=file:
    wdfd00184026a\ECM\CMIS\PlugFest
        at com.sap.tc.webdynpro.serverimpl.core.url.AbstractURLGenerator.checkURL(AbstractURLGenerator.java:699)
        at com.sap.tc.webdynpro.services.sal.url.core.URLGeneratorInternal.checkURL(URLGeneratorInternal.java:390)
    Does the system provide the function to checkURL so as to avoid the error?
    Thanks for help!

    Hi,
    You can create a simple type with built-in type as String. Then maintain a format as ##:##. But this will not restrict the user from entering junk value on the client side, a validation will be performed in the next request-response cycle.
    Regards,
    Satyajit.

  • Live Office -Webservice url validation KO

    Hi All,
    I have installed Live office on my laptop, and logon the MS office applications, I can see the Live office option on menu bar.
    I have opened MS Excel. when I set webservcie URL.
    The web service url is :
    " http://myserver:8080/dswsbobje/services/session"
    It shows "Validation failed".
    How I can understand why doesn't works fine validation. Wich are the steps to verify right "LiveOffice" configuration on "Server/Client" side ?
    P.S:
    "I use SAP Netweaver 7.1 Web-Application Server"
    Edited by: alchiovini on Sep 13, 2010 5:24 PM

    Hi All,
       I just find the solution, the connection beetwen Liveoffice and Business Objects XI 31 now works fine. The problem has been
        indentified on proxy settings.
    Best Regards,
    alchiovini
    Edited by: alchiovini on Sep 14, 2010 4:09 PM

  • "!" in URL leads to BSP error page

    I use WebAS 620 SP49. Recently, some SPs and Kernel Updates were installed.
    Before that, my BSP application could be called from these 3 URLs:
    https://bla.com/bspapp/default.htm
    https://bla.com/bspapp/
    https://bla.com/bspapp/!
    We needed to support the "!" because some older users still use the link
    https://bla.com/oldapp/!
    which was the address of a predecessor application and which is now redirected to the new URL.
    Now, the URL with the "!" doesn't work anymore after the upgrades.
    Does anybody why this is or what I could do as a workaraound to make this link work again?

    This one may be related to a similar issue where Knowledge base articles sometimes return a "Page not found" in Safari (Windows or Mac versions) even though the knowledge base articles in question are all present and correct.
    It seems to hit me in cases where Safari has been open/running for long periods of time. (In the order of days usually.) Next time your symptoms hit you, try closing all open Safari browser windows, and then relaunching Safari. Are you able to get through to the log in page?
    (Another thing worth a try if no joy with that is just rebooting the Mac.)

  • Disable URL-Mangling in BSP Runtime

    Hi Experts,
    we decided to provide some web applications für mobile devices. Currently (and maybe never) WD ABAP does not support mobile devices. Therefore we are looking for alternatives.
    There are a lot of threads in the net where other people discussed the same topic and several decided to use BSP. We wanted to use BSP and jQueryMobile but we noticed that there are some problems because of URL-Mangling / rewriting.
    Do you have any idea if it is possible to disable URL-Mangling without modification? We already thought about an own request handler in TA SICF but in this case we also need an own CL_BSP_RUNTIME (to disable the coding in method on_check_rewrite). However this is difficult because some standard BSP runtime classes (RUNTIME, NAVIGATION...) are marked as final, so it isn't possible to inherit from them and we don't want to copy / redevelop all relevant classes.
    Furthermore there are other disadvantages like:
    - many redirects (problematical with low-bandwidth connections)
    - client cookie handling is more difficult
    Do you have any idea?
    Kind regards
    Danny

    Hello!
    I've done quite a lot of BSP development together with and without javascript frameworks like jQuery. It's possible to create a scenario without URL mangling if you set the system architecture in a specific way. I could speak a lot about this setup as it works really well! Here is a quick guide to get started:
    Step 1:
    The BSP runtime isn't really used at all. Create a BSP application but only store MIME objects in it. The MIME objects isn't URL mangled! The drawback is of course you can't do server side ABAP in your HTML documents. On the positive side, any Web Developer can create the HTML and javascript without ABAP programming skills. SAP functions as a static web server with all the benefits of the ICM cache and transport system.
    Step 2:
    Add an external alias in SICF for the BSP application. Like pointing "/myapp" to "/sap/bsp/sap/zmyapp_v001". The external alias is configured with a service account (without any authorizations) with authentication set to "Required with Logon Data". All fields should be specified (Client, User and Language). Now, any anonymous user can request the HTML files without interfering with logon data.
    You don't need an external alias, but they come in handy to have nice-looking URLs; the possibility to change their target when you have multiple versions at the same time; and you can create multiple alias for the same application with different logon data. Like "/myapp/english" if you want. Or "/myapp/client800". Or "/myapp/latest", "/myapp/version1" etc.
    Step 3:
    Create a custom HTTP handler for your business data and assign it to a node in SICF. For example "/customers/orders/get" or whatever you find appropriate for your app. Since you now have your own handler, the BSP runtime isn't involved and no URL mangling exists.
    The handler returns data in a suitable format for Web Developers (read: JSON).
    Protect this node with security that matches the flexibility required from the frontend. I usually set another service account for this service and handle authorization myself; returning HTTP status codes like 403, 200 to the Web Developer (but not 401 as it's quite difficult to handle in AJAX scenarios). In it's most simple form you can provide username and password as form fields and perform a user switch in the handler for every request, effectively changing SY-UNAME in the handler ensuring that the correct user context is used.
    Best regards,
    Mikael Gurenius
    SAP Solution Architect (Mobility)
    PS: MIME objects are of course served with URL Mangling if referenced relative to the BSP application. You can avoid this (for example for the Apple icons) by always linking your MIME objects from the root. Get the application path using code or type manually. Like
      <link rel="apple-touch-icon-precomposed"
    sizes="57x57"
    href="<%= lv_path %>/icon_57x57.png" /> where lv_path is "/myapp/images" or "/sap/bc/bsp/myapp/images". If you do this, you can have URL Mangling (and do ABAP development) in your BSP pages but still have "clean" URLs for MIME objects.

Maybe you are looking for