Retrieve Portal URL in BSP

Is there a Function Module or ABAP Object I can use within a BSP that will give me the base Portal URL in which my BSP is being rendered?  I'm specifically looking for something that will return the following URL pattern:
http://servername:portnumber/irj/portal
Reason I ask is b/c I need to redirect back to the Business Partner page within Portal CRM, however, within the BSP, the cl_bsp_runtime=>construct_bsp_url method is returning the BSP application URL and not the Portal URL.
Thanks!

Hi Matthew,
I don't know of a function module or method that helps you on getting the path to the portal but maybe the following hints help you to find a solution.
1. Get the referer out of the Request by using the method request->get_header_field during the first call of your application.
2. There are 4 tags available in the bsp-extension that might help you to solve your issue. The elements are called: portalEvent (receive events), portalNavigationToObject, portalNavigationRelative and portalNavigationAbsolute. There is also a test Application for the bsp-Tags available called SBSPEXT_BSP where the raising of portal events is shown.
3. Use client side scripting to determine the url of the surrounding frame.
4. Try whether the methods GET_EXTERNAL_THEME_ROOT or GET_EXTERNAL_STYLESHEET of the runtime help you to get hold on the portal url.
These are just hints. More than the portalEvent tag I have never used.
Hope that helps.
Best Regards
Michael

Similar Messages

  • Retrieve portal url dynamically.

    Hi,
    Could anybody pls let us know how to identify the portal Url dynamically using a function module or SAP Table?
    We want to put this URL in the notification e-mail so it is dynamic when the object is moved to Quality and production systems.
    Thanks in advance.

    One way to make Portal URL dynamic is to create a ztable with fields ABAP system id and portal URL.
    Select Portal URL from this table based on the sy-sysid.
    By this way you dont have to change your code. Just change table entry on each server.
    Hope this helps!
    Monalisa

  • URL for BSP from Work flow(Portal)

    Hi .,
    Please let me know how we can pass a URL for BSP from Email . Which would be initiated from Work flow(portal)   .
    thanks
    Sreenivas reddy

    Hi,
    I hope the below links will help you.
    How to open BSP page when clicking a URL from E-mail.
    Navigating to a BSP (URL) from PCUI
    Thanks,
    Khushboo.

  • E-Recruiting - BSP Application name from E-Rec portal URL

    Hi,
    How can we find out the name of the BSP application from the E-Rec portal URL? I need to do a change to the activity and unable to locate the exact BSP application name for that. Any help will be greately appreciated.
    Thanks in advance.
    Naresh

    Hello Naresh,
    If you want to integrate the BSP application and want to know  how this application is generated, then you can have a look over the Report rcf_generate_url, This generates the URL for Recruiter, Candidate etc.
    otherwise If you want to see which application is running then you have to check with the application starting with HRRCF.
    Best Regards,
    Deepak...

  • How to catch URL parameter from Portal URL in Web Dynpro iView

    Hi All,
    I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
    I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
    String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
    When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
    Your urgent help will be highly appreciated.
    Warm Regards,
    Shubho

    Hi Shubhadip
    Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
    You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
    But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
    I hope you find a solution.
    Regards
    kk

  • SSO is not working for an Alias URL but is working for original portal URL

    Hello,
    We have a BSP running inside the portal and expects authentication.
    When I run this BSP using the portal regular address everything is working OK and SSO is working after logging into the portal.
    At next step, we have configured an alias for the portal URL at the DNS Server.
    When activating the BSP from the alias URL it asks for 2nd authentication. Meaning, SSO is not working after logging into the portal.
    I have activated an HTTP trace in order to see why and it seems like when running it from the alias name it recognizes it as a different domain and I assume this is why the authentication is coming up.
    I would like to suppress this for the alias URL but don't know how.
    I found this UME property on the server:ume.logon.security.relax_domain.level
    This UME property controls the amount of sub domains to remove from the server name to obtain the domain for which the logon ticket is valid.
    I have changed this property from its default value 1 to 3 (and restarted the server of course) which, in our case, leaves only ourCompany.com for the ticket in the original server URL. Yet, the authentication pop up is still not supressed when browsing through the alias URL.
    Any idea what can I do next?
    Thanks,
    Roy

    Hi Dezso,
    I found the 401 let me know if I look on it right:
    I have an entry node with two subnodes: request and response.
    The response has:
    <responseStatus>HTTP/1.1 401 Unauthorized</responseStatus>
    And the request before that doesn't have any MYSAPSSO2 in it, all it has which is related to cookies is this:
    <header name="Cookie">UserUniqueIdentifier=1174345919524; alreadyLogged=1179560552416</header>
    <cookies>
    <cookie name="alreadyLogged">1179560552416</cookie>
    <cookie name="UserUniqueIdentifier">1174345919524</cookie>
    </cookies>
    Can you advice what to do next?

  • Portal url redirect

    Hi All,
    Because of a requirement,  I wanted to retreieve the requestURL and append compnay name to it for identification and redirect the url.
    basically if my portal url is http:
    <servername:port>\irj\portal , then get the hostname and append to portal url at the end as portalurl\hostname and make the request to this url.
    From here onwards this should be portal url throught the session. I am doing like this but it is not working
    String strReqURL = request.getRequestURL().toString()==null?"" : request.getRequestURL().toString();
         if ( strReqURL != null) {
              System.err.println("Before request url is"+request.getRequestURL());
              StringBuffer redirectUrl = new StringBuffer(strReqURL);
              redirectUrl.append("/hostname");
    Please help me out in resolving this issue.
    Thanks
    Supriya

    Hi,
    have you tried to get the HttpServletRequest associated with the IPortalComponentRequest and retrieve the server name from there?
    HttpServletRequest req = request.getServletRequest();
    String server = req.getServerName();
    http://help.sap.com/javadocs/NW04/current/ep/com/sapportals/portal/prt/component/IPortalComponentRequest.html
    http://download.oracle.com/javaee/1.4/api/javax/servlet/http/HttpServletRequest.html
    You could also do this by Javascript and add the JS code to the index.html located at /irj/index.html
    br,
    Tobias

  • Generate SAP Portal URL in ABAP

    Hi all
    I am faced with a task that involves fetching data from SAP E-Recruiting, and presenting it in an XML document which is indexed by a search engine. The data I extract from E-Recruiting, will be used to display a short listing of available positions in the company on an internal website.
    I am able to extract the data, and present it in XML, but the following is a bit more difficult for me.
    The challenge is this:
    For each position I exctract from E-Recruiting, I need to find a way to generate a complete "portal style" URL. This URL will take users browsing the website, to the E-Recruiting job advertisement in the SAP portal. The SAP Portal will display the complete E-recruiting job advertisement, when the users click a "Read more" link in the short listing.
    An example URL is this:
    http://<i>server:port</i>/sap(bD1lbiZjPTUwOCZkPW1pbg==)/bc/bsp/sap/hrrcf_req_dovr/application.do?BspClient=508&BspLanguage=EN&rcfSpID=0003&PARAM=UE9TVF9IUk9CSkVDVD0wMU5DNTAwMDExNTQ%3d
    I need to do this in "regular" ABAP / ABAP OO programming, not BSP or something like that. Is there some function module that will do this for me? I collect all my information from the tables HRP51* (i.e. HRP5122).
    Any help is greatly appreciated.
    Regards,
    Thomas K
    Message was edited by: Thomas Kjelsrud
    Message was edited by: Thomas Kjelsrud

    the example url you have given is not portal url
    An example URL is this:
    http://server:port/sap(bD1lbiZjPTUwOCZkPW1pbg==)/bc/bsp/sap/hrrcf_req_dovr/application.do?BspClient=508&BspLanguage=EN&rcfSpID=0003&PARAM=UE9TVF9IUk9CSkVDVD0wMU5DNTAwMDExNTQ%3d
    its a bsp url.
    if you want to generate bsp url you can use the following method from your abap program
    DATA:  params TYPE tihttpnvp.
    FIELD-SYMBOLS: <wa_params> LIKE LINE OF params.
    fill params table with other url parameters you want
    like BspClient=508
    APPEND INITIAL LINE TO params ASSIGNING <wa_params>.
        <wa_params>-name = 'BspClient'.
        <wa_params>-value = '508' .
    CALL METHOD
          cl_http_ext_webapp=>create_url_for_bsp_application
          EXPORTING
            bsp_application      = 'HRRCF_REQ_DOVR'
            bsp_start_page       = 'application.do'
            bsp_start_parameters = params " other url params
          IMPORTING
            local_url            = url.
    if this bsp is running inside portal as an bspiview and you want to reach this iview directly from a url then the url is different , it is basically the path of the iview in the Portal Content Directory
    Hope this helps.
    Regards
    Raja

  • Urgent!! url of bsp page

    Experts,
    ERP2005
    I am creating bsp applications in dev system and each page in the application has the url of dev. system. if i transport the application to Q and then Prod systems, do the URLs be automatically be adjusted according to hostname or it should be done manually? if it is a manual process, should I go for using external aliases?
    Regards!

    Hi Graham,
    let me explain again. i am not a big programmer of BSP applications. I am a HR functional guy. I am trying to use the features of Web AS to create BSP HTML pages easily.
    I am not trying to create a complex application. a simple application which contains 40-50 HTML pages which are independent of each other. no navigation is needed.
    for example:
    dev system hostname is   somehost<b>dev</b>.
    Q system hostname is   somehost<b>q</b>.
    Prod system hostname is   somehost<b>prod</b>.
    say I have a BSP application in DEV as http://<somehost<b>dev</b>>.<domain>.........../startpage.htm
    In HR configuration, above URL is used in one field like this:
    <b>URL: http://<somehost<b>dev</b>>.<domain>.........../startpage.htm </b>  (URL of above BSP page)
    Description: Description for Medical Plan
    So If the transport request is moved to Q system, i see above entry in the configuration. but it does not have host name of the Q system (obvious from the above entry). it has host name of the dev system. so, in Q ESS portal if I click the link, it is accessing the link from BSP page from DEV system not the one from Q R/3 system. it is because of above configuration.
    It seems to me at this moment, to put the URL of BSP Page in the configuration field, and transport the customizing request. with this solution, there is lot of manual process.
    first,
    1. put the URL of BSP page with Q system host name in the DEV system, and transport the request to Q. Do the testing
    2. change the URL of BSP page with P system hostname in the DEV system, and transport it to Q and then P.
    there is lot of manual processing involved.
    is there any way to get around this?

  • Retrieving Entry Point =True,Roles programatically and retrieving their URL

    Hi Team,
    I want to retrieve the roles whose entry point is equal to true using WebDynpro, And display their names.
    When i am trying to display any role name it is displaying with underscores, like if it is content administration role it is displaying like content_admin_role.
    I want it to display it just similar name which will display in portal, like content administration how can i do this?
    And for each and every role i want to bring the role URL correspond to it.
    I tried this and reached upto some extent but not able to open the role perfectly.
    I used the below code for getting the names of the roles.
    Iterator rit = null;
         try
         IWDClientUser clientUser = WDClientUser.getCurrentUser();
         IUser user = clientUser.getSAPUser();
         rit = user.getRoles(true);
         IRoleFactory rfact = UMFactory.getRoleFactory();
         while (rit.hasNext()) {
         String roleName = (String) rit.next();
         IRole role = rfact.getRole(roleName);
         wdComponentAPI.getMessageManager().reportSuccess("Role names1..."+role.getDisplayName().toString());
         wdComponentAPI.getMessageManager().reportSuccess("Role names2..."+role.getUniqueName().toString());
         //wdComponentAPI.getMessageManager().reportSuccess("Role names3..."+rfact.getRolesOfUser(unique,true));
    Also suggest me to retrieve the URL's of respective roles, and it should navigate to that perticular role when i open that URL in browser.
    Thanks in advance.
    Bala

    Hi,
    First of all you want to distinguish the pcd roles from the LDAP roles. To do that you use a IRoleSearchFilter like this:
    IRoleSearchFilter searchFilter = null;
    try {
    searchFilter = roleFact.getRoleSearchFilter();
    searchFilter.setDisplayName("*", SearchAttribute.LIKE_OPERATOR, false);
    ISearchResult result = roleFact.searchRoles(searchFilter);
    if (result.getState() == ISearchResult.SEARCH_RESULT_OK) {
    while (result.hasNext()) {
    String RoleName = (String) result.next();
    IRole role = roleFact.getRole(RoleName);
    You also need to check if the role is assigned to the user, so get the user's roles and compare them to the ones you got from the search result.
    In order to get name correctly use:
    role.getDescription();
    To see if Entry Point = True you do something like this:
    IPcdContext targetobject =(IPcdContext) initialContext.lookup(role.getUniqueName());
    Object object = targetobject.getAttributes("").get("com.sap.portal.pcd.role.EntryPoint");
    if (object instanceof IPcdAttribute) {
    IPcdAttribute att = (IPcdAttribute) object;
    boolean b = att.getBoolean();
    To get the URL of the role you should use:
    string RoleUrl = "http://<server>:<port>/irj/portal?NavigationTarget=ROLES://" + role.getUniqueName().substring(4);
    Best regards,
    Avishai Zamir

  • Retrieve ICM url

    hi, is there a way to retrieve the url of an ICM cached object, if you 'lost it'.
    background. activex controls are blocked in IE these days preventing then to run without user 'click to activate and use this control'. that ruins most of the interaction you can get from controls specially if the page has to be reloaded as the control will then have to be reactivated each time.
    this is specific for the phtmlb:ganttChart rendering that this happens.
    however there might be an easy fix. during the rendering of the control it puts the svg graphic file in the ICM cache, then renders it on the current page like this :
    <embed src="/sap/bc/bsp/sap/sbspext_phtmlb/238084D3CD28DA4687A0FD58332F4374.svg" height="
          298
          px" width="
          657
          px" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/"></embed>
    what i would do, would be to grab that svg file, put it into a js script and then embed that on my page instead. that would eliminate the click to active issue (known workaroudn that works on any type of active x control).
    so ... how do i get a hold of the url that is in the ICM cache. i can se its there with the monitor, is there any way to retireve it, something that binds it to my current IE session or something.
    anyone got any suggestions?

    recoded the phtmlb extension to fit my needs. no need to read out the ICM path anymore.
    there is another post showing how that was done.
    Message was edited by: Christian Hasselbalch

  • Cannot Retrieve referenced URL in wscript file from Local System Account, but not other accounts on the computer.

    Hello,
    I have a WScript File that includes an external resource (js file).
    It works on one computer and it does not work on another computer.
    If I run this file from a normal admin command prompt everything runs fine on both computers.
    If I run this file from the Local System account using PsExec it runs fine on one of the computers and throws an error "Cannot Retrieve referenced URL" on the other computer.
    The reason I want it to run from the Local System account is that it is executed from a Windows Service.
    Is there some setting or some way for the IE cache to get corrupt on the Local System account or something like that?

    JRV,
    You are by far the worst 'support' person I've ever seen. If you aren't going to be thoughtful in providing support, don't pretend. If you're going to pretend, leave your condescension on the shelf. You have provided no thoughtfulness whatsoever to his issue,
    and have in no way improved the discourse. You are arrogant and condescending without exhibiting any intelligence whatsoever. I'm impressed Matt kept calm through your demeaning, counterproductive diatribes.
    Matt,
    First I'd check UAC settings, because I believe that can change how elevation works substantially.
    Second, I would check the versions of wscript.exe on both machines, both in System32 and SysWow, and I'd check for updates bypassing WSUS to make sure there's not something silly going on there (totally a shot in the dark, catch-all theory).
    Have you made any headway in the last few weeks?
    -John
    This is not a support forum and it is not for assistance in fixing broken configurations.  It is a scripting forum. The OP proved that the issue is not the script but the environment it is running in.  You should not get mad just because you are
    not getting satisfaction.
    ¯\_(ツ)_/¯

  • How to create an External Alias for a Portal URL ?

    Hi Gurus,
    Can anybody tell me how to create an external alias for a portal link(URL). Actually, my problem is i want to send this Portal URL(link) thru' a SendMail step to the user so that when he clicks on it, it will take him to his UWL(Ofcourse after signing-in). As this URL length is > 80 char(101 char), i am not getting the full lenght URL in my Outlook mail. THough we are on ECC 6.0,Basis Rel 7.0, as per the OSS note 559234, we should have this length extended to 132 bytes. But, for some reason, its not happening. And,in the same OSS note, it was mentioned that we can use external aliases to achieve this(shortening the URL length).
    Can anybody tell me how to achieve this, either thru' increasing the URL length or thru' ext. aliases.
    Please reply asap.
    Thanks in advance
    venu

    Not an issue as of now. I'll open up again if needed

  • PCUI - Open new url or bsp with a Toolbar Button

    Hi all,
       I have a PCUI custom application (CRM_BSP_FRAME)and i want open a new url or bsp with my button on the toolbar of result list. Important: Without modification of standard.
    Thx in Advance
    Regards.
    Manuel

    Hi Manuel,
    in the event you can enter an object link.
    Regards
    Thomas

  • External portal capturing internal portal URL in Log and trace file

    Hi,
    We are facing one issue in portal like we have two portals for internal (Intranet) and external (Internet) users.
    Once users logged in the application and try to get the information about mylink from the external portal link (internet) they should not get any information about the internal portal.
    But in log and trace file we can see the external portal link capturing the internal portal URL.
    We need to find, from where system capturing the internal portal URL.
    Thanks.

    The tkproffed trace file is in seconds.
    "set timing" is in hh:mi:ss.uu format. So 00:00:01.01 is 1.01 seconds.
    You have to remember that most of these measurements are rounded. While your trace file says it contains one second of trace data, you know it's more.
    One excellent resource for trace files is "Optimizing Oracle Performance" by Cary Millsap & Jeff Holt. (http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X ) I thought I knew trace files before, but this book brings your knowledge to a whole new level.
    There is also an excellent WP by Cary Millsap ( http://method-r.com/downloads/doc_details/10-for-developers-making-friends-with-the-oracle-database-cary-millsap ) that gives you some insight.

Maybe you are looking for

  • Sorting Order for SAP Tables in DB2 database

    Dear Experts - ISSUE: When an ABAP program selects data from the DB into an internal table, it is changing the way the data is sorted. In other words, the internal table data is in a different sort order than what is in the DB. It is not working this

  • SMQ2 Time limit exceeded

    Hi Experts, IDOC to IDOC Scenarion--There are some entries in SMQ2 are showing "time limit exceeded". i tried to unlok the Queue every time i get the error and after that queue is going into Running status for some time and again it is giving the sam

  • CC5.2: Logical and Cross Systems - Best Practices

    Hello, we are using CC5.2 in a landscape of multiple SAP systems. In order to streamline the process of creating our rule set I would like to clear up my confusion about the use of logical and cross systems. Here my questions: 1. Are logical systems

  • Arial Unicode MS font doesn't appear in PhotoShop CS5 for MAC

    Hello,  I'm having a problem with Arial Unicode MS font in MAC. The other apps such as TextEdit, Pixelmator... can see the font but not PhotoShop CS5 and the other apps in the CS5 suite (Flash, Illustrator...) Does anyone have the same problem with m

  • Ajax, Netbeans Woodstock, Woodstock

    HI: I need help with the following please. The issue to resolve is this: I need to display on the screen a log that I receive from a Servlet asynchronously I do not need to update the server side data, only to see the results on the screen. Following