Calling RFCs from Webdypro application!!!!

Can anybody show me a suitable example for calling rfc from webdynpro application.

Hi steve,
Look at this tutorial..
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on accessing abap functions in web dynpro - 4.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on handling transactions with bapis in web dynpro - 5.htm
Follow the steps provided in those documents.
You can easily understand how to access ABAP functions from WebDynpro.
Let me know if you need more help on this.
Regards,
Karthick

Similar Messages

  • Example-- Call RFC from external Java Application

    Update: I need code example to call RFC from External Java application. Can onybody help me?                                                      
    RGDS
    RP
    hi all.
    i want to create my own log for each interface.
    i saw this blog:
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    my doubt is how to catch the error that i see in SXI_MONITOR y put it in a Sub-Objetc.
    For example: in sxi_monitor i get the error for my interface NMUCustomer: "No receiver could not be found" or "Error Mapping Traformation".
    I created an Object called ZNMUCUSTOMER and a Sub-Objetc called ZERROR.
    what i must do to get the error I see in monitor and assign it to Sub-Object??
    Rgds.
    Message was edited by:
            Rodrigo Pertierra
    Message was edited by:
            Rodrigo Pertierra
    Message was edited by:
            Rodrigo Pertierra

    Hi,
    Oh, you are using ABAP mapping ......
    then use the following in ABAP mapping ..
    TRACE1,TRACE2,TRACE3.... for trace level 1,2,3......
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/866ce290-0201-0010-338f-b8c3553aaa0f
    Regards
    Chilla

  • Not able to call RFC from webdynpro

    Dear Experts , I want to call a rfc from my webdynpro application , but its not working
                          I have a function module in my ECC system , that I want to call from webdynpro application of SRM system but its not working , it is not showing any error also
    I called the function module like
      CALL FUNCTION 'ZFM_SR_GET_PLANT_RFC'  DESTINATION lv_logsys
        TABLES
          it_plant = lt_pr.
    the control is just passing thru this function call but not going inside it,
    at the same time when I call this function module from my report program in SRM it's working fine , is there anything else i have to specify to call it from webdynpro application ?
    Please help

    Hi thomas ,
    I have added the exception for my function module , but they didnt triggered ,while debugging I have observed that no exception occured at the point of call , and my sy-subrc eq 0 ,
    se I did like this
      CALL FUNCTION 'ZFM_SR_GET_PLANT_RFC' DESTINATION lv_logsys
        TABLES
          it_plant                            =    lt_pr
        EXCEPTIONS
          system_failure                =    1  MESSAGE msg
          communication_failure    =    2  MESSAGE msg
          OTHERS                          =    3.
      IF sy-subrc <> 0.
        MESSAGE ID 'ZMSG01' TYPE 'E' NUMBER '00' WITH msg
                INTO ls_message-message.
        CALL METHOD wd_comp_controller->gref_message_manager->report_error_message
          EXPORTING
            message_text = ls_message-message.
      ENDIF.
    AT CALL FUNCTION  statment the control is just passing thru it , and not going inside function module

  • Call Webgui from WD application with only one log on

    Hi
    In my first application using WD ABAP, requirement is to call WEBGUI from the application.
    Calling WEBGUI is working fine but while calling WEBGUI the system asks for another log-on which is not required.
    When the application first executes it asks for logon again while calling WEBGUI the system asks for another logon,
    please let me know how can we avoid second logon?
    Note - I am using RFC host name while creating URL for WEBGUI.
    Thanks, in advance

    Hello Trupti,
    Are you using fully qualified host names?
    Edgar

  • Help for Calling RFC in B2C application.

    hi,
    We had written one RFC and all java classes related to that.
    we are able to call RFC in b2c application.we are calling RFC on loading of JSP.
    now my requirement is to call same RFC in other JSP but muliple times(in a for loop).But how can i do that?
    one thing is sure we cannot calll this RFC on loading of new jsp page.we have to call inside jsp page(in a loop).
    there is any way?
    please help me out.
    thanks in advance.
    jayesh talreja

    Two things I would like to say here:
    1) Calling RFCs directly from JSP is not supported so we need to use interfaces and backend classes.
    2) Calling an rfc is java code and in jsp we write java code along with html to make it dynamic...so dynamic
    call is also possible.
    ie. suppose we want to call our rfc for fetching some data from the backend based on the data entered at item level once the user clicks on update button on order creation page.So we can write the code like below
                                  <%--   messages --%>
                                       <%@ include file="/b2b/itemErrMsg.inc.jsp"%>
                                       <% } %>
                                       <%-- ui.showItemDetailButton() --%>
                                       <% } %>
                                       <%-- ui.isBOMSubItemToBeSuppressed() --%>
                                       <%--Start of addition by Arshid --%>
                        <!-- From here our custom rfc call is starting-->
                        <%
                             String arg1[]= {"crm~isa~isacore~resources_en"};
                             if((JspUtil.removeNull(item.getProduct()).length()) !=0 && !(JspUtil.removeNull(item.getNetValue()).equals(WebUtil.translate(pageContext,"yourcompany.order.minimumValue",arg1))) )
                                  String baseUOM = "";
                                  int enteredQuan= 0;
                                  double minOrderQuan = 0.00;
                                  double roundingValue = 0.00;
                                  BusinessObjectManager isaBOM = (BusinessObjectManager)userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
                                  User user = (User)isaBOM.getUser();
                                  Shop shop = (Shop)isaBOM.getShop();
                                  String distrChannel = shop.getDistributionChannel();
                                  String sod = shop.getSalesOrganisation();
                                  Z_CustomBusinessObjectManager customBOM = (Z_CustomBusinessObjectManager)userSessionData.getBOM(Z_CustomBusinessObjectManager.CUSTOM_BOM);
    //Z_prodInfoValue is a bo that will hold the data returned from rfc call
                                  Z_prodInfoValue z_prodinfo = customBOM.getZ_prodInfobo().getProdInfo(Zeropadding.productInfoNoPadding(item.getProduct()), sod, distrChannel);
    <!-- Call ends here and this piece of code is called for every item on clicking on update buton -->
    Although this is not a good code design as instead of making multiple calls to the backend we can get the above thing done in a single call also.I wrote this code just to give an example .
    This clearky proves we can have dynamic calls to the backend through jsps also.
    But Jayesh, your question is not very clear to me.
    If its about for loop, where you want to call the backend for multiple times with different set of values than i would rather suggest you to create lists of these different datasets and send these in a single call to the backend and fetch the data similarily in tables in a single call.
    Regards,
    Arshi

  • Calling RFC from JSP : development component

    Hi everyone,
    I created JSP that call RFC from SAP/R3.
    I have problem with the DestinationService.
    Without DCs, it worked very good.
    But since I created a DC for my JSP project, I have exception at run time regarding
    the java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/DestinationService.
    Eventhough I add the specific jar, I get an excpetion.
    Thanks for the help.
    David

    Go to the application-j2ee-engine.xml file and add following reference:
         <reference
              reference-type="weak">
              <reference-target
                   provider-name="sap.com"
                   target-type="interface">tcsecdestinations~interface</reference-target>
         </reference>

  • Sample Java code and detail to call RFC from Java clas developed in Eclipse

    Hi All,
    I am new to Java. I have downloaded Eclipse IDE  and planning to use for developing Java application to send data to SAP by calling RFC JCO Interface.
    I need a sample java code/tutorial step by step to create Java class for simple example to call RFC from Java.
    I have downloaded SAPJCO3 from service market place.
    Kindly help me to send steps involved to configure for JCO  with my Eclipse with JCO.
    Thanks in advance.
    Sharma

    Hi Sharma,
    Please have a look at [Example: Using Generated Proxies to Call Function Modules |http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm]
    JCo Exceptions : http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/daea401675752ae10000000a155106/content.htm
    Hope it will helps
    Regards
    Arun

  • Call RFC from DELPHI Windows Services Program

    Hi all,
    Are there any way to call RFC from DELPHI Windows Services Program?
    Best regards.
    Munur EBCIOGLU

    Hi again Bhagat,
    1. Yes, it's included on 7.4 ABAP Stack (SAP NetWeaver 7.4 SP8 - Optimized for SAP HANA, Cloud and Mobile - Service Release 2 available now!). In a recent customer, SAP licences GW by user but there are other license model like session licensing: https://store.sap.com/sap/cp/ui/resources/store/html/SolutionDetails.html?pid=0000009470&catID=&pcntry=US&sap-language=EN&_cp_id=id-1385059687642-0
    2. You could install as an AddOn on your 7.3 system, there are many options depending on your desired infrastructure: SAP Gateway deployment options in a nutshell For example our customer have deployed Central Hub Gateway in a standalone stack ABAP to act as an standalone oData bridge between ABAP/nonAbap systems.
    3. You could deploy SAPUI5 apps in 7.x, Java Web Servers or HTTP Web Servers. You must consider your SSO scenario:
    - SSO Logon Tickets. You will need to configurate SSO Logon Tickets between SAP NW Portal & SAP NW Gateway & your backend (ECC, etc). In order to pass SAP session cookie you will need setup SAP Web Dispacther and access portal & gateway throught SAP WD with the same domain.
    - SAML2 Tickets. This scenario lets you provide portal & gateway on different domains enabling SSO. You could configure SAP NW Portal as an Identity Provider and other systems must trust SAP Portal as IdP.
    Cheers

  • How to call RFC from Power Builder

    Hi,
    I am using Power Builder Tools and I want to know how can i call RFC from Power Builder
    Thanks for ur reply

    Hi,
    Although I have not worked with Powerbuilder, I am sure if you have a certain level of proficiency with it, you will be able to code your logic that will call your wrappers written in VB/C/.NET etc. Check out the wonderful weblog by Thomas Jung on integrating ActiveX controls with ABAP Control Framework at https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/995. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Do get back if you have further queries.
    Regards
    Message was edited by: Shehryar Khan

  • Call ITS from BSP Application

    i have created a ITS screen which in turn calls a Abap report
    I want to call this ITS screen from a BSP application .
    Could you please provide some sample code which is used to call ITS from BSP application..
    Useful answers will be rewarded
    Thanks

    Since it is related to both ITS and BSP i thought i can post it in both. and also i didnt get answers for the queries..... for a long time. Anyhow i will take your suggestion for my future query.
    i hv done using iframe to call my ITS application.
    I can able to call the Bsp application whichin turn calls its screen abap program.
    while executing ,  the selecting the directory from the file browse pop up doesnt work for downloading the file
    becos the client , they will not change the settings related to applet in the internet browser for security reasons.
    I hav to make it some how to make it work in the portal which calls this BSP application..
    at the moment i mapped this BSP application to the user role in the SUS Portal . but it appears in the SUS portal . but i m not able to click the application and also handsymbol is not seen while bringing the mouse to that area.
    Could you please tell me , how to use Action_id for that particular application, Authorisation profile settings.
    Kindly  give your suggestions asap.

  • Calling RFC from custom connector

    Hi,
    I am developing a custom connector for UWL to get tasks from 3rd party system.
    I need to call a RFC from backend SAP system to complete Input data for this 3rd party provider.
    I assume that I have to make an RFC call from getItems() method of connector.
    Any idea how to call a RFC from UWL custom connector code?
    Please help.
    Thanks & Regards,
    Amey

    Hello Karri,
    Yes, I am aware of two ways of calling RFCs from Java code.
    Normally, I use following approach to call RFCs from my other Portal Components (JSPDynpages): -
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentContext myContext = request.getComponentContext();
    IPortalComponentProfile myProfile = myContext.getProfile();
    String sapSystem = myProfile.getProperty("SystemIdentifier");
    ISystemLandscapeWrapper landscapeWrapper = (ISystemLandscapeWrapper) UMFactory.getSystemLandscapeWrappers().get(0);
    ISystemLandscapeObject systemLandscapeObject = landscapeWrapper.getSystemByAlias(sapSystem);
    IJCOClientService clientService = (IJCOClientService) PortalRuntime.
    getRuntimeResources().getService(JCO_CLIENT);
    request.getNode().putValue(LOCALE_NODE_KEY,     Locale.ENGLISH);
    IJCOClientPoolEntry poolEntry = clientService.getJCOClientPoolEntry(sapSystem,request);
    JCO.Client client = poolEntry.getJCOClient();
    client.connect();
    IRepository repository = JCO.createRepository("repository", client);
    IFunctionTemplate functionTemplate = repository.getFunctionTemplate(Z_BAPI_EMP_GBU_GET);
    JCO.Function function = new JCO.Function(functionTemplate);
    JCO.ParameterList importList = function.getImportParameterList();
    importList.setValue("US", "OBJTYP");
    importList.setValue(request.getUser().getUniqueName(), "USRID");
    client.execute(function);
    JCO.ParameterList outputList = function.getExportParameterList();
    gbuCountryBean.setGbu(outputList.getString("GBU"));
    gbuCountryBean.setCountry(outputList.getString("COUNTRYCODE"));
    gbuCountryBean.setPersArea(outputList.getString("PERS_AREA"));
    gbuCountryBean.setCompanyCode(outputList.getString("COMPANYCODE"));
    When I tried implementing same in UWL custom connector, I am not able to get instance of 'request' object.
    Any hints/ideas on this?
    Hence as an temporary alternative, I wrote following to successfully execute RFC.
    mConnection = JCO.createClient(sapclient,  sapuser,
    sappassword,  "EN", saphost, sapsysnumber);
    mConnection.connect();
    mRepository = new JCO.Repository("GetLeaveRequestFlag", mConnection );
    IFunctionTemplate ftemplate = mRepository.getFunctionTemplate(Z_BAPI_CHECK_LR_TO_APPROVE);
    myFunction = new JCO.Function(ftemplate);
    JCO.Field OBJECT_TYPE = myFunction.getImportParameterList().getField("OBJECT_TYPE");
    OBJECT_TYPE.setValue("US");
    JCO.Field USERID = myFunction.getImportParameterList().getField("USERID");
    OBJECT_TYPE.setValue(p_userID);
    mConnection.execute(myFunction);
    JCO.Field leaveRequestFlag = myFunction.getExportParameterList().getField("FLAG_LEAVE_REQUEST_RECORD");
    mConnection.disconnect();
    But only catch here is that I need to create & maintain SAP logon credentials for a particular user manually.
    It is not possible to single sign on connector user into SAP system (like its done above).
    Any thoughts on this?
    Thanks & Regards,
    Amey

  • Calling  RFCs from Web through XI

    We have used SAP.NET connector in the past to call RFCs from ASP.NET pages from our public website. We have now decided to use XI as the enterprise integration engine going forward.I am interested to know whether anybody has used XI to call RFCs from ASP.NET webpages. I do know that the XI to SAP calls would be made through RFC adapter.Will the communication from ASP.NET page to XI  be thourgh the HTTP adapter ? or is there any other smarter way. Can somebody point me to sample code for the calls through http adapter or  a how to guide?
    cheers
    Ramesh

    Hi
    U have scenario like this ASP.NET->XI->RFC, that means u will send a value from the ASP.NET page to RFC thru XI and then this RFC will give result which will come to ASP.NET frontend.
    For this go thru this blog it will help u to understand how to communicate from ASP.NET to XI
    <b>https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1442</b [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]> [original link is broken]
    Code Sample is provided in the blog.
    Hope it helps.
    Regards
    Arpit Seth

  • Calling form from web application

    i use the below url for calling form from web application.
    http://host51.yan.com/forms/frmservlet?form=test&width=700
    i would like to know about "frmservlet"
    if it's a servlet file then
    where its located in application server10g

    The servlet is part of the forms-installation on the application-server, on the local OC4J this is located in $ORACLE_HOME/forms/j2ee/formsapp.ear
    What exactly do you want to know about the servlet?

  • How to call webservice from Java application

    Hi XI gurus
    Pls let me know how to call a webservice from Java application.
    I wanted to build synchronous interface from Java Application to SAP using SAP XI
    For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
    Regards
    MD

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • Calling RFC from Adobe Interactive Form

    Hello,
       After creating and calling Adobe Interactive form from ABAP web dynpro, within the form designer is it possible to call RFC or Business Object method from the form script to get the data back from SAP for specific Click events?

    Yes,
    this is possible, but not through pure RFC, but using webservices and webservice enabled function modules within SAP.
    Technically it is quite simple. Create a functionmodule, and create a webserve from that (all SE37 or SE80 but from WAS 6.40). Generate a WSDL (with the Java tool) and import that into the form that you are designing. From there you can bind the data from the dataset (as defined in the WSDL) to screenfields or treat the data any other way Javascript can.
    BTW. I only managed this so far by using anonymous logins, so with a password and username bound to the webservice (in SICF).
    Hope this helps, regards, Hans Gmelig Meyling

Maybe you are looking for

  • Using Text string match in IF Function

    Hi All, Does anybody know how I can use the if function in numbers to achieve what I used to in excel =IF(C4="N",0.35,0) This would return the value 0.35 in my cell when the letter N was entered in cell C4 and zero if it was not populated in Cell C4.

  • I don't get notifications when I get a call so it ...

    Hey  I get the yellow thingy when somene calls but how the hell can I answer when I don't get the pop-up box? So it just closes automatically lol and I have to call back. Always. So yeah the pop-up box would be REALLY bloody great for me. Thanks!

  • Event can't excut.

    Hi all : this my code I want to display a Frame then clink a Button ,the Event will change the name of File but the code can't run i tried to many way but the same , Please help me . thx import java.awt.*; import java.awt.event.*; import java.io.*; i

  • Best option for exporting

    Could anyone tell me what the best format would be to export 3 min video commercials for 3000 lumin projectors. I am currently using winamp as my video player and sending that through s-video to a video mixer then to the projectors. None of my videos

  • Third party Integration to B1

    Hello all, Does anyone can give me an idea, if possible, to integrate data managed by an external solution (program) in SAP Business One in an automatically way without SDK. I can do it by using DTW but it will make one user to be responsible to run