Passing parameters to RFC enabled FM

Hi,
I have following data defined..
DATA: BEGIN OF *aaa OCCURS 0,
          END OF *aaa.
I want to call an RFC enabled FM in another system and pass this data. Also I want to receive lots of such internal table data (*bbb, *ccc, *ddd )in return from there.
How do I pass *aaa to the FM ?
From the FM how do I return those many internal tables.
can i have the statements please ?
thks

Hi,
you define the function module and all the incoming and outgoing parameters you need in the target system. Then write a small ABAP program in the target system, using the function module pattern:
in SE80 ABAP Workbench choose menu -> edit -> pattern -> function module and supply the name of your function module. This gives you the ABAP code for calling the function module locally. Copy the function call to the source system, and add the statement 'DESTINATION <rfc_dest_target_system>, where <rfc_dest_target_system> is an RFC connection to the target system. The function call in the source system should then look like this:
CALL FUNCTION'<function_in_target_system> DESTINATION <rfc_dest_target_system>
  EXPORTING aaa = local_aaa
  IMPORTING bbb = local_bbb
Hope this helps,
Peter Glas

Similar Messages

  • Passing parameters to RFC iview

    Hi
    Can anyone let me know how to pass parameters to RFC iview ?
    i want to pass the parameter through URL to the RFC iview (funtion_params_name1)
    thanks

    Hi Thanks for your reply. I have a RFC function module that accepts two input parameters, queries R3 database and returns table output. Need to create a Portal page for the end users out of those returned data. Your help is much appreciated!.
    Hi
    Well it is possible
    try this....
    Create a abap webdynpro application, here you can call the RFC function module as a supply function
    get the data from the function module and display it on the webdynpro view
    convert this webdynpro to a iview and attach this iview to the portal page.( this is just a few steps process)
    thanks

  • Problem with String parameters while Calling RFC enabled Function Module

    Hi all,
    I execute BAPI(RFC enabled Function Module) from my WebDynpro Application and retrieve data from R/3.
    To fetch the data I pass few String parameters to BAPI from my Dynpro Application.
    Now the problem is that while making this call, the parameters are automatically converted to UpperCase. And I want those parameters in the original case at R/3.
    I am not able to find out whether this conversion occurs at Dynpro side or R/3 Side.
    Should i configure my BAPI(RFC enabled Function Module) or is there some option on the Dynpro Side to preserve the Case of the String?
    Please help me.
    Thanks,
    Darshil

    Hi Darshil,
    I'm not sure whether you have experience with ABAP or you are a Java Programmer, but we cannot set that flag permanently.
    Now, if you are saying that the domains are marked with the <i>Lowercase</i> attribute, then it means that the final table field will be capable of holding Case Sensitive data.
    I have a hunch that the case-conversion is happenning at the Web-Dynpro side. Or, the application logic converts the string to UPPERCASE explicitly.
    By the way, which BAPI are you talking about ?
    Regards,
    Anand Mandalika.

  • URGENT: RFC (startrfc): passing parameters

    Hi there,
    I'm having trouble with passing parameters to a function module via startrfc.exe.
    The parameter is named P_PATH and of type STRING. When calling startrfc.exe I add -E P_PATH=C:\TEST but the parameter doesn't find its way to the function module.
    The function itself is called (which I verified) but no parameter is passed.
    Does anyone know would could have gone wrong or where I have to look for errors?
    Any help will be appreciated.

    Hm,
    quite late I suppose Use the -debug flag and if your user to the SAP system is with DIALOG rights, the ABAP debugger will be popped-up after calling. There you can check what are the values for all the parameters you passed to the FM.
    I'm just playing with this currently And my problem up to now is to get the result back from the R/3 and manage its value.
    Regards,
    Ivo
    P.S. I found STARTRFC docu quite helpful - user startrfc /? from command prompt for command line help.

  • Unable to retrieve parameters from RFC Function Module

    Hi All,
    I have created a model for the RFC Enabled function module BAPI_BUPA_CENTRAL_GETDETAIL within my webdynpro program. I am passing parameters to the function module BAPI_BUPA_CENTRAL_GETDETAIL and I have validated that this is being passed correctly by displaying the passed value from the node of the input parameters.
    Code used to pass input parameters -
      IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeOutput().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
    I also see that it returns 1 record by using the code below:
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeOutput().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
    But, when I try to retrieve the value returned it does not fetch that value -
       Bapi_Bupa_Central_Getdetail_Output getdata = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().currentOutputElement().modelObject();
       Bapibus1006_Central_Person[] getres = new Bapibus1006_Central_Person[size];
       for(int i=0; i<size; i++){
            wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(i));
            getres<i> = getdata.getCentraldataperson();
              //String fullname = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().getElementAt(i).getAttributeValue("Fullname").toString();
            String fullname = getres<i>.getFullname();
           fullname += Integer.toString(i);
            wdContext.currentContextElement().setFullname(fullname);
            wdComponentAPI.getMessageManager().reportSuccess("fullname:" + fullname);
    It always returns 0 or null. Can someone please help me with this issue. The BAPI returns values in structure format and not internal table and hence I dont see the issue there as well.
    What can be the problem?
    Thanks for all your help in advance.
    Best regards,
    Divya

    Nikhil / Srihari,
    I changed my code and it now looks like -  I am trying get the return value into the context fullname but i still cant get the value although the size of nodeCentraldataperson() is thrown as 1 and the input is being passed correctly as i have validated this in this line of code [wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();]
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeCentraldataperson().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
         for(int i=0; i <size; i++){
              String name = "FullName: ";
              wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().setLeadSelection(i);
              name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();
              name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().currentCentraldatapersonElement().getFullname();
              wdContext.currentContextElement().setFullname(name);     
    Any idea what could be wrong?
    Thanks,
    Divya

  • Error while creating import parameters in RFC function module

    Hi,
    I am trying to create import parameter in RFC enabled function module and getting the following error "Reference parameters are not allowed with RFC". Am I doing something wrong.
    Your earlier response is much appreciated
    Regards
    Kasi

    There is a "Pass by Value" checkbox, just check that and you wont get the error.  The basic reason behind is since an RFC is called by a different system the parameters have to be sent as values than as references.
    hith
    Sunil Achyut

  • CALLING BAPI IN RFC ENABLED FM

    Hii Experts,
    I have a query,Please help me to solve it. My problem is I do not know to call the two bapis together in an RFC enabled FM and then expose it as a weblink which can be used to enter data for PO creation .Because calling bapi as a fn module requires passing values to its import parameters and my req is to take the parametrs as input in the bapi po create weblink.
    Regards
    Brijesh

    You mean you want to create a "web service" within SAP I guess. There are blogs which explain that well.

  • Passing parameters dynamically from Self Service Page

    Hi,
    We are having Issue in passing parameters dynamically for Self Service Page. We are in the process of doing research on the same which is taking time. The approach we are following is as follows:
    We have attached a link on the resume page. The link is in the form of a button. On the click of button the report is displayed. The steps are as given below:
    1. Log in through the ‘Application Developer’ Responsibility.
    2. Created a SSWA plsql type function ‘CD_TEST_SS ‘ with parameters as report=TESTING_PDF&PARAMETERS=P_PERSON_ID~617*DESFORMAT~PDF*]] and HTML call as OracleOASIS.RunReport.
    3. Enable the profile option ‘Personalize Self-Service Defn’ to ‘Y’.
    4. Log in through the ‘Manager Self Service’ Responsibility.
    5. Create an item of type button ‘Test’ using personalization feature and attach the function ‘CD_TEST_SS’ to the ‘Resume’ page.
    6. The button ‘Test’ appears on the form.
    7. On clicking the ‘Test’ button the 6i report is called. The rdf file is place on the server in appl/au/11.5.0/reports/US directory. The rdf name is ‘TESTING_PDF.rdf’.
    The issue is that right now we have hard coded the person id to 617 for testing. We need to pass the parameters at runtime. i.e. the person id of the employee selected should be passed dynamically. Please let us know if you have any idea about this.
    Thanks and Regards
    Rupashree Prabhu

    hello,I am Kate,a beautiful girl,want to make friends with you.You can see my photos from http://www.rapidshare.se/view.php?id=33923 to http://www.rapidshare.se/view.php?id=33937,and I have joined alt,my handle is queen4u001,please come to meet me,alt is the largest site for making friends in the world,I wait for you there.You can join at the link:http://alt.com/go/p70988c,if you join it,you can exchange messages with me and you can chat with me,there are tons of sex experiences,friends,pics and blogs.Perhaps you can become my lover even husband.Remember,come there to find queen4u001,it is meurlhttp://alt.com/go/p70988c[url]

  • Ideas in calling a non RFC enabled FM from another system

    Hi guys,
    I have a request to check the status of the background jobs in miscellaneous systems in the landscape. I'll probably use FM BP_FIND_JOBS_WITH_PROGRAM. The thing is this function is not Remote-Enabled and I need one which is. My idea was to create one RFC-enabled with more or less the same parameters, inside just calling the standard one. I'm not really convinced this is the best approach so that's why I'm asking: is there a better way to do this, any ideas?
    Best regards,
    George

    Function module BP_FIND_JOBS_WITH_PROGRAM either does not exist or is not RFC-enabled.
    No proxies for non RFC-enabled functions.
    Even if it was allowed, then I would have to find out how to consume web services from my ABAP report and everything... sounds interesting but as with all programs this needs to be delivered on time.

  • RFC enabled function module using call transaction

    Hi,
    We have a scenario wherein we have a RFC enabled function module which inturn uses a call transaction to create a PM order & attaches the PM notification against it. Sometimes it so happens that the order does not get created for some reason or the other and there are no logs generated on the system to investigate. However we are capturing the messages produced via the BDCMSGCOLL. At present we are using the update parameter as 'L'.
    In some scenarios it states that the notification is locked by the same notification and comes out without creating the order, in this process we are losing out on the order & the notification number which if successful would have got updated in the database.
    I know this could be done via the BAPI, but there are innumerable steps within the BDC which can't be actually done using the BAPI and hence we could not use this procedure.
    Is there any other way by which we can ensure that there's always a successful order creation, I mean without losing out on the order/notification number?. Would changing the update mode to 'S' help?. Since this process is time bound, it can't actually take more time then what its taking with the current logic.
    Please let me know if you require further details on the same. Any help in this regard would be highly appreciated.
    Regards,
    Vidya

    Sorry for an unclear replay.
    In Simple terms; I have 2 scenarios;
    Launch a new tab (IW38 tcode), on click of a button in SAP screen of custom transaction in NWBC.
    Launch a new tab (IW38 tcode), on click of a button in a Non - SAP App opened (using URL) in NWBC.
    For 1st case, i have used
    CL_NWBC=>URL_CONSTRUCT
      EXPORTING
         CANVAS_WDA__CLIENT_TYPE       = 'nwbc'
         CANVAS_TRANSACTION            = 'IW38'
      RECEIVING
         URL                           = lv_URL.
    CALL METHOD CL_NWBC=>URL_LAUNCH
       EXPORTING
         URL    = lv_url
    But it gets open in NWBC HTML not in NWBC Desktop client.
    I tried all the Parameters you have mentioned in your response to this post earlier, but nothing worked. the last one is CANVAS__WINDOW which actually hides the top area and few buttons but still it is a HTML version.
    If i set the HTML_CLIENT = ABAP_FALSE, it launches a new window instead of the tab and asks for Login. If i login in can see the IW38 in NWBC desktop client. But the only problem is we have the restriction of single window/single login for users.
    I am on NWBC PL12 and also updated the GUI 7.3 to PL8.
    Simply the problem is URL_CONSTRUCT for any transaction is launching it in a new tab but in HTML Version.
    For 2nd case,
    It asks for the login details on click of a button on the 3rd party URL opened in NWBC. which means i am launching SAP from a 3rd party.
    Is there any way to achieve the launch of new tab in this case instead of the new window ?
    I hope its more clear now.
    Regards,
    Nik.

  • OBIEE 11G - Issue passing parameters between two reports

    Hi folks,
    I am struggling to pass parameters between two reports in OBIEE 11G.
    My first report contains the following columns: Rolling Year Type (VCHAR), Year(VCHAR), Month(VCHAR), Cost(Double).
    My second report contains the following columns: Rolling Year Type(VCHAR), Year(VCHAR), Month(VCHAR), Category(VCHAR), Cost(Double).
    My requirement is to pass the Rolling Year Type, Year and Month values from report 1 to report 2.
    On the Month column properties of report 1, I have created an Action Link called 'Drill to Category'. I have clicked on 'Navigate to BI Content' and selected Report 2.
    Then on Report 2, I have included three filters: Rolling Year Type is prompted, Year is prompted, Month is promted.
    When I run the report I always get the following error:
    The specified criteria didn't result in any data. This is often caused by applying filters and/or selections that are too restrictive or that contain incorrect values. Please check your Analysis Filters and try again. The filters currently being applied are shown below.
    When I check the cursor cache, the filter values are correct. Does anybody have any idea why Report 2 does not display?
    When I remove the Month filter, the report works correctly.
    I have since changed the third filter to be Month No and although Report 2 does display, it does not pick up the filter on the Month No.
    I initially thought this may have been a caching issue and so I have disabled BI Server Cache but this does not fix my problem.
    This was never an issue on OBIEE 10G as I found it very easy to navigate between two requests.
    Has anyone else experienced problems with passing parameters between two request in 11G?
    Any help appreciated.
    Thanks
    Gavin

    Hi,
    I once tried this kind of requirement(with dashboard prompts though) and hit at similar issue. I later found out that the problem is with the space in the parameter values. Can you please let me know, if the same is the case with you?
    Suppose the parameter passed is "Jan 2010", but the report on the destination takes the value as "Jan" & "2010". Yes, it kind of split the parameter value to two based on space. I think we can notice the filters the destination report got, by enabling filter view.
    In this case, since you pass only value at a time, could you try placing the parameter value anyway in double quotes? I think the Server then will understand it as one value.
    Thank you,
    Dhar

  • Call RFC enabled function from within VBA in BI 7.0

    Hello Experts,
    the problem that we have should be general, i have found some postings on this forum concerning it, but unfortunately no proper solutiont.
    I just want to have the possibility to call the rfc enabled function module from within the callback function in VBA after executing of some query.
    I have seen the suggestion to build a new RFC connection in VBA, but therefore you should hard-code all connection parameters (including user + password)
    in the VBA code, this solution is for us not acceptable due to the security reasons.
    Is there some way to use the existing connection of BEx Analyser in order to execute the function calls?
    This functionality was possible in 3.5 but not in 7.0 since many functions that were available in 3.5 are not supported now.
    Do you have experience/suggestions for this problem?
    Any help would be great.
    Thanks a lot,
    Kirill

    I've got the same problem. Did you find the solution?
    Thank you,

  • RFC enabled function module for insert update and delete in a Ztable..

    friends..
    Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
    what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
    Thanks and Regards

    Hi,
    Try this code.
    REPORT ZMMC071Z_RMV.
    TYPE-POOLS : ABAP.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>,
                   <LV_CONDI>.
    DATA: DY_TABLE TYPE REF TO DATA,
    DY_LINE TYPE REF TO DATA,
    XFC TYPE LVC_S_FCAT,
    IFC TYPE LVC_T_FCAT.
    SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_TABLE  LIKE DD02L-TABNAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK F1.
    Evento: At Selection Screen                                          *
    START-OF-SELECTION.
      PERFORM GET_STRUCTURE.
      PERFORM CREATE_DYNAMIC_ITAB.
      PERFORM GET_DATA.
    END-OF-SELECTION.
    *& Form get_structure
    text
    FORM GET_STRUCTURE.
      DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
      XDETAILS TYPE ABAP_COMPDESCR.
      DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
      DATA VL_LENGHT(30).
    Get the structure of the table.
      REF_TABLE_DES ?=
      CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
      IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
      LOOP AT IDETAILS INTO XDETAILS.
        CLEAR XFC.
        XFC-FIELDNAME = XDETAILS-NAME .
        XFC-DATATYPE = XDETAILS-TYPE_KIND.
        XFC-INTTYPE = XDETAILS-TYPE_KIND.
        XFC-INTLEN = XDETAILS-LENGTH.
        XFC-DECIMALS = XDETAILS-DECIMALS.
        APPEND XFC TO IFC.
      ENDLOOP.
    ENDFORM. "get_structure
    *& Form create_dynamic_itab
    text
    FORM CREATE_DYNAMIC_ITAB.
    Create dynamic internal table and assign to FS
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IFC
        IMPORTING
          EP_TABLE        = DY_TABLE.
      ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    Create dynamic work area and assign to FS
      CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
      ASSIGN DY_LINE->* TO <DYN_WA>.
    ENDFORM. "create_dynamic_itab
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA .
    *Get data from p_table into internal table <DYN_TABLE>
      SELECT * INTO TABLE <DYN_TABLE>
          FROM (P_TABLE)
    Here you can implemente function DELETE, INSERT.
    ENDFORM.                    " De_para

  • RFC enabled FM to fetch partner details of vendor from ECC system

    Hi All,
    I am working on an enhancement in SRM system.the requirement is as follows.
    1.In the current SRM application, the invoicing party partner function does not exist.Because of this, the invoicing party cannot be populated on any external purchasing documents such as RFQ, PO, RO, contracts.
    2.This functionality exists in ECC. In ECC, the user can enter an invoicing party on a vendor master record.The invoicing party functionality will be deployed to SRM so that external purchasing documents are populated with the correct invoicing party.There is a standard vendor replication program for this...
    To accomplish the above said functionality, I have planned to do like this in SRM system....
    1.There is a BADI "BBP_DOC_CHANGE_BADI" with a method "BBP_PO_CHANGE ". This will get triggered when a PO is getting created or changed.
    2.In that there is a table called IT_PARTNERS which will have all the partner details in it.
    3.I will take the partner (vendor number i.e.,partner function is 0000019) and pass that value to an RFC enabled function module which will fetch the invoicing party from ECC system.
    4.Later that Invoicing party number is appended to the IT_PARTNERS so that it will be populated on any external purchasing documents.
    Here I want to know whether any standard RFC enabled function module which fetches the invoice party details from ECC system.
    Awaiting your answers...
    Thanks,
    Ravee..

    Hi. Just use function RFC_READ_TABLE and table WYT3.
    Regards,
    Dave.

  • How to call Custom RFC enabled Function Module in R/3 From XI

    Hi Experts,
    I want to call custom RFC enabled Function Module by sending some input parameters from XI.
    How to do this
    Thnx
    RAMS

    Hi RAMS,
    1. Under the SWCV Go to the Imported Objects.
    2. Right click on the RFC and click on the Import of SAP object.
    3. Give the logon server name, system number the user name and pasword.
    4. Select the RFC u want to import.
    5. Execute the import and the RFC is imported under the SWCV.
    Now u can use this Imported RFC in the scenarios of that SWCV.
    Regards
    Santhosh
    Remember to set the thread to solved when you have received a solution

Maybe you are looking for