General topic: debugging RFC's called remotely

I don't know if this is the right forum to ask this, but I thought I would give it a try.  It seems that I often find myself with the following dilemma:
1. I build a function module in SAP (and unit test it).
2. I call the function module as an RFC from the web using a connector, and the results are not as I intended.  Sometimes the situation occurs only in a limited scenario that seems to only happen in production.
If I am programming in only R/3, I of course would be able to set a breakpoint in the ABAP code.  However, when calling remotely via a connector, the breakpoint does not fire.  As a workaround I usually do one of the following:
1. Run ST05 to view the SQL and RFC trace of the remote call.
2. Add in code to write to dataset file in unix via Al11 to see what the variable output of a program is at various points.
3. Set server to debug mode and set breakpoint in the class making the call to R/3.
I guess my question is this: what means do use as developers to troubleshoot R/3 function modules when calling from the web?  Are there any tips and tricks to do this that I am overlooking?
Thanks in advance for your help!
Brandon

Hi Gayatri,
Now I am also stuck in a similar scenario. Did you found a solution for the same?
It will be of great help if you can let me know if you have a solution by now.
Regards
Avishek

Similar Messages

  • Debugging RFC function module from ECC to CRM

    Hi All,
    My requirement is to debug an RFC function module present in CRM(7.0) system from ECC(6.0) system. A report program in ECC will call CRM custom FM. I found many posts in SDN with the same issue and tried to implement suggestions provided there. But I couldn't succeed. The approach I followed is:
    I logged in to ECC report program and kept an external breakpoint just before the function module call.
    I logged in to CRM system, opened the function module and kept an external breakpoint there.
    In both the systems I provided the dialogue userid( id through which I log in to SAPGUI) in the system->settings->debugging option.
    In CRM I activated the external break point in  transaction SRDEBUG.
    Now when I execute the report program in ECC, control stops at the breakpoint. If I press F5 at the function call, control is not going to the external break point set in the CRM FM. I am getting output of FM directly.
    I tried with different settings like turning on the check box for IP matching and session breakpoint active immediate, switching to classic debugger etc. I also tried to provide the RFC user id instead of dialogue user but system throws exception saying only dialogue userids are allowed. I found that by inserting an infinite loop statement, control goes inside the RFC CRM FM but I prefer not to change the code.
    Please let me know if I missed anything.
    Thanks and Regards,
    Naren

    Hi,
    Debug RFC calls
    When an RFC function module is called it is usually not possible to debug the call, using the below techniques we can achieve the same. For this example we are calling an RFC enabled FM in ECC system from CRM system.
    Scenario 1: Calling a custom RFC FM
    STEP 1: Add an infinite loop in the remote custom Function Module (adding a u201CDO. ENDDO.u201D statement at the start of the FM would be enough).
    STEP 2: Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop.
    STEP 3: Now login to the ECC system and go to transaction SM51 select the process which is executing the RFC and navigate to the menu: u201CProgram/Session->Program->Debuggingu201D this triggers the debugger session in a separate window.
    Scenario 2: Calling a Standard RFC FM
    When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to SM51 and debug the work process. The RFC destination for the ECC system has a User specified, the RFC function module gets executed using this users credentials. Usually the basis team set up the RFC user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to a dialog user enabling you to debug RFC function calls via the normal debugger.
    Note: User name configured in the RFC destination (transaction SM59) 
    Note: User type for the RFC User (transaction SU01D)
    Hope this will be helpful..

  • How can i debug a rfc being called from sap

    hello Gurus,
    We made a RFC call from SAP r3 to sap grc nfe......we did not receive any data in sap grc .......we go to SM58 and there it gives
    the message "Name or password is incorrect (repeat logon)u201D.
    How can i find out where the data has stuck.
    Please help.
    BR
    Honey

    HI,
    please have a look at the link below..
    this may help u !!!
    [Re: how can i debug a rfc being called from .net connector (NCO) v2.0?;
    Best of Luck !!1
    Regards
    Ravi

  • Debugging RFC Calls

    I was going thru the Blog
    /people/michal.krawczyk2/blog/2006/01/17/xi-debugging-rfc-calls-from-the-xi-not-possible-who-said-that-
    I am not understanding what Michal is trying to say? Would some one explain me please.
    I understand that when we are talking to an RFC and error occurs how XI is going to handle. 
    Thanks

    Thanks Michal.
    Just I have listed what I have understood, please correct me. (I got confused with your naming conventions)
    1) Existing RFC    : RFC-OLD  (XI calls RFC_OLD)
    2) Copy            : RFC-OLD_Copy
    3)                 :  Delete the function code in RFC-OLD
    4)                 : RFC-OLD  Calls  RFC-OLD_Copy
    DATA: queue_name like TRFCQOUT-QNAME.
    *setting the queue name
    queue_name = 'DEBUG_QUEUE'.
        call function 'TRFC_SET_QUEUE_NAME'
          exporting
            qname              = queue_name
          exceptions
            invalid_queue_name = 1
            others             = 2.
        if sy-subrc <> 0.
        endif.
    *call the new function in the background *and passing all the parameters from the old RFC! *so we'll be able to debug the RFC with correct *parameters 
    CALL FUNCTION 'RFC-OLD_Copy'
      in background task
      destination 'NONE'
      as separate unit
      TABLES
        TABLESAMPLE       = TABLESAMPLE.
    *remember about the commit work
    Commit Work.
    Endfunction.

  • How to call a RFC of a remote system from an ABAP webdynpro component

    Dear Experts,
    I am a newbie in ABAP Webdynpro.
    I am working on a requirement where I have a webdynpro component on ECC system.I need to call a RFC located on CRM system from my webdynpro component on the ECC system.
    How do I do that ?? Please help.
    Regards,
    Mamai.

    Calling RFC from some other system is same as local except the difference is that you have to give destination name while calling.
    And the regarding the method of calling it depends on your FM.
    if it is big RFC with complex structure, you can create the service call for it with destination given as RFC desitination.
    if it is simple straight forward RFC you can directly call it.
    for creating RFC service call call use this method
    1. Starting the Wizard
    To start the wizard, position the cursor on the Web Dynpro component to be edited in the object list at the left margin of the
    workbench window. Open its context menu and choose the entry Create->Service Call. The wizard is started and leads you
    through the creation process.
    Press Continue.
    2. Choice of Controller
    On the second dialog window of the wizard, you can choose whether the service call is to be embedded in an existing
    controller or whether a new controller is to be created for this purpose. Service calls can only always be embedded in
    global controllers u2013 that is, in the component controller or in additionally created custom controllers. It is not possible, to
    embed service calls in view controllers.
    a. Select radio button Use Existent Controller
    b. Do not change the default entry for component: <CC name>
    c. Enter for controller COMPONENTCONTROLLER
    d. Press Continue.
    3. Service Type and Service Selection
    a. You now select, which service type should be used for this service call. Select radio button Function Module. Fill the
    destination here. Press Continue.
    b. Select the service: for Function Module enter <RFC name>. Press Continue.
    4. The Required Methods and Context Elements
    On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes
    required by the service call as well as to the required methods. The proposed names are based on the names of the
    embedded service, but you can change them as required. However, heed the respective notes in the corresponding dialog
    box.
    a. Adapt Context: Select from Nodes/Attributes . Press Continue.
    b. Specify Method Name: leave all entries as provided: Component:  Controller: COMPONENTCONTROLLER Method: EXCUTE_ Press Continue.
    5. Completing the Choice
    When you have confirmed the last dialog box, the generation is triggered. Afterwards you now have the required methods
    and contexts at your disposal for using them within your Web Dynpro component.
    or if you want to call directly the use the call statement with destination

  • Calling Remote enabled Function module in java using RFC Destination

    Hi
    We are on Portal 7.3 ehp1 sp9.
    Steps followed are :
    RFC Destination called “SAP_RFC” has been created as below :
    Configuration -> Destinations -> RFC Destinations
    Connection and Transport:
    Load balancing :Yes
    Provided : SystemID / MS Server / MS Server Service / Logon Group / Gateway Host / Gateway Service
    SNC : Inactive
    Logon Data:
    Authentication : Current User (Assertion Ticket)
    Language : EN
    Client : XXX
    Repository Connection:
    Destination Name : This Destination
    Specific Data:
    pooled Connection Mode : Yes
    Max : 5
    Size : 10
    Max. wait time : 10,000
    Ping Destination results : Successfully connected to System XXX as per user XXXXXXX.
    JAVA Code as Follows:
    JCoDestination destination = JCoDestinationManager.getDestination("SAP_RFC");
    //destination.ping();
    JCoRepository repository = destination.getRepository();
    JCoFunction function = repository.getFunction("FM_NAME");
    function.execute(destination);
    Lines highlighted in RED color throwing an error as below :
    {"ERROR":"Initialization of destination JCO_RFC failed: Incomplete logon data. on <SID> mshost <MS_HOST>/ com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Incomplete logon data. on SID mshost MS_HOST"}
    And found that no COOKIE with the name “SAP_SESSIONID_<system>_<client>” was not found, I am afraid that “Assertion Ticket” was not created in above scenario.
    To confirm SSO configuration working, i have followed below steps:
    1) Created System Object pointing to R/3 and tests were successful for authentication type "SSOLOGONTICKET / ASSERTIONTICKET"
    It's J2EE application, no references or any other additional configuration been made part from above.
    Any help ?
    Thanks

    Here is log ..Assertion ticket could not be retrieved. Error was null
    Log Record Details
    Message:
    Assertion ticket could not be retrieved. Error was null
    Severity:
    Error
    Date:
    2014-04-23
    Time:
    20:28:26:056
    Category:
    /System/Security/destinations
    Location:
    com.sap.security.core.server.destinations.service.AssertionTicketRetriever
    Application:
    Thread:
    System [2]
    Data Source:
    j2ee/cluster/server0/log/system/security_00.log
    Arguments:
    Passport User Activity ID:
    3a7af5ddca8b11e384bd8adb6f484d33
    Message ID:
    Session:
    Transaction:
    User:
    Time Zone:
    +0800
    Customer Message Component:
    BC-JAS-SEC
    Runtime Component:
    tc~sec~destinations~service
    Correlation ID:
    3643650000002747
    Passport Session:
    3A7AF5DDCA8B11E384BD8ADB6F484D33
    Passport Connection:
    3a7af5ddca8b11e384bd8adb6f484d33
    Passport Connection Counter:
    0
    Log ID:
    C0000AD01D7B002200000EA5009800B2
    Host:
    host
    System:
    XXX
    Instance:
    J00
    Node:
    server0

  • Problem using RFC to call an adobe form to create pdf file........

    Hi,
       I have an RFC that calls an adobe form to display the pdf output back in a bsp page...the RFC fails at the call to the adobe form (next call after after getting the form name) ...while debugging it looks like within this call it is trying to call fpcomp_job_open and failing on the call check_job_open ...
    The code in my RFC looks like this....
    DATA:
        gs_outputparams  TYPE sfpoutputparams,
        fn_name           TYPE rs38l_fnam,
        fp_docparams      TYPE sfpdocparams,
        fp_formoutput     TYPE fpformoutput,
        frm_result        TYPE sfpjoboutput,
        lv_form           TYPE fpname.
    DATA: l_pdf_xstring  TYPE xstring,
           l_pdf_len      TYPE i.
    lv_form = 'ZHR_ASSESSMENT_FORM'.
    Start formrocessing - OPEN spool job to send to printer
      gs_outputparams-getpdf = 'X'.
      call function 'FP_JOB_OPEN'
        changing
          ie_outputparams = gs_outputparams
        exceptions
          others          = 1.
      IF sy-subrc <> 0.
    *//    RAISE FP Open Error.
          exit.
      ENDIF.
    Get name of the generated function module for the form
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = lv_form
        IMPORTING
          e_funcname = fn_name.
      IF sy-subrc <> 0.
    *//    RAISE FP Get Form Module Name Error.
            exit.
      ENDIF.
    Call the Adobe Form
      CALL FUNCTION fn_name
      EXPORTING
          /1bcdwb/docparams  = fp_docparams
          gv_appraisal_id = gv_appraisal_id
      IMPORTING
         /1bcdwb/formoutput = fp_formoutput
        EXCEPTIONS
          usage_error        = 1
          system_error       = 2
          internal_error     = 3
          others             = 4.
      IF sy-subrc <> 0.
    *//    RAISE Call Form Module Error.
            perform f_build_message using 'E'
                                      'ZEXT'
                                      012
                                changing return.
           exit.
      ENDIF.
    End from processing - Close spool job
      CALL FUNCTION 'FP_JOB_CLOSE'
        IMPORTING
          e_result       = frm_result
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    *//    RAISE FP Close Error.
           exit.
      ENDIF.
      form = fp_formoutput-pdf.
    Thanks,
    Venkatesh

    what is the solution for this problem? I have the same problem. I get sy-subrc = 1 after CALL FUNCTION 'FPCOMP_JOB_OPEN'.
    If I look more in detail I see that "Perform check_job_open" is creating the problem:
    FORM check_job_open.
      IF fpstat-is_opened = c_true.  (--> exactly here is the problem. This condition is true so the program is terminated.)
        PERFORM reset_status.
        MESSAGE ID 'FPRUNX' TYPE 'E' NUMBER '101' RAISING usage_error.
      ENDIF.
      fpstat-is_opened  = c_true.
      fpstat-is_started = c_false.
    ENDFORM.       
    Does somebody know why my job is open and what is the solution to have the job closed at the beginning of my processing?
    Thanks in advance.

  • RFC Sync Call

    Hello All,
    I am new the SAP-ABAP and XI environment.
    I am integrating HCM-Payroll/GL Posting to FI.
    i add BAPI_ACC_EMPLOYEE_EXP_CHECK a special method call at BD97.  Since i need to check before create the IDOC i add as RFC Sync.
    Then I ran the report RPCIPE00.  I am getting following the error message.
    The error Message.
    "The function module "BAPI_ACC_EMPLOYEE_EXP_CHECK" has been called remotely and has generated a progam termination in the receiving system "XI_XD1". For more information, see the dump analysis in the receiving system."
    Could you please guide what i am doing wrong.
    If i remove the BAPI from BD97 then the documents are created but no messages on SXMB_MONI.
    Thanks
    SV

    Hi SV,
    logging for synchronous messages is turned off by default but you can activate it by :-
    TCODE
       SXMB_ADM
         -> Integration Engine Configuration
          -> Specific Configuration
    Add the entry  
    <u><b>Category                            Parameters                         Value</b></u>
    RUNTIME                                     LOGGING_SYNC           1
    Regards
      Kenny

  • Debugging RFC

    I just rolled out a new app and can't get he RFC call to work.   The trace file shows:
    ---> RFC MESSAGE/ERROR : 104
    RFC_ERROR_SYSTEM_FAILURE
    CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456
    Timeout during connection setup (check that partner exists)
    So I did a bit of messing around in SM59.  The ONLY thing I would change in SM59 was
    the program being called.  I changed the called program than ran connection test.  All these Unix programs are owned by the same user and have the same rights. 
    /usr/sap/DEV/SYS/exe/run/tp -> worked OK
    /usr/sap/DEV/SYS/exe/run/tf80server.csh -> timed out
    copied 'tp' to 'tf80server.csh'
    /usr/sap/DEV/SYS/exe/run/tf80server.csh -> worked OK
    /usr/sap/DEV/SYS/exe/run/sapftp -> worked OK
    copied 'sapftp' to 'tf80server.csh'
    /usr/sap/DEV/SYS/exe/run/tf80server.csh -> worked OK
    copied orignal tf80server.csh back
    /usr/sap/DEV/SYS/exe/run/tf80server.csh -> timed out
    The timeout doesn't seem to be consistant what whatever program I put in. I even created a short shell script (called vince.sh) that only had:
       echo "hi"
       exit 0
    /usr/sap/DEV/SYS/exe/run/vince.sh -> timed out
    BUT copied 'tp' to 'vince.sh'
    /usr/sap/DEV/SYS/exe/run/vince.sh -> worked OK.
    So I don't think it is a TaxFactory issue but an internal SAP/RFC
    issue. I am unsure how to debug further.
    Suggestions?
    Thanks!
    HP-UX 11.31 Oracle 11.2.0.2 SAP 7.00 Kernel 278 Basis Support Pack 22

    Though I would still like to know how to further debug RFC turns out it is a BSI issue.  The tf80server executable turned out to be the point of failure.

  • Where can we define that a FM is called remotely

    Hi experts,
    Some function modules are implemented, and it seems to me that they are called remotely, from another non-SAP système, to create purchase orders, my question is, where can i find the settings that show when one module function is called? Should it be an RFC connexion?
    Thanks in advance.
    Soufiane.

    You want to know if the FMs are being called remotely by a external system?
    First thing is know if the FMs are remote enabled. You can check this in the FM attributes in SE37.
    The only way I know would be turning the DIA traces to 2 and waiting to see if some external application is calling these FMs...

  • Calling Remote Functions Locally Triggers any Database commit(Implicit)

    Hello,
    Am making use of RFC enabled function module as normal function module (Calling remote function module locally).
    My question is does it trigger any implicit database commit or not. Since synchronous RFC triggers database commit.
    Regards,
    Tenzin Choegyen

    I057200 wrote:
    Since synchronous RFC triggers database commit.
    Let me correct the statement both synchronous as well as asynchronous RFCs trigger an implicit DB commit.
    SAP documentation on synch-RFCs states:
    If the content of dest is equal to the constant space, then the addition DESTINATION is ignored and a normal call CALL FUNCTION func is executed.
    Please note that you should not use the DESTINATION addition or use DESTINATION space. DESTINATION none will start the FM as an RFC in the same app server.

  • RFC iView calling SAP screen

    Hello all,
    We have a RFC that calls a SAP screen. Is there a way showing this screen from a RFC iView? Parameter I can set on the iView, connector, SAP system?
    Other RFC'S work great, but this one contains a SAP popup.
    Thanks!
    Martin

    if there is a screen processing it will not work with RFC iview. (general rule of RFC is not to have screens in them)
    Regards
    Raja

  • While  debuging  rfc I'm getting some problems..

    HI Guys,
    While Debugging RFC's, when passing values to parameters they are entering to BAPI Return,but for some values they are not entering to BAPI Return..
    Its very Urgent..Please Rectify As soon as possible
    With Regards
    kirankp

    Hi,
    I guess this problem is specific to the BAPI which you are invoking remotely.
    It might be giving different output returns on different inputs parameters.
    Please provide more detail for making the problem more clear, if issue aint resolved.
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • Debug RFCs within ABAP

    I have a custom FM that I'm calling remotely via the .Net connector. When this function module is called via the ABAP test harness everything works great. When I'm calling it remotely nothing works. How do I set this code up for debugging bearing in mind that triggering it directly from the SAP client works just fine.

    Aaron,
    Goto FM and from the menu click on
    <b>Utilities> Settings>ABAP Editor--> Debugging</b> over here check the <b>External Debugging</b> by passing the User ID.
    And put a breakpoint where ever u want and call the FM from .Net then cursor will stop at the breakpoint...
    Hope this helps...
    Chandra.

  • What is the exact syntax for calling remote function module.

    Hi to all
    1.....what is the exact syntax for calling remote function module.?
    Thanks and regards,
    k.swaminath reddy

    hi
    good
    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 & check the pass value (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & check the pass value
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & check the pass value
    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 'XXXXXX'
    exporting
    p_num1 = 10
    p_num2 = 15
    importing
    p_tot = tot.
    write tot.
    please note that XXXXXX is RFC connection which is avialable in sm59 transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of XXXXXX in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    reward point if helpful.
    thanks
    mrutyun^

Maybe you are looking for

  • I have bought Mac Os X Mauntain Lion Operating System for my mac book pro.I reinstalled my system.Now I cannot download it.It says"This product is not avaible for Turkish App Store".How can I get the Operating System?

    I have bought Mac Os X Mauntain Lion Operating System for my mac book pro some time ago.I then reinstalled my system.The original operating System on my Mac is 10.7 Lion. Now I cannot download Mac Os X Mauntain Lion Operating System.It says"This prod

  • Out of memory, then xfl corrupted

    I had a very simple flash project going in CS5, when suddenly an out of memory exception appeared. I save my .xfl project - and restarted flash. Only to find that I could not reload the project... Anybody else experienced xfl problems? Is it too soon

  • Urgent help in query

    i have a table having business_name,sales,SIC the data is shown below business_name sales sic xxx 30 1300 yyy 45.5 2000 zzz 65 8769 i need to generate a report the number of business having sales between 0-50 and sic between 000-3000 and 3000-5000 an

  • Getting real sql code

    Hi to All I want to know if is possible get the real string sql of an operation using some class of toplink? For example: I have an expression "Expression ex = new ExpressionBuilder().get("CadTitular").get("titId").equal(5)" This is equals the follow

  • Adding H.264!!

    Argh, this should be simple but its frying my brain and I have to ask for help which I hate doing because it should be easy.I'm using dreamweaver CS4.Recently I have decided to replace all FLVV content with H.264.I have produced H.264 videos with the