How to call jsp/ejb in webdynpro applications

Hi
Is It Possible to call jsp and EJB in webdynpro applications.If it is please let me know..
Regards
Chandra

Hi,
You can call JSp and serlvets using suspend and resume plugs
/people/bertram.ganz/blog/2006/07/03/web-dynpro-java-foundation--whats-new-in-sap-netweaver-2004s
http://help.sap.com/saphelp_nw04s/helpdata/en/42/bb8c6cc7131d67e10000000a1553f6/frameset.htm
For EJbs you can create a DTO and try to make use of the model import available in Webdynpro.
Regards
Ayyapparaj

Similar Messages

  • How to call Standard Iviews in Webdynpro application?

    How to call STD iviews  in the wwbdynpro application.
    can any of friends give the code

    Use this snippet to call standard iviews from your webdynpro code :
    //use LinktoAction UI element
    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);
    Hope this helps.
    Rgds
    Prabhakar

  • How to call a servlet from Webdynpro application

    Hi All,
        I am new to SAP . I have requirement to call a SERVLET which is on a different application server from my webdynpro application , the servlet will return a file .. i need to display that file to the user .. can some one tell me how this can be done .. If possibel please provide some sample code.
    Regards,
    Tarun.

    Hi
    Check this
    1. How to access Servlet information from a webdynpro application ?
    Regards
    Abhijith YS

  • How to call Function Module from webdynpro application ,up on click url in

    Hi Experts,
    I need your help for the following scenario.
    In my WebDynpro application , I am displaying the sales orders in a table.
    one of the column in table  i.e. sales order number is displayed with hyper link, up on click the sales order number column, i have to pass the  po number to the a remotefunction with as one parameter and  enjoy = 'x' as another parameter  that should call me23n transaction and the transaction screen should be displayed in the webdynpro application with po details.
    Thanks In Advance.
    your help is rewarded.
    Best Regards.
    Rao.

    Hi Rao,
              1.Create binding to view to Controller.
              2.Create table->Add column->Add table cell Editor(select LinkToAction UI Element in options).
              3. Bind the property <i>text ->sales order number</i> (Output/<model node>)
              4. Create an Event <salesOrder>
                                       // do null check
                                       // set your input parameters
                                       // input sales order number = current output sales order number
                                       // enjoy="x"
                                       // call controller's method() that executes RFC
              5. Bind this event    LinkToAction  property action-> <salesOrder>  
    To execute RFC, the code is available in sample tutorials.
    Hope this helps
    regards,
    Siva

  • How to call report program from WebDynpro Application

    HI
    How call  report program in WDA.
    1. To extract the xml files and store the data in to data base table, program name is "zprogram_application".
          When run the se38 it's working fine and save the data in database.
    2. When i click "SUBMIT" button the web dynpro application automatically run the Report program "zprogram_application" and save the data into data base table. This is my requirement please give me suggestions.
    3. I want run the report program in web dynpro application.
    Thank you
    V.VENKATESH

    From within the WDA Event handler you can call the program using SUBMIT ... AND RETURN.  You might have to be careful with what the program does.  It must run as though it is in the background.  There is no connection to the client machine - so no SAPGUI calls.  You might also consider the addition VIA JOB job NUMBER n...  to the SUBMIT command.  That will allow you to start the submitted program as a background job.  Your WDA can then continue processing as the submitted job runs in parallel.

  • How to call one EJB in another EJB?

    How to call one EJB in another EJB? Please explain with some example code.

    To refer a Ejb from another Ejb include <ejb-ref> element in ejb-jar.xml
    <session>
    <ejb-name>EjbA</ejb-name>
    <ejb-ref>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.ejb.EjbBHome</home>
    <remote>com.ejb.EjbB</remote>
    </ejb-ref>
    </session>
    Include a <reference-descriptor> in weblogic-ejb-jar.xml
    <weblogic-enterprise-bean>
    <ejb-name>EjbA</ejb-name>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>EjbB</ejb-ref-name>
    <jndi-name>com.ejb.EjbBHome</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    In EjbA Bean class refer to EjbB with
    a remote reference to EjbB.
    InitialContext initialContext=new InitialContext();
    EjbBHome EjbBHome=(EjbBHome)
    initialContext.lookup("com.ejb.EjbBHome");
    EjbB ejbB=EjbBHome.findByPrimaryKey(primarykey);

  • How to Call third party Jar into Application

    Hi Can any Expert help ?
    I want to put third party Jar into my application but i have some problem occur.
    1. how to call jar with parameter in application ?
    2. when i exit the third party jar task, it will exit my main task too. How to set my main tast exit stats standalone ?
    3. I have over 10 jar files in one application, how can i set a classpath for client to call JNLP, instread of load all jar to client before run.
    Thanks.
    Sanki Poon ([email protected])

    1) Sounds like you are trying to launch the third party from it's application main instead of using it as an API How does your code interact with it or is that not important?. You don't call a jar, you load a class. You could use a exec http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html to run the java launcher and pass it all it's command line stuff(But this may not be possible security wise via WebStart).
    2) if it is launched in the same JVM and it calls a System.exit there is nothing you can do about your app closing too. It would need to be in another instance of the JVM
    3) Under the resources tag you can have as many jar tags as needed.
        <resources>
            <j2se version="1.5.0" java-vm-args="-esa -Xnoclassgc"/>
            <jar href="/jsf-wita/apps/MathMLWebEditor.jar"/>
        </resources>

  • How to Call the RFC in Webdynpro abap application

    Dear Experts,
    Good Evening to all...
    I have to add two numbers using RFC in webdynpro abap application. If we give the numbers in the input screen then the RFC should add it and give it in the output screen. This is the application for that I have created the RFC.
    But the problem is i don't know how to call the RFC in that Webdynpro abap application and how to link the input view and output view with that RFC...? I am new to Webdynpro abap. Please kindly help me on this... I am struggled here... I need your help in this....
    Thank You.

    Hi Jaga,
    You asked the same question again.
    Without closing the [previous one|Re: Where SAP store the uploaded files?].
    I think Abhi has answered your question.
    If not please elaborate on the problem.
    The solution btw is to create a Service Call.
    Sumit

  • How to call jsp /servlets running in different web application in tomcat

    hello all,
    i have 2 web applications(Charts and Reports) in the same tomcat,i want to call jsp/servlets running in the Reports webapp from Charts webapp.how do i achieve this.
    thanx
    ravi

    You can also use getContext(String context) in the ServletContext class to get a request dispatcher.
    Using the above example it would be :
    // in a servlet in the charts webapp
    ServletContext context = getServletContext();
    ServletContext reportsContext = context.getContext("/reports");
    RequestDispatcher dispatcher = reportsContext.getRequestDispatcher("/path")
    dispatcher.forward(request, response);Just note, that depending on your server's configuration getContext(...) might return null.

  • How to use call transaction stmt from webdynpro application

    Hi Expers,
    Can I use call transaction 'tcode' in my webdynpro application, I have tried in my application but i am getting short dump saying
    Error analysis+
    An exception occurred that is explained in detail below.The exception, which is assigned to class'CX_SY_SEND_DYNPRO_NO_RECEIVER',  was not caught and therefore caused a runtime error. The reason for the exception is: During background processing, the system  attempted to send a screen to a user. Current screen: "SAPLMGMM " 0060.
    I haven't used any more statements in my application am sure from my application side everything perfect. but I have seen a screen shot
    with SAP screen in webbrowser.
    Please help me out if you are not clear abt my doubt please ask me for clear idea.
    Thanks in advance
    Phalani M

    Hello,
    Since you can't use the call transaction command in web dynpros components, I suggest you to create a report and fill a BDC table on this and use the call transaction in this report.
    So, in your web dynpro component you can use a command SUBMIT to create a job in background.
    DATA: number           TYPE tbtcjob-jobcount,
          name             TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards.

  • How to call the EJB methods from servlet/jsp

    Hello ,
    i have write one ejb signOn having the method validateUser(username,password).i can able to call this function from client.java class.i want to know whether i can call this function from servlet.if yes then where to write that servlet and web.xml file.
    At present i m using weblogic server 8.1and i create directory call c:\ejb\demo and put the ejb files(home ,remote,ejb class ,client.java) then i have created .jar file and put in application file.
    Now i want to create a servlet for that i have to create a new directory and put the servlet,web.xml,weblogin-web.xml file and then create one .war file and put in application directory or do some thing extra.Please help me.
    Thanks In Advance
    [email protected]

    I think this might not be the most appropriate forum for your question. You might try a forum about ejb, or weblogic, or jndi.

  • In a single program how to lookup different EJB from different application

    Hi,
    I have deployed two applications app1 and app2 on oc4j.
    There is a stateless session bean in a1 called ejb1.
    And there is also a stateless session bean ejb2 in app2.
    I write a test jsp in app1 to lookup ejb1 and ejb2 as an application client. So I need to create an application-client.xml for it.
    <?xml version="1.0"?>
    <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
    <application-client>
    <display-name>ejbs</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb1</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>class_of_ejb1Home</home>
    <remote>class_of_ejb1</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb2</ejb-ref-name>
    <ejb-ref-type>ejb2</ejb-ref-type>
    <home>class_of_ejb2Home</home>
    <remote>class_of_ejb2</remote>
    </ejb-ref>
    </application-client>
    However, When I run the test.jsp, It will report following error:
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2
    In fact, if I only lookup any of the ejb and the application-client.xml just specify only the according ejb-ref, everything is alright.
    But how to construct the application-client.xml so that it can suitable for 2 different ejb in different application? Do I miss something in doing it?
    Kindly advice!
    Queeny Tang

    Hi Debabrata Panda,
    I did add parent in web.xml, but it still encounter
    "Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2"
    In my program, a jsp in app2 will lookup ejb1 of app1. In the same way, a jsp in app1 will lookup ejb2 of app2.
    if I declare in server.xml
    <application name="app2" path="../applications/app2.ear" parent="app1" auto-start="true" />
    <application name="app1" path="../applications/app1.ear" parent="app2" auto-start="true" />
    That will cause error reading application-client.xml for all
    ejbs.
    How to solve this.
    Thanks in advance!
    Yours Queeny

  • How to call ME21n Screen in webdynpro once you click any button

    Hi exports,
                     I have created one webdynpro application..In first view i have one button which have action...Once i click that button
    it should go to next view where it should diaplay standard Transaction ME21n screen..where i need to enter all PO details..finally PO should be created auotomatically like normal SAP...
    Can anybody plz help me how can i acheive this?
    Thanks & regards,
    Praveena.

    You have to create  Transaction iView for ME21n in portal.
    Call the iView using portal integration api
    Web Dynpro for ABAP Portal Integration [original link is broken]

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • How to call session EJB from EP service in EP 7.0?

    Hi,
    I am trying to invoke stateless session EJB from my portal service. Both the service and EJB are deployed on the same server which is EP 7.0.
    I found [this|http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm] in SAP help and tried to implement it (added PrivateSharingReference to portalapp.xml and implemented the code), but everytime I try to lookup the session bean and cast it using P4ObjectBroker.narrow() method, I get java.lang.ClassCastException. The object found in JNDI and my portal service have different classloaders, so I suppose this is the problem, but I don't know how to handle it...
    Can anyone please help me?
    Regards,
    Tomas

    Hi Satya ,
              please go though following blog for used DC concept.
    Componentization of Webdynpro Application in CE7.1
    In netweaver 7.1 interface controler is abstract and component controller is implementing interface controller so the context data and methods have to be implemented by component controller

Maybe you are looking for