Reg: Calling RFC in webdynpro

Hi,
I am supporting some webdynpro application. In the application we are connecting to R3 systems using RFC. But in my application the developer had created different models for each Bapi instead of dumping them into one model. I just wanted to know the logic behind that. Is it just logical seperation or there is any performance considerations.
Thanks in advance.

Hi,
I Just can say, in some of the documents that I have founded in SDN about Web dynpro best practices,
the recommendatios is "Put  as many RFCs in a single Adaptive RFC model as possible".
Take a look in the followinf presentation page 41
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/604ddc2f-ec9c-2b10-1682-be37e1c62dee&overridelayout=true
Regards,
Eduardo Campos.

Similar Messages

  • Calling RFC with webdynpro java (in NetWeaver Developer studio)

    Calling RFC with webdynpro java (in NetWeaver Developer studio)
    Hi,
    I want to call only one parameter RFC with webdynpro.
    Flight example is very complex.
    I want to push a button and pass parameter to RFC input and call RFC.
    After execution some message must appaer on the screen.
    Is there a step by step .pdf?
    Thanks.

    Hello Cemil,
    There's a seperate Web Dynpro forum for such posts, you should take a look there.
    Nonetheless, the classic tutorial is the FlightList. If I was you, I would make sure to do this tutorial step-by-step as it should give you the fundamentals for understanding aRFC. On top of that, it's most likely already available to you on your SAP system...
    Here's the link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3
    Cheers,
    Hermann

  • Calling RFC with webdynpro java (in NetWaver Dev.Studio)

    Hi,
    I have a RFC like below
    FUNCTION ZSAP_X.
    *""Local interface:*
    *"  IMPORTING
    *"     VALUE(USNAM) TYPE  USERNAME
    *"  EXPORTING
    *"      VALUE(PWD) TYPE  CHAR8
    1-I want to write webdynpro java application to call RFC
    2-Call RFC with USNAM parameter
    3-Get PWD output parameter and write it's value into View TextInput field.
    I wrote application but I did not get PWD (output parameter) value. I checked RFC running poreperly.I did not achieve to get PWD.
    How can I do that?
    Thanks.

    Hi Bala,
    I checked RFC, it is running properly and getting the output value.
    And I used command below, but it produces error
    String X = wdContext.currentPWDElement().getpwd().toString();
    Error:
    java.lang.ArrayIndexOutOfBoundsException: -1
    Thanks.

  • 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

  • Calling RFC in Webdynpro...

    Hello,
    I am new to WebDynpro Java. How can I call a RFC in webdynpro. We have different SAP lanscapes viz: 4.7, ecc 5.0 and ecc 6.0. I want to call BAPI from 4.7 landscape in my webdynpro. How can I do this ?
    Regards,
    Jainam.

    Hi,
    The better way to call a RFC from Web Dynpro, is using Adaptive RFC Model.
    See it to help you :
    https://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section10 [original link is broken]
    Read the all documents about Adaptive RFC Model to understand all details to use it with Web Dynpro.
    Its to a step by step sample:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3
    Best regards

  • Reg: Calling RFC FM in JavaScript

    Hello Gurus,
    I am trying to call FM from Masthead,
    The FM is used to delete an entry in the table. And I need to execute the FM when Closing the browser or click on Logoff.
    And Input to the FM is logged in User.
    Please help me in resolving this.
    Thanks & Regards,
    Pramod

    Hi Pramod,
    I thnink of few ways to achieve this
    Option 1:
    - create a class which does the FM operation(Abstarct class with JCO connector).
    -deploy this as a par file.
    -take note of the url created when you run this par file from the portalapp.xml.
    -goto logoff form,
    <form name="logoffForm"
    here under action="...., include the url from the above par file starting frome'/irj/....'.
    -now when the user clicks the logoff, he would eb redirected to your abstract calss which does the table operation with FM.
    Option2:
    - the logoffRedirectURL is being called when the user clicks the logOff button. Let us manipulate this URL, instead of this URL change the URL through Visual Admin.
    -create a WdJava or WdABAP appln. which does this Table operation with FM. create an iView and put QuickURL(say- deleteEntry).
    -under redirect URL, call this iView by mentiong as '/irj/portal/deleteEntry).
    -here you have to ensure that this iView is assigned to the users with a role or so.
    note: if you are taking the user away from when he clicks logoff, I believe you may have to handle the logOff yourself.
    May be you could invlidate the HTTP session. In the abstract class mentioned in option1, by using
    'request.getHTTPRequest(..).
    you can do this.
    Thanks,
    Jakes.

  • 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

  • How to call the rfc in webdynpro abap..?

    Dear Experts,
    I need to add two numbers using RFC in webdynpro abap.
    First we have to give the input then click the submit button.. The result will be shown in next screen with addition of two numbers...  Please help me in this...
    Thanks.

    Calling an RFC Function module in Web Dynpro ABAP is nothing different from Classical ABAP
    use Pattern button to call function module and use DESTINATION syntax to specify the RFC destination
    http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf?PHPSESSID=c528a60bf8857431c0fa6f6595639da7
    In Above document, page no 7, there is a wizard for Service call, in that 4th step is select service where
    you can specify the function module name and the rfc destination name
    Abhi

  • 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

  • Can not call RFC contains "call transaction"  in webdynpro

    We use Webdynpro to develope a UI that can create service orders in CRM
    system. We create an RFC funciton "ZKLEE_CRM_ORDER_MODIFY" in CRM,which
    contain a statement of "CALL TRANSACTION 'CRMD_BUS2000120' USING T_BDC
    MODE 'N' MESSAGES INTO MESSTAB.".
    But as we exacute the RFC from WEB,we got 3 error messages in the
    output "MESSTAB":
    1.MESSAGE ID = "DC",MESSAGE NUMBER = "006", MESSAGE = "Control
    Framework: Fatal error - GUI cannot be reached".
    2.MESSAGE ID = "SY",MESSAGE NUMBER = "002", MESSAGE = "Exception
    condition CNTL_ERROR raised."
    3.MESSAGE ID = "00",MESSAGE NUMBER = "359",and it is a terminate
    message.
    The problem is that we can use webdynpro to call RFCs that do not
    contain "call transaction" freely. At first we suspect that it is our
    RFC function's fault, but we tried it in ABAP enviroment,and it works
    OK. We also tried to call this RFC in JSP through JCO,the same error
    occurs.
    Our system enviroment is CRM 4.0, J2EE 640, kernel 640 patch 109.

    HI,
    Thank you for your information.
    Maybe you are right that BAPI/RFC can not contain "call transaction" statement. But two weeks ago, one of my colleagues tried to use "call transaction" in RFC through JCO in our R/3 enviroment(not in CRM),and he successed.
    So I suspect the kernel release. The kernel of R/3 is 640,while CRM is 620(I said our CRM kernel release is 640 before,and it is a mistake.).I will confirm whether what my colleague said is right by myself, and will also told you the result.
    Message was edited by: Vincent zklee

  • How can I call RFC FM from webdynpro application for ABAP? Please help!

    Hi Experts,
              I have a requirement where I have to make a call to RFC enabled function module passing some data from webdynpro for ABAP application. How can I achieve this? Any tutorial or links or docs will be very helpfull.
    I have seen some tutorial on Adaptive RFC but it talks about webdynpro for Java.
    Can I use "Call function XYZ destination A10" statement in webdynpro for ABAP application?
    Thanks
    Gopal

    am doing same thing for my current SRM implementation.I am taking data to SRM server from another R/3 server .
    This is solution I have used
    1) First of all I have made ABAP connection in SM59 .
    Go to SM59 .In ABAP Connection creat ABAP connection with system with which u want communicate .
    Eg I am connection with Systems PB1.
    So i developed Connection call PB1CLNT800.
    2) In my requirement I have taken data in my context from another r/3,
    I have give called RFC in my supply function of node.
    Call to RFC is as usual.
    In my case,
    CALL FUNCTION 'RFC_MATNR'
    DESTINATION 'PB1CLNT800'
    TABLES
    IT_MATNR = IT_MATNR.
    Onwards I have read my itab IT_MATNR and populated data to context.
    Hope solution will serve your purpose.
    Give point if it works .If any problem i have other ways.
    Cheers
    Parag Bhise

  • RFC call from java webdynpro

    Hi,
    I'm creating a Java Webdynpro where I call RFC's from SAP.
    For the images in the webdynpro, I call the standard SAP function 'CVAPI_DOC_VIEW'
    When I execute the function in SAP, I get the url to the contentserver with the correct image.
    After calling the same function in my Java Webdynpro, the url is empty.
    I've checked the importing parameters after calling from webdynpro and SAP and they are the same.
    After debugging, I saw that the function 'CVAPI_DOC_VIEW' is the problem. He's exporting an empty url after calling from the webdynpro.
    Does anybody knows the possible fault and solution for my problem?

    I'm not an ABAPer but the last time I've dealt with DMS from Web Dynpro an ABAPer wrote a custom function that gets the file content (XSTRING) by sending DMS parameters (documenttype, documentnumber, documentversion, documentpart).
    After getting the XSTRING from my Web Dynpro Java, I convert it to byte[] and created URL by using WDResourceFactory.
    Hope it helps...
    Omri

  • The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems

    The webdynpro/ABAP (WDA) has problem calling RFC enabled FM of other ECC systems.
    WDA expects all the ABAPs, RFC FMs  of remote system(DEV, QA..) to reside inside its own instance.
    It is hard to transport and maintain these ABAPs FMs into a portal ABAP WDA instance.
    Proxy generation at WDA client:
    =======================
    1. If we can make an XI enable  an ABAP or RFC enabled FM of the remote ECC,
    I think the XI proxy classes can be generated at the client WDA system.
    Other options?
    How do I do it?  Can you give some tips.
    2. How do I manually code the RFC Call to BAPI/FM from Webdynpro controller or other interface?
    I am stuck with the above as the webservice option is not available at our ECC server.  It does not have a java engine installed for webservice to be available.
    Can you help on the above 2 options?

    Hi Mike ,
    <b><b> Answer of 2.</b></b>
    How do I manually code the RFC Call to BAPI/FM from Webdynpro controller or other interface?
    I am doing same thing for my current SRM implementation.I am taking data to SRM server from another R/3 server .
    This is solution I have used
    1) First of all I have made ABAP connection in SM59 .
    Go to SM59 .In ABAP Connection creat ABAP connection with system with which u want communicate .
    Eg I am connection with Systems PB1.
    So i developed Connection call PB1CLNT800.
    2) In my requirement I have taken data in my context from another r/3,
    I have give called RFC in my supply function of node.
    Call to RFC is as usual.
    In my case,
    CALL FUNCTION 'RFC_MATNR'
    DESTINATION 'PB1CLNT800'
    TABLES
    IT_MATNR = IT_MATNR.
    Onwards I have read my itab IT_MATNR and populated data to context.
    Hope solution will serve your purpose.
    Give point if it works .If any problem i have other ways.
    Cheers
    Parry B

  • Calling RFCs in Java WebDynpro

    Hello Experts,
    I'm new to WebDynpro. I'm a novice at best and have just learned the basics. I'll probably be asking a lot of questions about this soon. Here is one problem I recently encountered:
    I managed to call RFCs from R/3 using a user input and then another one by using one field retrieved from the first called RFC. Now i have to call a BAPI recursively from the data I got from the 2nd RFC that I called.
    Here is the code so far:
    public void executeBapi_Network_Getdetail_Input( )
        //@@begin executeBapi_Network_Getdetail_Input()
        //$$begin Service Controller(246259973)
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          BigDecimal plannedCost = new BigDecimal(0);
           for (int i=0; i<wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().size(); i++) {
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
              wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(
                wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks().getEx_NetworksElementAt(i).getAufnr());
              wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
              wdContext.nodeNetworkDetails().invalidate();
              plannedCost.add(wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network().getE_NetworkElementAt(i).getPlanned_Cost());
    sorry if this is totally wrong. I'm totally a newbie here.
    Hoping for your kind and helpful responses.
    Cheers,
    Alfonso

    Hi Alfonso,
    Can you please try this code:
           IWDMessageManager manager = wdComponentAPI.getMessageManager();
             try
               BigDecimal plannedCost = new BigDecimal(0);
               // Initializing a IWDNode to make code more readable and clean
               IWDNode nodeEx_Networks = wdContext.nodeZps_Fm_Get_Network_Num_Input().nodeNetworks().nodeEx_Networks();
               // I have initialized the int variable because you should never calculate the size() in for loop.
               // It is major performance hit.
               int size = nodeEx_Networks.size();
               for (int i=0; i<size; i++) {
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network(false);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Network_Activity(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Relation(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Element(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Activity_Milestone(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setI_Without_Component(true);
                   wdContext.currentBapi_Network_Getdetail_InputElement().setNumber(nodeEx_Networks.getEx_NetworksElementAt(i).getAufnr());
                   wdContext.currentBapi_Network_Getdetail_InputElement().modelObject().execute();
                   // WHY IS THIS INVALIDATE DONE.. WHICH IS THIS NODE???
                   wdContext.nodeNetworkDetails().invalidate();
                IWDNode nodeE_Network = wdContext.nodeBapi_Network_Getdetail_Input().nodeNetworkDetails().nodeE_Network();
                  int sizeNetwork_Getdetail = nodeE_Network.size();
                  for (int i = 0; i < sizeNetwork_Getdetail; i++) {
                       plannedCost.add(nodeE_Network.getE_NetworkElementAt(i).getPlanned_Cost());
                  // Now you can check the plannedCost by printing it using the manager you have initialized above.
    I hope this solves your issue. If you have any further issue please revert back.
    Thanks and Regards
    Pravesh

  • Reg :  In GP interface call RFC for output structure

    Hi ,
    I am developing Webdynpro callable object through GP interface. In this task I have only output don't have input parameters. If i will click Test directly it will come output like this :
       for ex:  Name  :   Risha
                  EmpID  :  1234
    In getDescription() i created output structure and getting the structure.
    For data i have to call RFC  , RFC will fetch data for Loggedin user.
    In GP interface how to call RFC and how to fetch the data for corresponding O/p structure.
    I have to submit this data to Approvar.  Please help me out.
    Thanks in Advance,
      Risha

    Hi Risha,
    1. Please check whether the RFC is executing properly and giving the correct result.
    2. declare a output strcuture say "output" with attributes which u need in the getDescription method.
    3.in the execute method, execute the RFC and get the data from the model node and set it to the value node of component controller.
    4. create the same context node and do the mapping between component controller and view controller.
    5 . create the UI elements and bind the ui elements with the value node.
    6. so when u click execute button, the model is executed and model data is transferred to value node.
    7. these datas will be displayed in the view .
    8. declare a variable in begin others of component controller as shown below.
    IGPExecutionContext mContext;
    9. in the view , u should have created a button say "complete" and on clicking this button call a method in component controller to end the execution of callable object.
    10. in the method say "complete" which u have created in component controller, get the execution context
    11. using the execution context , get the output structure as showwn below:
    IGPStructure outputStructure = mContext.getOutputStructure();
    12 . get the output structure which u have declared in getDescription method and set the strcuture attributes from the value node which has the RFC model data.
    13. so when the user clicks complete the Co execution is completed and u will get the output structure which has the model data .
    hope this helps.
    Thanks and Regards

Maybe you are looking for

  • How to generate a report in Excel with multiple sheets using oracle10g

    Hi, I need a small help... we are using Oracle 10g... How to generate a report in Excel with multiple sheets. Thanks in advance. Regards, Ram

  • Help me decide on what apple laptop i want to get. PLEASE HELP ME!!!!

    hi, as you can see, i am new to the discussions. i grew up on a mac and have had a mac for a family computer all of my life. well i started really getting into video games, (especcially computer games). and went to buy my first computer that i didnt

  • Smartform name from spool number

    Hi guys .İ have to learn the Smartform or Sapscript name of a alreasy printed document.So i use the transaction SP02 .There is not any information about the program or Smartform in spool transaction .How can i know SMARTFORM name from the spool numbe

  • Permission denied when read file with setGID

    I'm using a NFS system. I noticed that once I set setGID to a file, e.g. chmod g+s myfileThe file become un-readable (even root user is not able to access it). if I try to read, i got: tail myfile cannot open `myfile' for reading: Permission deniedWh

  • Questions for "license report"

    Please advise whether there are answers for the following questions in "License Report" a. Update frequency How often will raw data for report be updated ? What is the name/process of such raw data update ? Can't it be tailored to run on demand ? b.