Call a Portal Application from WebDynpro

Hi experts,
i hope you can resolve my problem!
My intention is to refresh the browser and call the first page of the portal after the portaluser pressed a button in an WebDynpro application.
For this purpose i create a portal application with an JSPDynPage and an JSP how call the  JavaScript Method "top.location.reload();".
My question:
How can i call an portal application in a WebDynpro onAction Event?
Thanks,
Florian

1)Creat one action method "ReactPortalEventing" with the parameter dataObject and write the code in wdDoInit method as
//the urn and method name like "sendEvent" both should be same
WDPortalEventing.subscribe("urn:com.abc.practice","sendEvent",wdThis.wdGetReactPortalEventingAction() );
2)and in the action method display the name as
wdComponentAPI.getMessageManager().reportSuccess("Event value"dataObject);
also chk it
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d7d690-0201-0010-e581-9c4fc69cec0e

Similar Messages

  • Calling a portal page from WebDynPro ABAp application

    Hi,
    I would like to call a portal page (any type) from a WebdynPro ABAP application. I have the PCD location of the page.
    Which call shall I make :
    Absolute Navigation
    Relative Navigation or
    OBN.
    Also, can anyone send me short code snippet on the following.
    The package SWDP test examples are not working.
    Best Regards
    Sid

    Hi Siddharth,
    Well, to start with you can go for ABSOLUTE NAVIGATION.
    Secondly, you can find the snippet here
      DATA LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA LO_PORTAL_MANAGER TYPE REF TO IF_WD_PORTAL_INTEGRATION.
      DATA L_NAVIGATION_TARGET TYPE STRING.
      LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_PORTAL_MANAGER = LO_API_COMPONENT->GET_PORTAL_MANAGER( ).
      MOVE 'pcd://portal_content/com.xxxx.zpof_f_XXXXportalcontent/com.xxxx.test/com.xxxx.folders.MaintenanceBusinessPackage/com.xxxx.test.mt.pages.Pages/com.xxxx.pages.MaintenanceTasks'
        to l_navigation_target.
      CALL METHOD lo_portal_manager->NAVIGATE_ABSOLUTE
        EXPORTING
          NAVIGATION_TARGET   = L_NAVIGATION_TARGET
    *      NAVIGATION_MODE     = IF_WD_PORTAL_INTEGRATION=>CO_SHOW_INPLACE
    *      WINDOW_FEATURES     =
    *      WINDOW_NAME         =
    *      HISTORY_MODE        = IF_WD_PORTAL_INTEGRATION=>CO_NO_DUPLICATES
    *      TARGET_TITLE        =
    *      CONTEXT_URL         =
    *      POST_PARAMETERS     = ABAP_FALSE
    *      USE_SAP_LAUNCHER    = ABAP_TRUE
    *      BUSINESS_PARAMETERS =
    *      LAUNCHER_PARAMETERS =
    Above it, the examples of SWDP will not work if you test them from SE80-ABAP WAS...I suggest you to create a WDA IView in Portal and test it in Portal itself.
    Hope this should solve your problem.
    Regards
    <i><b>Raja sekhar</b></i>

  • Calling a pdk application from webdynpro application

    Hi experts,
    I have a reqiremet  in the webdynpro application by clicking some link or button it has to call pdk application in external window ,and i want to pass the value from pdk application to webdynpro application .
    thanks &regards,
    ramani.

    I tried testing it with the Webservice navigator, and getting the same error,
    XML Deserialization Error. XML is not valid. Element [http://session.services.enterprise.mclarensoftware.com] is required in  but can not be found.
    however
    request:
    POST /mclaren/services/session HTTP/1.1
    Host: localhost:50100
    Content-Type: text/xml; charset=UTF-8
    Connection: close
    Cookie: <value is hidden>
    Cookie: <value is hidden>
    Content-Length: 696
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><pns:createSession xmlns:pns='http://session.services.enterprise.mclarensoftware.com'><pns:strTechnologyID>filenet</pns:strTechnologyID><pns:strConnection>http://mclglaweb006:8008/ApplicationEngine/xcmisasoap.dll</pns:strConnection><pns:strConnectionFriendlyName> </pns:strConnectionFriendlyName><pns:strUserName>davidp</pns:strUserName><pns:strPassword>nimbus</pns:strPassword><pns:strDomain> </pns:strDomain></pns:createSession></SOAP-ENV:Body></SOAP-ENV:Envelope>
    response:
    HTTP/1.1 200 OK
    Connection: close
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=utf-8
    Date: Thu, 29 Jun 2006 14:15:50 GMT
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><createSessionResponse xmlns="http://session.services.enterprise.mclarensoftware.com"><createSessionReturn><code>0</code><detail xsi:nil="true"/><message xsi:nil="true"/><sessionID>filenet;http://mclglaweb006:8008/ApplicationEngine/xcmisasoap.dll;davidp; </sessionID><successful>true</successful>

  • Calling an Portal iView from Webdynpro - Error

    Hi,
    I have two iViews in a page in my Portal. Both of them are WebDynpro iViews.
    The iView on the Left hand side consists of links to different WebDynpro iViews in the same Portal.
    I have used LinkToAction UI element, on event of click
    i am executing this piece of code.
    onActionClick (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent)
      WDPortalNavigation.navigateAbsolute("ROLES://portal_content/folders/X.Iview",                    WDPortalNavigationMode.SHOW_INPLACE,               (String)null, (String)null,               WDPortalNavigationHistoryMode.NO_DUPLICATIONS,          "Called iView Name",                         (String)null,                              (String)null);     
    I have picked up the iView name from the Portal(exact PCD location).
    This is not giving me consistent results.
    Please let me know your thoughts.
    Thanks
    Senthil

    Hi,
    Had some permission issues in the loading iView, got that sorted. Now it works fine.
    Thanks
    Senthil

  • Calling POWL Application From Webdynpro

    Hi Experts,
    I have a requirements wherein I have to call a POWL application from Webdynpro. Please let me know how to achieve this.
    POWL - Personal Object Work List
    Any help is welcome.
    Thanks
    Divakar

    Hello Diwakar,
    Based on your query i understand that you need to embed your powl into a web dynpro application to view it.
    u can do it in two ways..
    the first one is just for testing..
    prerequisites...
    just check ur web dynpro service is activated.
    Use transaction SICF
    On the Maintain Service screen leave the default values as they are and choose Execute
    In the Virtual Hosts/ Services tree control locate the node sap/bc/webdynpro. Right click on
    the node and choose Activate Service from the context menu.
    1. Navigate to the initial screen of the SAP Easy Access Menu.
    2. Do a right-click on Favorites and choose Add other objects from the context menu.
    3. Choose Web Dynpro Application from the upcoming dialog box list.
    4. On the Web Dynpro Application subscreen, make the following entries.
    Web Dynpro Applicat.-->POWL
    Parameter -> APPLID   (Be sure to select the parameter via input help.)
    Value ->Specify the APPLID defined for the POWER List to test.
    Leave rest unchanged.
    click OK.
    By double-click on the created favorite, the specified POWER List will be displayed in a separate
    Browser window..Only the basic functionalities can be tested this way.
    The second way is in which you manually insert a powl component in web dynpro appl..
    1. create a web dynpro component.
    2. Specify POWL_UI_COMP as the used component in the properties and give a suitable name.
    3. In the main view. insert a ViewcontainerUIelement.
    4. In the component controller properties . click on create controller usage. and select POWL_UI_COMP
    INTERFACECONTROLLER
    5. Go to the windows selection and right click and select embed view on the ViewcontainerUIelement of the Main view. select POWL_MASTER from input help.
    6. Create an outbound plug , name it as 'OUT'. link it with DEFAULT plug by dragging.
    7.Go to the methods tab and in the Handle Default method .
    and paste the following code..
      DATA: lv_inbox_query TYPE string,
            lt_query_params TYPE rsparams_tt,
            lwa_param TYPE rsparams.
      DATA lv_qname TYPE POWL_QUERY_TY.
    lv_qname = 'QUERY1'.
      CALL FUNCTION 'POWL_ENCODE_SELPARA'
        EXPORTING
          i_selpara        = lt_query_params
          i_escape         = '\'
        IMPORTING
        e_selpara_string = lv_inbox_query  .
        wd_this->fire_out_plg(
          applid =  'POWLappl'                          " powl_applid_ty
          forallq =   'X'                        " powl_xflag_ty
          qselpara =   lv_inbox_query                       " string
          refresha =   'X'
          refreshq = 'X'                    " powl_xflag_ty
          srvgroup =   'X'
          qname =    lv_qname                " rzlli_apcl
    where QUERY1 is the name of your default query and POWLappl  is your powl applid.
    7. create application and test

  • Need a call a portal iView from a WebDynPro ABAP Application

    Hi,
    I have to call a portal iView from the WD ABAP application.
    The iView root is e.g.
    folder1/folder2/check_workset1/iView
    How can we call it using Absolute navigation or Relative Navigation.
    I just want to call this path.
    Can anyone provide me with a code snippet.
    Best Regards
    Sid

    Hi ,
    I am calling the following method in my action call of a Webdynpro ABAP View
      CALL METHOD lo_portal_manager->NAVIGATE_ABSOLUTE
      EXPORTING
        NAVIGATION_TARGET   = 'Roles://portal_content/xxxx._and_remuneration'
        NAVIGATION_MODE     = IF_WD_PORTAL_INTEGRATION=>CO_SHOW_EXTERNAL
       WINDOW_FEATURES    =
       WINDOW_NAME        =
       HISTORY_MODE       =
       TARGET_TITLE       =
          CONTEXT_URL       = 'http://xxx.xxx.adsint.biz:50000/irj/portal'
       POST_PARAMETERS    = ABAP_FALSE
       USE_SAP_LAUNCHER   = ABAP_TRUE
       BUSINESS_PARAMETERS =
       LAUNCHER_PARAMETERS =
    But it is still noot opening the page for me from the WD ABAP application.
    Can anyone let me know , what can be the reason.
    Best Regards
    Sid

  • Calling Webdynpro Java Application from Webdynpro ABAP Application.

    Hi,
    We have developed one Application using Webdynpro Java and I m in need to call the Webdynpro Java application from Webdynpro ABAP.
    Require Suggestions to acheive this.
    Thanks In advance.
    Reg,
    Ajay.

    Dear Ajay,
    Assuming that both your applications WDA & WDJ are in the portal & you don't have to pass any parameters to the WDJ application.
    Write the following code on the action  where you would call the WDJ application.
      DATA:
            lr_compcontroller TYPE REF TO ig_componentcontroller,
            l_component TYPE REF TO if_wd_component ,
            lr_port_manager TYPE REF TO if_wd_portal_integration ,
            wa_navigation TYPE navigation.
      lr_compcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_component = lr_compcontroller->wd_get_api( ).
      lr_port_manager = l_component->get_portal_manager( ) .
    * The value inserted into the navigation-target field can be found in the Portal
    * content administration tab of your portal. It is the ID or PCD Location field
      wa_navigation-target = pcd. " Please provide the PCD Location of the WDJ Application here.
      wa_navigation-mode   = '0'.  "0 = INTERNAL(same page) and 1 = EXTERNAL(new page).
      CALL METHOD lr_port_manager->navigate_absolute
        EXPORTING
          navigation_target = wa_navigation-target
          navigation_mode   = wa_navigation-mode.
    You can get the PCD from the Page properties of the WDJ application page in the Portal.
    Hope it helps!
    Warm regards,
    Upendra Agrawal

  • Calling a Portal Service from within a Web Dynpro DC

    Hello,
    I am trying to call a Portal Service from within a Web Dynpro development component without sucess.
    Can anyone give me some hints on the necessary steps in order to accomplish this task?
    Thanks
    Diz

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • How to call an external server from Webdynpro program?

    Hi All,
    i have a requirement in which i have to call an external server from Webdynpro ABAP program.
    how to imp

    hi ,
    do u mean u need to call the external link from ur WD ABAP application ?
    if so , u either create
    1 a Link to URL ( LTU ) UI element  and call the external link using that
    2 if u wish to use some other fuctionality and thn wish to call the URL in ur application ,u write this piece of code in ur relevant on Action method :
    data:  lo_window_manager type ref to if_wd_window_manager.
    data:  lo_api_component  type ref to if_wd_component.
    data:  lo_window         type ref to if_wd_window.
    data:  ld_url type string.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    ld_url =  ''.  // ur external sever link here
    CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW     
    EXPORTING     URL                = ld_url           
    RECEIVING     WINDOW         = lo_window.
    lo_window->open( ).
    I hope u wud be able to create URL now .
    regards,
    amit
    Edited by: amit saini on Oct 13, 2009 11:25 AM

  • Calling an EJB application in webdynpro

    Dear SDN's,
    I am trying to call an EJB application  from a webdynpro application and is succeded in storing values to database via Java Bean Model.
    I want to retrieve all records from table via EJB and all the records should be displayed in Webdynpro Table UI element.
    How can we do it?
    The problem here is, how to return a set of records to webdynpro from EJB via a javabean.
    I am not clear in using Collection Framework! i.e, which collection class i have to use to store the retrieved records.
    Your help will be appreciated.
    Regards,
    Sireesha.B

    Hi Sireesha,
    Instead of adding resultset, create a EMP cinstance and add it.
    Ex : Consider you have created a EMP class
    class EMP
      String empname;
       int id;
      public void setEmpname(String name);
      public String getEmpname();
    Now
    ResultSet rs=statement.executeQuery(select * from emp);
    Vector v=new Vector();
    while(rs.next)
    Emp e=new EMP()l
    e.setEmpName(rs.getString(0));
    e.setID(rs.getInt(1)));
    v.add(emp);
    Iterator i=v.iterator();
    while(i.hasNext())
    Emp e1=(EMP)i.next()l
    System.out.println(e1.getempName());
    System.out.println(e1.getID);
    Regards, ANilkumar

  • How to call a VB application from Java

    Hi,
    does anybody know how to call a VB application from java.
    Would appreciate if you can provide me with an example.
    thanks

    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.

  • How to call an applescript application from Office 2011 Excel VBA

    All:
    I have been pounding my head how to implement a working VBA application into the Mac environment. I have tried a number of approaches calling applescript from VBA. I would like to call my applescript application and pass one argument. My applescript application is as follows:
    <code>
    on run argv
    set theURL to (item 1 of argv)
    set p_path to do shell script "echo ~"
    set m_path to POSIX file p_path
    set theName to text -((offset of "/" in (reverse of characters of theURL) as text) - 1) thru -1 of theURL
    set theFile to (p_path & "/Downloads/" & theName)
    set macPath to (POSIX file theFile)
    do shell script "/usr/bin/curl " & theURL & " -o " & quoted form of POSIX path of macPath
    end run
    </code>
    My last attempt within VBA is:
    <code>
    Sub SaveMetaDataFile(URL As String, shortFileName As String)
    Dim scriptToRun As String
    Dim posixcmd As String
    posixcmd = ThisWorkbook.Path
    scriptToRun = "tell application " & posixcmd & ":MetaDataFileDownloadScript.app " & URL
    MsgBox "[" & scriptToRun & "]"
    MacScript (scriptToRun)
    </code>
    I first tried to call the script directly without the "tell application" and I still obtain an error. I also tried the following in VBA and I get the same error with the last lane of code:
    <code>
    scriptToRun = "set theURL to " & """" & URL & """" & Chr(13)
    scriptToRun = scriptToRun & "set p_path to do shell script " & """" & "/bin/echo ~ " & """" & Chr(13)
    scriptToRun = scriptToRun & "set m_path to " & """" & posixcmd & """" & Chr(13)
    scriptToRun = scriptToRun & "set theName to " & """" & shortFileName & """" & Chr(13)
    scriptToRun = scriptToRun & "set theFile to (p_path & " & """/Downloads/""" & " & theName)" & Chr(13)
    scriptToRun = scriptToRun & "set macPath to (POSIX file theFile)" & Chr(13)
    scriptToRun = scriptToRun & "do shell script " & """" & "/usr/bin/curl " & """" & " & " & " theURL " & " & " & """" & " -o " & """" & " & " & " quoted form of POSIX path of macPath"
    MsgBox scriptToRun
    'scriptToRun = scriptToRun & "do shell script " & """/usr/bin/curl """ & " & " & " theURL " & """ -o """ & " & " & " quoted form of POSIX path of macPath"
    MacScript (scriptToRun)
    </code>
    The above code is from the applescript application. The applescript application works well using the terminal via osascript. For example:
    xenas-imac:Census Work Xena$ osascript MetaDataFileDownloadScript.app http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls
    xenas-imac:Census Work Xena$
    The whole goal is to download a file into the Download directory from Excel to allow the next step to import the file into Excel for the user. Any help here would be great!
    Thank you;
    Lori

    Update:
    Ok have the module almost working and matches the syntax within the test applescript I had created, but the VBA code via the MacScript() call is generating an invalid procedure or argument call. The following is the test applescript to compare the created string to be passed to VBA MacScript() function:
    <code>
    set appPath to quoted form of POSIX path of "Macintosh HD:Users:Xena:Desktop:Census Work:"
    do shell script "/usr/bin/osascript " & appPath & "MetaDataFileDownloadScript.app " & "http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls"
    </code>
    The following is the VBA module that generates the above word for word as far as I can tell:
    <code>
    Sub SaveMetaDataFile(URL As String, shortFileName As String)
    Dim scriptToRun As String
    Dim posixcmd As String
    posixcmd = ThisWorkbook.Path
    posixcmd = posixcmd & ":"
    scriptToRun = "set appPath to quoted form of POSIX path of " & Chr(34) & posixcmd & Chr(34) & Chr(13)
    scriptToRun = scriptToRun & "do shell script " & Chr(34) & "/usr/bin/osascript " & Chr(34) & " & appPath & " & Chr(34) & "MetaDataFileDownloadScript.app " & Chr(34) & " & " & Chr(34) & URL & Chr(34)
    MsgBox "[" & scriptToRun & "]"
    MacScript (scriptToRun)
    End Sub
    </code>
    The message box in the above VBA code matches my test applescript file and I have taken the output of the MsgBox and used it in a test applescript and it works great, but VBA is throwing "Run-time error '5': Invalid procedure call or argument".
    Looking at Microsoft's definition it takes a string argument and I have made sure that scriptToRun is a string type, so at this point I suspect there is something wrong with the MacScript() funciton, or I am missing something above. Is there another way to call an applescript application from VBA outside the MacScript() function? Or is there something I am missing? Any help or suggestions is needed.
    Thank you;
    Lori (CodeXena)

  • Call a Java Application from MicroFocus COBOL (in UNIX environment)

    Hello,
    Could you please let me know, how to call a Java application from a MicroFocus COBOL application. If anyone has any code samples, that would be of great help.
    Thanks in advance,
    Tijo.

    You generally can't cause a program to be executed on a different >server. Basic security, you know. Besides this idea of having the Java >application run on a different server wasn't mentioned in your original >post. That leads me to believe we don't have the whole story.So I think you need to step back and find out what are the requirements. For example: Does your program need to start this Java application running, or is it already running and your program needs to connect to it somehow?
    My program has to start a Java class file, meaning that the Micro Focus COBOL module will call the Java class file. Will it be running on the same machine as your program, or on some other machine?
    For both cases, I would like to know the answer.a) Running on the same machine as my program is running.
    b) Running on the different machine.
    And then there are the questions about whether your program needs to have a conversation with the Java application, or whether it just needs to start it and that's all.
    COBOL program has to call a Java class by passing some parameters and Java class in turn process it and return some value back.. Kind of Request and Response model.Plenty of questions to be asked. Go and find out what they are.
    Sorry ... if I am not clear on my questions. Anyhow, thank you very much for providing the information.

  • Calling a Java Application from MicroFocus COBOL.... (in UNIX environment)

    Hello,
    Could you please let me know, how to call a Java application from a MicroFocus COBOL application. If anyone has any code samples, that would be of great help.
    Thanks in advance,
    Tijo.

    Annoyingly crossposted.
    http://forum.java.sun.com/thread.jspa?threadID=730657

  • Calling a java application from j2ee web application

    Hi,
    I have a j2ee application in which i am making a call to a jar file which is a java application.
    Runtime a4 = Runtime.getRuntime();
    Runtime a = Runtime.getRuntime();
    String cmd[] = new String[14];
    cmd[0] = "cmd";
    cmd[1] = "/c";
    cmd[2] = "start";
    cmd[3] = "javaw";
    cmd[4] = "-jar";
    cmd[5] = CATALINA_HOME+"\\webapps\\AveksaTesting\\AveksaTestingJava\\dist\\AveksaTestingJava.jar";
    cmd[6] = SERVER_TESTS;
    cmd[7] = COLLECTOR_TESTS;
    cmd[8] = SYSTEM_TESTS;
    cmd[9] = CREATE_ORACLE;
    cmd[10] = DB_NAME;
    cmd[11] = DB_DUMP;
    cmd[12] = email;
    cmd[13] = isMIGRATE;
    try{
    java.lang.Process p = a.exec(cmd);
    Now in the called java application, i am first shutting down the tomcat server by calling shutdown.bat script and then starting it using startup.bat. But the problem i am facing is when i restart the server from java application, it says address already in use(i.e. port 8445 on which tomcat is runninng).
    Id i just call the java application and do the same operation it works fine. I guess when i am calling java from j2ee application, j2ee still has some threads holding java and not shutting down tomcat properly.
    Can anyone suggest me what can be done in this case. I have to call a java application from j2ee and restart the tomcat server many times.
    Thanks in advance
    -Vikram

    Annoyingly crossposted.
    http://forum.java.sun.com/thread.jspa?threadID=730657

Maybe you are looking for