Calling Java code from Webdynpro Abap UI

Hi All,
Can anybody tell me, How to make calls to java code on a button click from webdynpro ABAP UI ?
Thanks in Advance.
Jenish .V. Joy

Hi Jenish,
As I am new to WebDynpro for ABAP I could not help you out exactly.But See this link which will help you to create applications in WebDynpro by using ABAP language.
https://www.sdn.sap.com/irj/sdn/developerareas/abap?
rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
If you get any answer for your question let me know.
Regards,
Karthick K Eswaran

Similar Messages

  • 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

  • Reg calling Transaction code in Webdynpro ABAP

    Hi All,
    Can I call Transaction code in Webdynpro ABAP Portal Application. If so, how can this be possible? Can anybody give me a lead?
    Thanks.
    Kumar Saurav.

    Hi,
    The most easy Way is here:
    1) Test any Webdynpro Application from SE80 when the webdynpro Browser opens to display output
    Copy its HTTP link, Suppose we get the below link
    http://r3d01web1.Siemens.dk:8001/sap/bc/webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN
    2) Now replace some part of the above link ( webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN )  with the new link part ( gui/sap/its/webgui?~transaction=PA30 )
    So that the newly generated link is such that the below one:
    http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30
    Note in place of PA30 you can put any of your desired tcode.
    3) Now Just Make a webdynpro component and in its View layout put a LINK TO URL ui element
    and in its property REFERENCE just past the http link ( http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30 )
    4) Activate and test your webdynpro Application.

  • Calling a webservice from webdynpro ABAP.

    Hi,
    Anybody have doc/material with screenshots on calling a webservice from webdynpro ABAP (In WAS 7.0 version using service calls )  with clear steps ?
    Thanks in advance. Ponts will not be a constraint for right answers
    Praveen
    Edited by: Praveen kumar Kadi on Feb 23, 2009 11:19 AM

    Hi Praveen,
    1st Step : configure Logical Port
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    2nd Step : Generate Proxy Object
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    3rd Step : Instantiating the proxy object & calling the methods exposed by webservice
    data: sys_exception type ref to cx_ai_system_fault,
          sys_exception2 type ref to cx_ai_application_fault,
          client_proxy type ref to zco_myesa, "MY PROXY CLASS
          lv_ret_code type int4,
          lv_input type zsend_email_input,
          lv_response type zsend_email_response.
    data: lv_from type string,
          lv_from_address type string,
          lv_to type string,
          lv_to_address type string,
          lv_subject type string,
          lv_msg type string.
    lv_input-from = 'MYSAPTEST'.
    lv_input-from_address = '<someAddress>'.
    lv_input-to = 'Prashant'.
    lv_input-to_address = '<someAddress>'.
    lv_input-subject = ' TEST'.
    lv_input-msg_body = ' Hi this is wonderfull to see it work'.
    try.
    create object client_proxy
    exporting
    logical_port_name = 'BASIC'. " Basic is a TYPE G RFC Destination
    call method client_proxy->send_email
       exporting
         input  = lv_input
       importing
         output = lv_response    .
      catch cx_ai_system_fault  into sys_exception .
        data lv_err type string.
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
      catch cx_ai_application_fault into sys_exception2  .
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
    endtry.
    if lv_response is initial.
       write: /'Not Executed'.
    else.
       write: /'Did Execute'.
    endif.
    Greetings
    Prashant

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to call a webService from WebDynPro ABAP ?

    We are trying to call a webService from WebDynPro-ABAP application. It is not working, While if we are calling the WebService from a Report, it is working.
    How exactly do we call a WebService from a WebDynPro-ABAP application?
    What are the main steps involved ?

    Hi Phani,
    You will need to create a service call as follows.
    Right click on your WD component name and select Create->Service Call
    The wizard will guide you through a series of steps to make a Web Service Call. On the 3rd screen, it will give you options such as Function Module, Web Service, etc
    Before making a service call, you will need to create a proxy for the Web service in the ABAP Workbench using a WSDL document as a basis. To create or consume Web services, you will need the authorizations associated with the role SAP_BC_WEBSERVICE_ADMIN.

  • Calling java code from oracle apps form

    I've created my own java .class file and am attempting to call it from an oracle applications form. I am getting a runtime error while running the form, but I don't know what the error is because nothing is being reported to me.
    I've created the .java file in JDeveloper, compiled it into a .class file, deployed it to a .jar file, and placed it on the application server in a directory that the CLASSPATH can see it. I've added it to the archive parameter of the appsweb.cfg file and see that the .jar file is being downloaded when the JInitiator of Oracle Apps is started.
    I have also imported the .class file into the form via the Program -> Import Java Classes which resulted in PL/SQL package stubs created to call the .class methods.
    When I run the form, the java code is activated on a triggering event, PRE-INSERT. There is no java bean item in a block or on a canvas anywhere. I dont' think I need there to be since I am simply using the java code to perform actions during PRE-INSERT, not to display anything on the canvas.
    I have placed debug messages throughout my code and see that the error is occuring in the PL/SQL packaged stub at the line "JNI.GET_CLASS()" where the parameter to that call is the name of my class. I know it's erroring there because I am handling the "java_error" exception. I am displaying "ora_java.last_error" in the exception handling, but it is null.
    I am at a loss as to determine why I am having problems and how to display an error. Any suggestions? I'm happy to outline my steps and problem in more detail if I have missed something obvious.
    We are using Forms 6.0.8.21.3 with Oracle Apps 11.5.7.
    Shane.

    Shane,
    Don't loose the heart. You have come too close to end.
    The scenario you have mentioned is very unique and something which will fit more in the forms forum. So I think that was a sincere answer to help you and not a "pass the buck" card type game :)
    You are lucky that you got Tapash interested into this issue, otherwise you see there is no OAF component involved out here.
    I have an article promised to some of the guys but will follow this issue.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to call BSP page from Webdynpro ABAP ?

    Hi All,
         I have a BSP page which has a page attibute . I need to pass a parameter from Webdynpro ALV table to the BSP page attibute and also need to display that BSP Page . Can any one help me out , how to proceed in this ?
    Regards,
    Kalpana A .

    hi kalpana,
    Use Exit Plug and pass data as URL Parameter.
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/content.htm
    for how to pass url please check this
    http://help.sap.com/saphelp_nw70/helpdata/EN/7b/fb57412df8091de10000000a155106/frameset.htm
    Yogesh N

  • Calling adobe form from webdynpro abap view

    Hi,
    I need some help. The situation is: I have created a Adobe form interface as well as a form using the SFP transaction. Now, I have a webdynpro screen with a button, which upon pressed must give the output of the PDF form.
    I tried the following steps:
    1. Call function 'FP_FUNCTION_MODULE_NAME'
    2. Call 'FP_JOB_OPEN'
    3. Call the generated function module name
    4. Call FP_JOB_CLOSE.
    The procedure works fine when I use the same code in a report program. It opens a dialog box where there is a option for Print preview and it displays the PDF.
    But when I try to replicate the same, it does not work in Webdynpro for ABAP. Any suggestions as to how to go about this problem?
    regards,
    Praveen Kumar

    Hi Praveen
    there is documentation on the Web Dynpro for ABAP integration of Interactive Forms in the SAP Help Portal at http://help.sap.com/saphelp_nw2004s/helpdata/en/aa/940ee5331b4b8fa0a6cb6714dc5db4/frameset.htm which should answer most of your questions.
    You specify the form to be used during the design of your Web Dynpro application (you are prompted to determine it when you insert the UI element).
    You can save the form from the Reader toolbar, the question would be why would you want to do this and not use a proper download screen.
    A proper tutorial is planned to be available in June. Until then, check the ABAP page in SDN for some e-learning / webinar recording), or directly here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3
    Cheers,
    Markus

  • How to call java code from xslt.

    I have to do some complex looping in my stylesheets. It is difficult to implement it directly. can i write a javacode for the same and invoke it from my stylesheet? Can anyone help me out with a demo if possible?

    you're the one supposed to provide updates on your progress, not anyone else...

  • Calling java code from vc++6

    please explain how i can do this

    [url http://forum.java.sun.com/thread.jspa?messageID=4219645&start=3]Look at my answer here.
    Regards

  • Calling custom Infotype method from Webdynpro Abap

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from webdynpro abap this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Hi Ashish,
    You need to create method inside your assistance class, the class your webdynpro component talks to.
    Within the methods of Assistance class you will have to create instance of ZCL_HRPA_INFOTYPE_9111 and call its  method IF_HRPA_INFTY_BL~INSERT  passing the data.
    Cheers
    Prashant

  • Looking for an idea to call action listner or other way to call java code

    Hi
    I'm building some project on JSF2
    I'm Looking for an idea to call action listner or other way to call java code from link(not commandlink)
    and i got a sign out button which i want to invalidate the session when its clicked...
    i cant do a redirect to a jsp... its a "special" link that does the log out , so i cant use the link for the session invalidation
    I dont want to use commandLink cause i need to put it into a form, and i don't to make my code uglier...
    any ideas?
    Im using JSF 2 (new to it)

    Under the constraints you have given the only thing I can think of is some kind of "pretty url" technique combined with JSF. Google can help you out. (Although that might be overkill for what you need.)
    Other than that I think you are looking at straight Java or JSP solutions that do not involve JSF.

  • How to call IAC Iview from WebDynpro java code

    Hi Team,
    I am tring to call IAC Iview from WebDynpro Java code. we are passing value but blank page  displayed and there is no error show on error log.
    Below is Java Code which i am calling.
      public void wdDoInit()
          try {
                String strURL = "portal_content/TestSRM/iView/TestSRM";                           //WDProtocolAdapter.getProtocolAdapter().getRequestParameter("application");
                 String random = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("random_code");     
                 //wdContext.currentContextElement().setRandomNumber(random);
    //below we are call URL           
    WDPortalNavigation.navigateAbsolute("ROLES://portal_content/TestSRM/iView/TestSRM?VAL="+random,WDPortalNavigationMode.SHOW_INPLACE,(String)null, (String)null,
                       WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String)null,(String)null, " ");
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    I am passing value from URL.
    http://<host Name>:<port>/webdynpro/resources/local/staruser/StarUser?random_code=111111111
    when we call above URL we getting blank screen.
    Regards
    Pankaj Kamble

    Hi Vinod,
    read this document (from pages 7 ).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62</a>
    In addition lok at these links: (Navigation Between Web Dynpro Applications in the Portal)
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm">http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm</a>
    It may be helpful for you.
    Best regards,
    Gianluca Barile

  • Error while calling java program from ABAP

    Hi Experts,
    We are trying for RFC inbound scenario.
    We followed the below blog
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    We are working with SAP JCO 3.0.2
    We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
    After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
    If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
    But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
    'STFC_CONNECTION' could not be found in the server repository.
    If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
    'RFCPING' could not be found in the server repository.
    We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
    Please help us in resolving this issue.
    Thanks
    Prince

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Regards,
    Sree

Maybe you are looking for

  • Very Disappointed in Verizon Tech Support re: iPhone Visual Voicemail

    I receive a new iPhone 4S with no voicemail capabilities. I take it into the Verizon store and they are nice enough to call tech support with me and do a restore and all of that. Tech support says my phone is "a lemon" and I have to go into Apple and

  • DBMS_LOB

    Hi, With regards to format the SQL trace files, could DBMS_LOB package helps us in order to format the SQL trace files instead of using TKPROF utility. If so, could some one suggest how we use dbms_lob package in order to format the sql trace files.

  • Can't create second caldav account

    I have a work calendar that I have successfully synced with google and embedded on my website. Now I would like to sync a second calendar for family stuff. But every time I try to create a second caldav account in iCal, nothing happens! I need a seco

  • Minimizing downtime after house move.

    I'm moving house in October and wish to have Infinity from the moment I move in. How can I acheive this? The previous owner has Infinity and so I am assuming that an engineer visit is not required - is that a fair assumption? I am not moving my exist

  • Organizer Elements 12 doesn`t work

    Hi, Organizer Elements 12 doesn`t work since 3 Days. When I started elements 12 and mark organizer then the programm started load the first picture und crashed down with a issue. Can I start the organizer without any Pictures and Katalogs ?