Close webdynpro Application

Hi Experts,
On click of a link in Portal, my web dynpro application opens in a new window.. I have a close button on that screen and I want to close that application ..what code should I use for it.
Thanks & regards,
Sushant singh

Hi,
If you have create Close button manually then you can create an exit plug and on click of this button you can fire the exit plug.
look at the related thread
Re: Closing of IE window
If its a standard close button ( FPM close button ) then you don't need to do anything .
Regards
Manas Dua

Similar Messages

  • How  to close webdynpro application

    hi ,
    from work item im opening the webdynpro form and  entering some data and i will click on save to save the data.
    after save i want to close my webdynpro application. how to do this.?
    if any code i have to write in any method... guide me...
    thanks,
    Raghu

    Refer this SAP Online Help :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm
    Thanks.

  • How to close a Webdynpro Application with some action, if it is opened with a Tcode

    Hi Experts,
         I am looking to get some info regarding my post over here.
    Scenario 1:
    I opened my webdynpro application in SAP GUI (created a tcode for my webdynpro application and ).
    Now, I have to add some button where I have to write a piece of code to close the GUI screen along with the webdynpro application. (ie, entire Tcode where the webdynpro application is shown, should be closed)
    Please let me know if you have some info on this.
    Scenario 2:
    If the above scenario is not possible, then I wanted to know if I can call some screen in SAP GUI.
    Note: The GUI screen must be called only from the webdynpro application that is opened with a tcode in SAP GUI.

    Hello,
    Please try this:-
    Window Plugs: Startup and Exit - Web Dynpro for ABAP - SAP Library
    You can close the WD Application by follwoing way-
    Create a button in a view and assign an action on it.
    Create on exit plug in window level and fire that in the view button action level.
    Z2-wd comp.
    NAME
    EXT:-Window
    exit plug name.
    DATA lo_z2 TYPE REF TO ig_z2 .
    lo_z2 =   wd_this->get_z2_ctr( ).
      lo_z2->fire_ext_plg(

  • Reset and close ur  webdynpro application

    hi
        I have a RESET button in the main window  which
      need to be reset and  moved to starting stage  after certain operations have been done when i click on RESET button ,
    and other is close button where  the whole WEBDYNPRO
    APPLICATION has to be closed .  how can this be done.
    i have used certain method where i called WDCLIENTUSER
    and closed the application , but its moving to the next page
    and calling the SAP default logoff.htm page . 
    can any one help me ?

    hi
    thanks  for the response 
    WDClientUser.forceLogoffClientUser(null);
    this will move to the next page as  show  a  message 
    webdynpro application terminated , good bye 
    instead  ,  can  we  show  out  own  messages  or message
      any suggestions  ?

  • How to close current window  of webdynpro application using webdynpro java

    Hi All,
    u201CTo close the current  window  of webdynpro application"
    if i using exit plug its giving the following error in portal runtime.
    u201Ccom.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application! u201C .
    could you send me the  process how to use  portal navigation for the above scenariou2026u2026instead of exitplug.
    Thanks& Regards,
    Srinivas.

    Hi,
    Follow the steps below:
    1. Create a new Window and embed a View which needs to be opened from the main view.
    2. Create a context attribute of type IWDWindow (Java Native Type Option)
    3. Write the following code in the controller for opening the new window:
    IWDWindowInfo windowInfo = (IWDWindowInfo)  
                                                     wdComponentAPI.getComponentInfo().findInWindows("<windowname>");
    IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
    wdContext.currentContextElement().set<contextattributename>(window);
    window.show();
    4. In the new window, create a contextattribute and bind it to the attribute created in controller and on action of the close button write the following code:
    IWDWindow window = wdContext.currentContextElement().get<attributename>();
    window.destroyInstance();
    Hope this helps you.
    Regards,
    Poojith MV

  • How to close the browser from webdynpro application

    Hi All,
    I need  to implement the closing the browser where the webdynpro  application running by click on some button in that application.
    Can any body tell me how to implement that.
    Regards
    Vijay

    Hi,
    I resolved as follows(WebDynpro7.3) :
    1.- Create a plug in the "Window" with the name "Exit" and parameter "closeWindow" the type Boolean, after edit it and put type Exit.
    2.-Repeat the same but in the "Interface".
    3.-Place the following code in the action:
      IWDWindowController iwdWindowController =wdControllerAPI.getWindowController();
      IWDWindowInfo windowInfo=iwdWindowController.getWindowInfo();
      IWDOutboundPlugInfo  iwdOutboundPlugInfo=windowInfo.findInOutboundPlugs("Exit");
      iwdWindowController.firePlug(iwdOutboundPlugInfo, new HashMap(){{put("closeWindow",true);}});
    regards.
    JCARMONA

  • HOw to start the project for first view in webdynpro application

    Hi,I am having  a problem regarding scenario for customer feedback for portal end user i.e..wen user login to a application for feedback there it check the Id of the user wether it had given the feedback or not by comparing the Id with the database Idu2019s from SQLserver.If the feedback is thr of that Id then a view shud say u hav already given feedback otherwise feedback form shud open ,the user will giv feedback and closes by thanking with other view.My problem is how to openthe  view were it will compare the userlogin Id with the database Id to move further.How shud I handle this scenario for first view.I am creating this application in webdynpro.In this project how shud I manage the viewsu2026

    Hanif,
    you can create a webdynpro application and create an iview and set the height and width to 0 .inside that webdynpro application open a popup that provides the feedback form .and you invoke this popup window in the WDDOINIT() or WDDOMODIFYVIEW() of the webdynpro main view.
    apart from this you need to get the logged user id in main view and get the output from database whether you want to open the feedback form
    check this forum on developing webdynpro application
    Web Dynpro Java
    Thanks
    Bala Duvvuri

  • Capturing the LOG OFF url click action in a Webdynpro application

    Hi,
    I have this requirement where I need to know when the User logs off in a webdynpro application.
    I have several webdynpro applications, each independent, and each need to do some clean up tasks when the user clicks on the LOG OFF url in the portal login.
    Is there some standard event attached with the LOG OFF Url of the portal login?
    And could anybody please specify when exactly would the  <i>wdDoExit()</i> method of the application view(s) or the application component controller get's trigerred when the application is run from the portal login?
    Thanks in Advance.
    Regards,
    Swapna Priya.

    Hi Luciano,
    I was successfully able to call the RFC from wdDoExit() method of the component controller.
    Also I could successfully place a custom alert call when the user clicks on the LOGOFFurl in the portal browser.
    Now I have one more pending requirement for me to completely use this cycle of events.....The Portal Browser close action i.e., 'X' action.
    I did find a forum link with some code for the same but i did not understand where to place that code and have already raised a reply for hte same.
    Below is the link:
    /message/230174#230174 [original link is broken]
    Do you have any idea about how to trap this?
    Thanks for all your support
    Regards,
    Swapna Priya.

  • Closing a webdynpro application, should call a portal page

    Hi All,
    I have a requirement in which, after a webdynpro application is closed in portal, the portal should show the workset content from which the webdynpro application is triggered.
    For example,
    Wedynpro application Created is  ZWDA1.
    Two iviews are created in portal which refers to the webdynpro application ZWDA1, the portal Iview names are ZPORTAL_IVIEW1, ZPORTAL_IVIEW2.
    Two worksets ZWORKSET1 & ZWORKSET2 are created in portal which refers to Iview ZPORTAL_IVEW1 and ZPORTAL_IVEW2 respectively.
    Two roles ZROLE1 & ZROLES2 are created in portal which refers to workset ZWORKSET1 & ZWORKSET2 resepectively. These two roles are assigned to users ZUSER1 and ZUSER2, when these user logs into portal they will see the content of the  workset ZWORKSET1 & ZWORKSET2 respectively.
    Assuming ZUSER1 and ZUSER2 invokes the portal ivew ZPORTAL_IVEW1 & ZPORTAL_IVEW2, the underlying webdynpro application called is same. So in the webdynpro application only I need to write the code to close the application and call the workset ZWORKSET1 for ZUSER1 and workset ZWORKSET2 FOR ZUSER2. This differentiation I am not able to indentify in webdynpro application, I thought of using relative navigation.
    Any suggestion to achieve this functionality is greatly appreciatable
    Regards,
    H.K.Hayath Basha.

    Just closing the message

  • Refresh problem of Webdynpro application which is wrapped in a BSP IFrame

    I have a BSP Iframe inside which I am calling a webdynpro application ('zwdc_re_replenishment'). The requirement is that this WD application should be reloaded whenever a timeout occurs. Currently, when there is a timeout, an error is shown.
    In order to achieve this, for this WD Application , I have a SICF node to which I have attached a customized Errorpage via the option 'Redirect URL'.
    Whenever the WD application undergoes a timeout error, my custom error page is called which is named as errorpage.htm. On this page in the 'OnInitialization event', I try to call the WD application URL again (via the following code) which should reload the application. But instead I get a blank page.
    CALL METHOD cl_wd_utilities=>construct_wd_url
      EXPORTING
        application_name = 'zwdc_re_replenishment'
      IMPORTING
        out_absolute_url = lv_def_url.
    response->redirect( url         = lv_def_url
                        permanently = 1 ).
    Just as a note I have already tried out the following methods as well but nothing works
    *navigation->exit( lv_def_url ).
    *navigation->call_application( lv_def_url ).
    Is this because my WD application is inside a BSP Iframe and therefore reloading it manually does not work ?
    Please help!
    Thanks.
    Sukanya

    Hi Thomas,
    First of all, thanks a lot for replying !!
    Sorry for the confusion. Although seems like you have answered my question already.
    Actually the requirement for embedding WDA inside a BSP Iframe came up since there are some WD report applications  that are accessed by very controlled environments in which the users were not able to close the WDA session directly (without the IFrame)  and were getting some errors. Hence the WDAs had to be wrapped inside BSP IFrame which solved the above problem.
    I am working with only one BSP app which has the Iframe and one WD app which is called within the BSP app.
    Now, the other requirement that came up was that whenever the WDA session inside the BSP IFrame expires, there should be no error page and instead the WD app should be reloaded.
    So  I was trying to reload the WD App in the following way.
    1. For the SICF node of WDA, I attached an errorpage.htm for all the tabs under the tab 'Error Pages'. I have defined this errorpage.htm inside the same BSP App which has got another default.htm page. So the BSP App has 2 views : default.htm which has the IFrame and Errorpage.htm.
    2. So now when the WDA expires, the events of errorpage.htm are called like OnInitialization, In this event I was calling the methods navigation->exit( 'URL of the same WDA' ).
    I did this because I wanted to reload the WDA whenever it expires. I tried to specify the WDA Url in the SICF node of the same WDA in 'Redirect URL' under the Error Page tabs but it didnot work.
    Now I realize this is not gonna work. I didnot want to modify the WDA and so I didnot specify any exit plugs in the WDA which would have taken care of reloading the WDA. But that seems to be the only way out.
    Actually speaking there are multiple WDAs which will open inside the same BSP IFrame via their own Application URLs. I have coded the BSP IFrame to read the URL Parameters and open up the corresponding WDA.  So now I have to define an exit plug in all of these WDAs.
    Do you suggest that this will solve the problem of WDA refresh ? Just to confirm.
    Thanks again.

  • Error while running webdynpro application with an Interactive form

    Hi all,
    I am getting the following defect when I run a adobe interactive form (webdynpro application). Any pointers?
    Regards,
    Deepak
    500   Internal Server Error
    Failed to process request. Please contact your system administrator.
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:464)
        ... 47 more
    See full exception chain for details.
    System Environment
    Client
    Web Dynpro Client Type HTML Client
    User agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1)
    Version null
    DOM version null
    Client Type msie7
    Client Type Profile ie6
    ActiveX enabled
    Cookies enabled
    Frames enabled
    Java Applets enabled
    JavaScript enabled
    Tables enabled
    VB Script enabled
    Server
    Web Dynpro Runtime Vendor: SAP, build ID: 7.0013.20070717142021.0000 (release=645_VAL_REL, buildtime=2007-08-11:15:13:14[UTC], changelist=455669, host=pwdfm101), build date: Wed Oct 10 10:17:00 EDT 2007
    J2EE Engine 7.00 patchlevel 109044.44
    Java VM Java HotSpot(TM) Server VM, version:1.4.2_13-b06, vendor: Sun Microsystems Inc.
    Operating system Windows 2003, version: 5.2, architecture: x86
    Session & Other
    Session Locale en_US
    Time of Failure Thu Oct 18 17:39:22 EDT 2007 (Java Time: 1192743562661)
    Web Dynpro Code Generation Infos
    local/NIBCOSecurityFormWD
    SapDictionaryGenerationCore 7.0013.20061002105236.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:26:06[UTC], changelist=419377, host=PWDFM101.wdf.sap.corp)
    SapDictionaryGenerationTemplates (unknown)
    SapGenerationFrameworkCore 7.0013.20060719095755.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:13:54[UTC], changelist=411255, host=PWDFM101.wdf.sap.corp)
    SapIdeWebDynproCheckLayer 7.0013.20061002110128.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:32:11[UTC], changelist=419396, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCommon 7.0013.20061002105432.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:14:42[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCore 7.0013.20061002105432.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:14:35[UTC], changelist=419384, host=PWDFM101.wdf.sap.corp)
    SapMetamodelDictionary 7.0013.20060719095619.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:23:29[UTC], changelist=411251, host=PWDFM101.wdf.sap.corp)
    SapMetamodelWebDynpro 7.0013.20070703112649.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:28:49[UTC], changelist=454024, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationCTemplates 7.0013.20070717142021.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:42:07[UTC], changelist=455669, host=pwdfm101)
    SapWebDynproGenerationCore 7.0013.20061002110128.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:32:21[UTC], changelist=419396, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationTemplates 7.0013.20070717142021.0000 (release=645_VAL_REL, buildtime=2007-08-07:13:42:07[UTC], changelist=455669, host=pwdfm101)
    sap.com/tcwddispwda
    No information available null
    sap.com/tcwdcorecomp
    No information available null
    Detailed Error Information
    Detailed Exception Chain
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:418)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:895)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:100)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentInteractiveFormHandlingContext.execute(PDFDocumentInteractiveFormHandlingContext.java:123)
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:340)
         ... 29 more
    Caused by: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Service call exception; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:408)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.render(PDFObject.java:3948)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:148)
         at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
         ... 32 more
    Caused by: java.rmi.RemoteException: Service call exception; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:85)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:95)
         at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:385)
         ... 35 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:464)
         at java.net.Socket.connect(Socket.java:414)
         at java.net.Socket.<init>(Socket.java:310)
         at java.net.Socket.<init>(Socket.java:125)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.initStreamsFromSocket(HTTPSocket.java:648)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.initializeStreams(HTTPSocket.java:470)
         at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getOutputStream(HTTPSocket.java:427)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.HTTPTransport.getRequestStream(HTTPTransport.java:355)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.outputMessage(MimeHttpBinding.java:550)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1432)
         at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:78)
         ... 37 more

    Hi Deepak,
    If you have solved the issue could you kindly close the thread with the solution as this will help others as well. If not kindly update the thread with the status.

  • Upload / Download document to KM Content Server from WebDynpro Application

    I have a requirement where I need to upload / download document into / from KM Content Server from my WebDynpro Application.
    Is it technically possible and if Yes, can I get any Sample code for this.

    Hi Tahzeeb,
    first of all i would point you to the JavaDocs for KMC API.
    https://media.sdn.sap.com/javadocs/NW04/SPS15/km/index.html
    And here is a small example of reading and storing KM resources.
    For reading:
         * Returns a resource as an InputStream from the KM repository
         * at the given path. The IUser is needed for authorization.
         * @param user      IUser for checking authorisation.
         * @param resPath   Path to the KM resource.
         * @return          Requested resource as a stream.
        private InputStream getKmResource(final IUser user, final String resPath)
            throws ResourceAccessException {
            try {
                final IResourceFactory factory = ResourceFactory.getInstance();
                final RID rid = RID.getRID(resPath);
                final IResource kmResource =
                    factory.getResource(
                        rid,
                        new ResourceContext(getDeprecatedIUser(user)));
                if (kmResource == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                return kmResource.getContent().getInputStream();
            catch (WcmException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
    And for writing:
         * Stores a resource in the KM repository at the given path with the given name and mimetype.
         * Content is taken from the given inputstream.
         * @param user          IUser for checking authorisation.
         * @param resName   Name of the resource
         * @param resPath     Path to the resource
         * @param mimeType MimeType of the resource
         * @param inputStream  Resource content
         * @throws ResourceAccessException
        private void putKmResource(
            final IUser user,
            final String resName,
            final String resPath,
            final String mimeType,
            final InputStream inputStream)
            throws ResourceAccessException {
            try {
                final ResourceContext rContext = new ResourceContext(getDeprecatedIUser(user));
                final RID rid = RID.getRID(resPath);
                final ICollection kmCollection =
                    (ICollection) ResourceFactory.getInstance().getResource(rid, rContext);
                if (kmCollection == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                else {
                    IContent kmContent = new Content(inputStream, mimeType, -1);
                    IResource kmResource = kmCollection.createResource(resName, null, kmContent);
            catch (ResourceException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
            finally {
                try {
                    inputStream.close();
                catch (IOException e1) {
                    throw new ResourceAccessException("Error closing InputStream when accessing " + resPath, e1, resPath);
    Hope that helps for a start.
    Best regards,
      ok

  • Using MS Access as backend in Webdynpro Application

    hi guys,
    I am creating a application in webdynpro in which i want to use MS Access as Backend, so can u please tell how to use MS Access as backend.
    What all needs to be done and where the database file needs to be stored etc. please give me all the details...
    thanks in advance
    Gaurav Makin

    Hi Gaurav,
    It is pretty easy to use the MSAccess as a  back end from the webdynpro applications. Take the driver as a JDBC-ODBBC driver and  creat the alias name for the  database  server  to use as a data source.Select the model as a Beanmodel  while creating a model in the Webdynpro explorer.
    please  find the below code which will help you lot.
    Please let me know if you need any further information.
    package com.accenture.radar.project;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    @author suvarna.chittoor
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class ProjectBean {
         private String name;
         private String description;
         private String du;
         private String saveOrUpdate;
         static DataSource dataSource;
         private Connection connection;
         private ResultSet rs;
         private ArrayList duArrayList =new ArrayList();
         private ArrayList projectArrayList =new ArrayList();
         public ProjectBean()
              try
                   //code to look up the datasource
                   InitialContext initialContext = new InitialContext();
                   dataSource = (DataSource)initialContext.lookup("jdbc/aliasforradar");
              catch(Exception e)
                   System.err.print("Error Message"+e.getMessage());
         public static Connection getConnection() throws SQLException, ClassNotFoundException
              System.err.println("In Get Connection");
              java.sql.Connection connection = null ;
              try
                   connection = dataSource.getConnection();
              catch (SQLException e)
                   System.err.println(e.getMessage());     
                   throw e;                         
              System.err.println("After getting Connection from the datasource");
              return connection;
         public void getDUInformation()throws SQLException, ClassNotFoundException
                        connection = getConnection();
                        PreparedStatement ps= connection.prepareStatement("select distinct name from du");
                        rs=ps.executeQuery();
                             while(rs.next())
                                  duArrayList.add(rs.getString("name"));
                        ps.close();
                        connection.close();
         public void saveProjectDetails() throws SQLException, ClassNotFoundException
                   Connection connection = null;
                             if(saveOrUpdate.equalsIgnoreCase("Save"))
                                  connection = getConnection();
                                  PreparedStatement ps =
                                       connection.prepareStatement(
                                            "insert into project values(?,?,?)");
                                       ps.setString(1, getName());
                                       ps.setString(2, getDescription());
                                       ps.setString(3, getDu());
                                       ps.executeUpdate();
                                       connection.close();
                                       ps.close();
                             else
                                  connection = getConnection();
                                  PreparedStatement ps =connection.prepareStatement("update project set du=?,description=? where name='"name.trim()"'");
                                  ps.setString(1,du);
                                  ps.setString(2,description);                         
                                  ps.executeUpdate();                         
                                  connection.close();
                                  ps.close();
         public void getProjectDetails() throws SQLException, ClassNotFoundException
                             Connection connection = null;
                                  connection = getConnection();
                                  PreparedStatement ps=connection.prepareStatement("select name,description,du from project");
                                  rs=ps.executeQuery();
                                       while(rs.next())
                                            Project_HelperClass proj= new Project_HelperClass();
                                            proj.setName(rs.getString("name"));
                                            proj.setDescription(rs.getString("Description"));
                                            proj.setDu(rs.getString("du"));
                                            projectArrayList.add(proj);
                                    ps.close();
                                    connection.close();
         public void getProjectInformation()
                   throws SQLException, ClassNotFoundException {
                   Connection connection = null;
                   connection = getConnection();
                   PreparedStatement ps =
                   connection.prepareStatement("select description,du from project where name='"name"'");
                   rs = ps.executeQuery();
                     while(rs.next())
                        this.description=rs.getString("description");
                        this.du=rs.getString("du");
                      connection.close();
                      ps.close();
    @return
              public String getDescription() {
                   return description;
         public void deleteProject() throws SQLException, ClassNotFoundException
             Connection connection = null;
              connection = getConnection();
              PreparedStatement ps=connection.prepareStatement("delete from sme_support where project = '"name"'");
              ps.executeUpdate();
              PreparedStatement ps1=connection.prepareStatement("delete from wbse where project = '"name"'");
              ps1.executeUpdate();
              PreparedStatement ps2=connection.prepareStatement("delete from supervisor where project = '"name"'");
              ps2.executeUpdate();
              PreparedStatement ps3=connection.prepareStatement("delete from du_lead where project = '"name"'");
              ps3.executeUpdate();
              PreparedStatement ps4=connection.prepareStatement("delete from project where name = '"name"'");
              ps4.executeUpdate();
              connection.close();
              ps.close();     
              ps1.close();
              ps2.close();
              ps3.close();
              ps4.close();          
    @return
         public String getDu() {
              return du;
    @return
              public ArrayList getDuArrayList() {
                   return duArrayList;
    @return
         public String getName() {
              return name;
    @param string
              public void setDescription(String string) {
                   description = string;
    @param string
         public void setDu(String string) {
              du = string;
    @param list
              public void setDuArrayList(ArrayList list) {
                   duArrayList = list;
    @param string
         public void setName(String string) {
              name = string;
    @return
         public ArrayList getProjectArrayList() {
              return projectArrayList;
    @param list
         public void setProjectArrayList(ArrayList list) {
              projectArrayList = list;
    @return
         public String getSaveOrUpdate() {
              return saveOrUpdate;
    @param string
         public void setSaveOrUpdate(String string) {
              saveOrUpdate = string;
    Thanks and regards
    Ratnakar reddy alwala

  • 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>

  • How to connect webdynpro application to database (Sql server)

    Hi Experts,
    Can someone suggest me how to connect webdynpro application to SQL Server. (Possibly in detail)
    Thanks Regards,
    Sandeep

    hi sandeep,
    here is a sample code which connects to a backend database Oracle; Connection is same for all DBs as you are using open sql commands.
    <b>   try {
         String eposta = wdContext.currentContextElement().getEposta();
         String tel = wdContext.currentContextElement().getTelefon();
         String company = wdContext.currentContextElement().getCompany();
         String message = " ";
         String onerikonusu = " ";
         String oneri_mdurum = " ";
         String oneri_odurum = " ";
         String oneri_bfaydalar = " ";
         String oncelik1 = " ";
         String uygulama = " ";
         String tarih = (new SimpleDateFormat("dd-MM-yyyy").format(new java.util.Date()));
         String saat = (new SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
         //java.sql.Date tarih = java.sql.Date.valueOf(creationDate);
         //java.sql.Time saat = java.sql.Time.valueOf(creationTime);
         if (wdContext.currentContextElement().getMesaj() != "")
            { message = wdContext.currentContextElement().getMesaj(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { onerikonusu = wdContext.currentContextElement().getOneri_konusu(); }
         if (wdContext.currentContextElement().getOneri_mdurum() != "")
              { oneri_mdurum = wdContext.currentContextElement().getOneri_mdurum(); }
         if (wdContext.currentContextElement().getOneri_konusu() != "")
              { oneri_odurum = wdContext.currentContextElement().getOneri_odurum(); }
         if (wdContext.currentContextElement().getBekfaydalar() != "")
              { oneri_bfaydalar = wdContext.currentContextElement().getBekfaydalar(); }
         if (wdContext.currentContextElement().getOncelik() != "NULL")
              { oncelik1 = onceliktxt.toUpperCase(); }     
         if (wdContext.currentContextElement().getUygulama() != "NULL")
              { uygulama = app.toUpperCase(); }
       InitialContext ctx = new InitialContext();
       javax.sql.DataSource ds =
       (javax.sql.DataSource) ctx.lookup("jdbc/SAPEPPDB");
       java.sql.Connection con = ds.getConnection();
       con.setAutoCommit(false);
       java.sql.Statement stmt = con.createStatement();
         String sql;
          int rows;
          sql = "insert into tmp_feedbacks " +
               "(puid, name, tel, email, company, konu, oncelik, uygulama, mesaj, onerikonusu," +
               "oneri_mdurum, oneri_odurum, oneri_bfaydalar,tarih,saat) " +
               "values ('" + username + "', " +
                         "'" + name + "'," +
                         "'" + tel + "'," +
                         "'" + eposta + "'," +
                         "'" + company + "'," +
                         "'" + konutxt.toUpperCase() + "'," +
                         "'" + oncelik1 + "'," +
                         "'" + uygulama + "'," +
                        "'" + message + "'," +
                        "'" + onerikonusu + "', " +
                        "'" + oneri_mdurum + "', " +
                        "'" + oneri_odurum + "', " +
                        "'" + oneri_bfaydalar + "', " +
                        "'" + tarih + "', " +
                        "'" + saat + "' " +
         stmt = con.createStatement();
         rows = stmt.executeUpdate(sql);
         con.commit();
         stmt.close();
       catch(Exception e){
            IWDMessageManager msgMgr =
                    wdComponentAPI.getMessageManager();
       msgMgr.reportException(e.getMessage(),true);
       }</b>
    The value <b>ctx.lookup("<jdbc_pool>");</b> depends on your system id.
    if your system id is SID the the string has to be <b>jdbc/SAPSIDDB</b>
    you can check it via visual admin >> server >> services >> jdbc con.

Maybe you are looking for