How to call a remote capable function module?

Hi all,
I want to call a bapi from a R/3 that is not available in the current system were i have my WebDynpro Abap application.
So, i called the wizard "Service Call".
In the Select Service step i have to input the destination and Function Module and
Before i specified an RFC destination .
The wizard cannot find the function.
I read the Note:
The function module must exist in the current system! The wizard does not support to call a remote capable function module that does not exist in the current system.
The question is :
How can i call remote capable function module?
Thanks,
Ari

Hi,
this link might help you : <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/22/0424ba488911d189490000e829fbbd/frameset.htm">rfc in abap</a>
grtz
Koen

Similar Messages

  • How to Create a Remotely Enabled Function Module

    Hi All,
    How to Create a Remotely Enabled Function Module.
    I Want to Create a FM Using Sample Data , This for Practice
    What Fields can i give in the Import and Export Parameters.
    Please Give me one Example
    Can Any one Give me the Steps to do this.
    Regards
    Vamsi

    Hi Vamsi,
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
      exporting
        p_num1 = 10
        p_num2 = 15
      importing
        p_tot = tot.
    write tot.
    please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    Regards,
    Sukhee

  • Calling a remote enabled function module which does not exist in caller sys

    Hi,
    I have a a system ABC from which I am trying call a rfc enabled fm(Test) present in system XYZ.
    The fm(Test) does not exist in the system ABC so I am getting generation errors and dumps.
    Is there a way for me to call these remote enabled function modules which does not exist in the caller system without the obvious errors etc.
    Is there any special way.
    Thanks

    Hi,
    please check this sample:
    REPORT  zcallfm                                 .
    DATA: xv_return TYPE sysubrc.
    CALL FUNCTION 'DOESNOTEXIST'
    DESTINATION   'NOWHERE'
    EXPORTING     caller                = sy-sysid
    IMPORTING     return                = xv_return
    EXCEPTIONS    system_failure        = 1
                  communication_failure = 2
                  OTHERS                = 4.
    It shouldn't throw any generation errors in your system!
    Regards,
    Klaus

  • How to develop an Remote Enabled Function Module

    Hi All,
    I'm totally new to ABAP. I have a requirement to create a Remote Enabled Function Module, which I can use to call from an external program like Java using JCo.
    The functionality of the Remote Function is to write some data into certain fields of the tables AFPO and JEST.
    Can someone please guide me, how to do the above described task. Is there any code snippets available, that would be really gr8.
    Thanks & Best Regards,
    Chandrasekhar.

    you shuld have import parameters like this
    i_aufnr tpye afpo-aufnr.
    i_posnr tpye afpo-posnr.
    i_matnr tpye afpo-matnr.
    i_wemng tpye afpo-wemng.
    i_ltrmi tpye afpo-ltrmi.
    i_meins tpye afpo-meins.
    i_dwerk tpye afpo-dwerk.
    i_objnp tpye afpo-objnp.
    i_stat type jest-stat.
    in exceptions
    enter_key_data.
    assume all the fields are mandatory.
    types: begin of t_ekpo,
          aufnr like ekpo-aufnr,
          posnr like ekpo-posnr,
          matnr like ekpo-matnr,
          wemng like ekpo-wemng,
          ltrmi like ekpo-ltrmi,
          meins like ekpo-meins,
          dwerk like ekpo-dwerk,
          objnp like ekpo-objnp, "for Status update
          end of t_ekpo.
    types: begin of t_jest,
           objnr like jest-objnr,
           stat  like jest-stat,
           end of t_jest
    data: x_ekpo type t_ekpo,
          x_jest type t_jest.
    **need to validate before sending it to EKPO.
    if not i_aufnr is initial
         and not i_posnr is initial
         and not i_objnp is initial
         and not i_stat is initial.
    X_ekpo-aufnr = i_aufnr.
    X_ekpo-posnr = i_posnr.
    X_ekpo-matnr = i_matnr.
    X_ekpo-wemng = i_wemng.
    X_ekpo-ltrmi = i_ltrmi.
    X_ekpo-meins = i_meins.
    X_ekpo-dwerk = i_dwerk.
    x_ekpo-objnp = i_objnp.
    modify EKPO from X_ekpo .
    if sy-subrc = 0.
    commit work.
    endif.
    x_jest-objnr = i_objnp.
    x_jest-stat = i_stat.
    modify JEst from X_jest .
    if sy-subrc = 0.
    commit work.
    endif.
    else.
    raise exception enter_key_data.
    endif.
    please let me know if you need any validation on those.
    regards
    vijay
    Message was edited by: Vijay Babu Dudla

  • 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

  • How to call a RFC-enabled function module

    Hi All,
    We have 2 systems; system 1 (client 420) and system 2 (client 600).
    I just want to know that how can a RFC-enabled function module be called from one system (420) whereas the RFC-enabled functio nmodule exists in the other system (600).
    Also, as per my understanding any RFC-enabled function module is a BAPI. Please confirm.
    Please help.
    Thanks & Regards,
    Namrata

    Hi,
    RFC enabled FM can be called from anther system:
    From 420 we can call RFC FM residing in 600, through RFC destination cretaed in SM59 tcode in 420 client.In sm59, maintain the entries of destination system i.e 600.and test the connection whether it is succesful or not/ through remote logon.
    suppose in 420 client , in sm59 u have cretaed with destination DEST600 say.
    In 420, u can code as below..
    Call  'RSSDK_LOGSYS_REMOTE_CHECK' destination DEST600
    exporting
    I_QSYSTEMNAME =
    tables
    E_T_MSG =
    there exist difference between BAPI/RFC.
    BAPI always return messages / RFC doen't.
    BAPI follows ceratin naiming convetions while defineing the parameter structures ( ex BAPI_..)
    In bapi , no dialog screens can be called.
    In bapi, statements liek COmmit work/Call Transaction/Submit...shouldn't exit.
    Bapi's are implemented as FM's and are stored as methods in Business Object repository.
    another Ex for RFC
    RSAN_LOGSYS_DETERMINE
    Revert back if any issues,
    Reagrds,
    Naveen
    Edited by: Naveen Deva on Feb 18, 2009 9:54 AM

  • How to call a ECC 6 Function module from BI 7 process chain

    Hi BI Gurus
    I wann to push the data from infocube to ECC 6 ( Tcurr) table  on a daily basis, and we have a function module written in ABAP and this FM is in ECC 6 sytem and we need to call this function module from BI inorder to update the TCURR table.
    I used ABAP programm in Process chain but i failed as i dint see any functionality for FM. i could see only abap programm.
    I need any you advise on this.
    thanks in advance

    Hi,
    If you are able to see the ABAP report of ECC 6, this ABAP report will inturn call this function module.
    Call the report in process chain.

  • How to call more then one Function modules at the same time

    HI ,
    How to call more then one FM at the same time .
    Modertor Message: Interview-type Questions are not allowed.
    Edited by: kishan P on Jan 2, 2012 2:22 PM

    They are a few different models of the MacBook Pro ranging from 15.4" i7's to 17" i7's. I would use the same models together though when imaging them just like I do with PC's. For example I would Ghost 5 Lenovo T420 Thinkpads at the same time which all share the same exact specs and config. Looking to do the same with the MBP. I have .dmg image of OSX 10.8.1 on a firewire drive which I'm using. I image all my MBP's with this drive, the only downside is I have to do each MBP one at a time.
    Thanks

  • Difference between BAPI and remote enabled function module

    Hi!
    what is the difference between remote enabled function module and
    BAPI.
    How do we use remote enabled function module .
    thanks
    Amit

    Please search the forum before asking basic questions.

  • How to make a normal Function Module remote able function module

    Hi guys,
    i am a beginner in abap programming. I have made a programm in Se80 which shows all the nodes of the active hierarchies (5 stk.)
    in a ALV grid. Therefore i am getting the active hierarchies from table "rshiedir" and use the normal function module "RSSH_HIERARCHY_READ" to display the nodes of the hierarchie. The problem is the hierarchies do have a different techical name in the systems (development-acceptance-productive) but the descriptive nbame is the same in all systems. Because of the difference of the technical names I can use this programm in just one system. But the hierarchy content should be comparable and be displayed in all three systems. Therefore i would like to create a remoteable function module which covers the normal one. Can i do this and how can i create a remoteable function module and use it? 
    If not do you know any remotable functgion module which gives back all the nodes from an active hierarchy in table "RShiedir".
    Thanks and kind regards,
    Murat

    Hello,
    Simple, create a wrapper RFC (similar to 'RSSH_HIERARCHY_READ' ) & call the normal FM 'RSSH_HIERARCHY_READ' inside the wrapper.
    Something like this:
    FUNCTION z_rssh_hierarchy_read.
    *"*"Global Interface:
    *"  IMPORTING
    *"     VALUE(I_RSHIEDIRKEY) TYPE  RSHI_S_RSHIEDIRKEY OPTIONAL
    *"     VALUE(I_RSHIEDIRLOG) TYPE  RSHI_S_RSHIEDIRLOG OPTIONAL
    *"     VALUE(I_DATE) TYPE  RSHI_DATE DEFAULT SY-DATUM
    *"  EXPORTING
    *"     REFERENCE(E_RSHIEDIR) TYPE  RSHI_S_HIEDIR
    *"     REFERENCE(E_T_RSNODES) TYPE  RSHI_T_HIENODE
    *"     REFERENCE(E_TH_RSINTERVAL) TYPE  RSHI_TH_INTERVAL
    *"     REFERENCE(E_DUPLICATE_LEAFS) TYPE  RS_BOOL
    *"     REFERENCE(E_T_RSNODES_LNK) TYPE  RSHI_T_HIENODE
    *"  EXCEPTIONS
    *"      INVALID_HIERARCHY
    *"      NAME_ERROR
    *"      IOBJ_NOT_FOUND
    " Don't forget to add TYPE-POOLS rshi to the FuGr. TOP include
      CALL FUNCTION 'RSSH_HIERARCHY_READ'
        EXPORTING
          i_rshiedirkey     = i_rshiedirkey
          i_rshiedirlog     = i_rshiedirlog
          i_date            = i_date
        IMPORTING
          e_rshiedir        = e_rshiedir
          e_t_rsnodes       = e_t_rsnodes
          e_th_rsinterval   = e_th_rsinterval
          e_duplicate_leafs = e_duplicate_leafs
          e_t_rsnodes_lnk   = e_t_rsnodes_lnk
        EXCEPTIONS
          invalid_hierarchy = 1
          name_error        = 2
          iobj_not_found    = 3
          OTHERS            = 4.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Here Z_RSSH_HIERARCHY_READ is the wrapper RFC. Hope you get the point.
    BR,
    Suhas

  • How to capture errors when a Function module is called as BACKGROUND TASK

    How to capture errors when a Function module is called as BACKGROUND TASK?.Please advise.
    FUNCTION ZRPM_DELETE_PROJECT_DATA_API.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(IV_EXTERNAL_ID) TYPE  RPM_TV_EXTID OPTIONAL
    *"     VALUE(IV_PROJECT_GUID) TYPE  RPM_TV_GUID OPTIONAL
    *"     VALUE(FLAG) TYPE  BOOLEAN OPTIONAL
    *"  EXPORTING
    *"     VALUE(EV_RC) TYPE  I
    *"     VALUE(EV_MSG) TYPE  STRING
    *"     VALUE(ET_MSG) TYPE  RPM_TT_MESSAGES
      IF flag = cl_rpm_co=>sc_true.
        Call function 'RPM_DELETE_PROJECT_DATA' IN BACKGROUND TASK
          EXPORTING
            IV_EXTERNAL_ID  = IV_EXTERNAL_ID
            IV_PROJECT_GUID = IV_PROJECT_GUID
          IMPORTING
            EV_RC           = EV_RC
            EV_MSG          = EV_RC
            ET_MSG          = ET_MSG.
        COMMIT WORK.
      ELSE.
        CALL FUNCTION 'RPM_DELETE_PROJECT_DATA'
          EXPORTING
            IV_EXTERNAL_ID  = IV_EXTERNAL_ID
            IV_PROJECT_GUID = IV_PROJECT_GUID
          IMPORTING
            EV_RC           = EV_RC
            EV_MSG          = EV_MSG
            ET_MSG          = ET_MSG.
      ENDIF.
    ENDFUNCTION.
    In above code how to capture 'EV_RC' when FM is called as background task.

    Prakash,
    CALL FUNCTION IN BACKGROUND TASK allows no IMPORTING parameters, so that your code will produce a syntax error.
    The calling program can only handle errors of remote function calls (RFC) if these are either
    - synchronous RFC  (that is CALL FUNCTION ... DESTINATION ...) or
    - asynchronous RFC (that is CALL FUNCTION STARTING NEW TASK ... DESTINATION ...).
    Both synchronous and asynchronous RFC allow the capturing of errors by means of exceptions. But that is a different topic.

  • How should tables be defined in remote-enabled function modules used in PI

    Hi,
    I know the outside-in development approach is best practice (although there is some conflicting viewpoints on the best approach for new developments, some favouring RFC).
    If I was to create a new remote-enabled function module in a backend system then import this into the Integration Repository what is the recommended parameter group for defining tables against the RFC?
    I've tested using import, export, changing and tables and they all work but SAP recommends not using the tables option anymore but when using import/export/changing option I receive a warning that using these parameters with deep/nested data types can lead to performance problems.
    Can someone offer any advice?
    Thanks,
    Alan

    > I've tested using import, export, changing and tables and they all work but SAP recommends not using the tables option anymore but when using import/export/changing option I receive a warning that using these parameters with deep/nested data types can lead to performance problems.
    You use import and export parameters, and avoid deep and nested structures.

  • Remote-enabled function module could not be imported

    Hello all,
    I have a problem. In so called Enterprise Services Builder I want to import a remote-enabled function module. But I got the following error:
    Could someone tell me how to fix the problem? thx.
    Best regards,
    Fanglin Ye

    Hi,
    I hope I already answered.
    "You can transfer his changelist to your name for activation"
    Goto--> changelist tab --> right click on your colleague's changelist --> transfer
    then activate under your name

  • How to log input parameters for Function Modules?

    Hi,
    I need to create a Logging system to trace input parameters for function modules.
    The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
    For example, I'd like to write a function/class method that can log both these functions modules:
    Function DummyA
       Input parameters: A1 type char10, A2 type char10.
    Function DummyB
       Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
    Now the questions...
    - Is there a "standard SAP" function that provide this functionality?
    - If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
    - If not, how can I loop at Input parameters in a way that is independent from the function module interface?
    Thank you in advance for helping!

    check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
    FUNCTION y_test_fm.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PARAM1) TYPE  CHAR10
    *"     REFERENCE(PARAM2) TYPE  CHAR10
    *"     REFERENCE(PARAM3) TYPE  CHAR10
      DATA: ep TYPE STANDARD TABLE OF rsexp ,
            ip TYPE STANDARD TABLE OF rsimp ,
            tp TYPE STANDARD TABLE OF rstbl ,
            el TYPE STANDARD TABLE OF rsexc ,
            vals TYPE tihttpnvp ,
            wa_vals TYPE ihttpnvp ,
            wa_ip TYPE rsimp .
      FIELD-SYMBOLS: <temp> TYPE ANY .
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
        EXPORTING
          funcname                 = 'Y_TEST_FM'
    *   INACTIVE_VERSION         = ' '
    *   WITH_ENHANCEMENTS        = 'X'
    *   IGNORE_SWITCHES          = ' '
    * IMPORTING
    *   GLOBAL_FLAG              =
    *   REMOTE_CALL              =
    *   UPDATE_TASK              =
    *   EXCEPTION_CLASSES        =
        TABLES
          exception_list           = el
          export_parameter         = ep
          import_parameter         = ip
    *   CHANGING_PARAMETER       =
          tables_parameter         = tp
    *   P_DOCU                   =
    *   ENHA_EXP_PARAMETER       =
    *   ENHA_IMP_PARAMETER       =
    *   ENHA_CHA_PARAMETER       =
    *   ENHA_TBL_PARAMETER       =
    *   ENHA_DOCU                =
       EXCEPTIONS
         error_message            = 1
         function_not_found       = 2
         invalid_name             = 3
         OTHERS                   = 4
      IF sy-subrc = 0.
        LOOP AT ip INTO wa_ip .
          MOVE: wa_ip-parameter TO wa_vals-name .
          ASSIGN (wa_vals-name) TO <temp> .
          IF <temp> IS ASSIGNED .
            wa_vals-value = <temp> .
          ENDIF .
          APPEND wa_vals TO vals .
        ENDLOOP .
      ENDIF.
    ENDFUNCTION.

  • How to write the exceptions in function module

    dear all,
         how to write the exceptions in function modules with example.
    thanq
    jyothi

    Hi,
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE except.
    und
    MESSAGE.....RAISING except.
    The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
    If the calling program does not handle the exception
    · The RAISEstatement terminates the program and switches to debugging mode.
    · The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION read_spfli_into_table.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
    IF sy-subrc NE 0.
    MESSAGE e007(at) RAISING not_found.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT demo_mod_tech_fb_read_spfli.
    PARAMETERS carrier TYPE s_carr_id.
    DATA: jtab TYPE spfli_tab,
    wa LIKE LINE OF jtab.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
    EXPORTING
    id = carrier
    IMPORTING
    itab = jtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CASE sy-subrc.
    WHEN 1.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
    WHEN 2.
    MESSAGE e702(at).
    ENDCASE.
    LOOP AT jtab INTO wa.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDLOOP.
    The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    Or
    just have to decide what exceptions u want and under what conditions.
    then declarethese exeptions under the exceptions tab.
    in the source code of ur function module.
    if
    like this u can code .
    now when u call the function module in tme mainprogram.
    if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
    in the fm u can program these sy-subrc values and trigger the code for ur exception.
    Please reward if useful
    Regards,
    Ravi
    Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM

Maybe you are looking for

  • CFFILE Delete Error???

    I am trying to delete a file from a directory and am getting an error. The funny thing is that the file is actually deleting and then throwing the error. Has anybody experienced this? I am on a linux box running CFMX 7. ERROR: The destination "/xxxxx

  • Error Creating a Net Connection with user "sys" as dba

    I can connect as user "sys" locally, but cannot connect as user sys as a network connection. situation #1: connecting locally ... no problem ...      [oracle@localhost ~]$ sqlplus      SQL*Plus: Release 11.2.0.1.0 Production on Sat May 12 23:31:39 20

  • Loading Data into an infobject in BW7.0

    I have a master data IOBJ that I am loading data into directly from a datasource. Even though the data loads successfully, No rows are added.... What gives? Thanks

  • Mapping repeated (identical) elements to SQL columns based on element attribute

    Given this XML data, is it possible to generate the table shown?  If it's relatively easy, could someone please demonstrate.  If it's involved, then just suggesting references which are pertinent to solving this particular problem would be greatly ap

  • Backup Database is terminated Abnormally Failed

    Hi All, My Database backup is not working in SQL 2014 RTM version. It works fine on SQL Server 2008 R2.  All databases are in Simple recovery model. Not sure what might be the issue. I'm admin for SQL instance and on the box.  DECLARE @BackupFile1 va