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.

Similar Messages

  • Debug RFC called from external system with no dialog user

    Hi all,
    We need to debug the rfc function module which is called from the external system( Siebel ) .
    The user id is not dialog user so can not set external debugger.
    Need you help.
    Thanks,
    Anmol.

    Hi Suhas,
    Nice to know you became Moderator...
    Hmmm the solution you provided was the last option..
    Any ways the issue is resolved we changed the user to dialog user and then debugged the code.
    Thanks a Lot,
    Anmol.

  • Debugging RFC-call in ERP-system

    Hi experts,
    I've a similar  problem as decribed Values for FM structure not delivered as expected - but the opposite direction:
    we send data from PI, which received a FTP-file,  to ERP by RFC-Function.
    last week we enhanced the output structure for this fm in PI (resp. in ERP: input structure)
    result:  the field is filled in the xml-file, which leaves PI -  but the field comes blank into  ERP-system
    we've already emptied PI-cache!
    is there any chance to debug the process in ERP-system???
    thank you and regards
    Andreas from germany

    Hi Andreas,
    We had the same problem.
    Clearing all the caches and even restarting the PI system did not help.
    Reactivating all the configuration objects for the specific scenario fixed the problem.
    This means:
    - sender agreement (if existing)
    - receiver determination
    - interface determination
    - receiver agreement
    - communication channel
    If you want to debug the rfc that is called, insert an external breakpoint on the userid that is connecting from PI towards ERP (configured in receiver communication channel). You can change this userid via:
    Utilities --> settings --> abap editor -->debugging --> external debugging userid
    Hope this helps.
    Kind regards
    Joris
    Edited by: Joris Verberckmoes on May 31, 2010 9:33 AM
    Edited by: Joris Verberckmoes on May 31, 2010 9:36 AM

  • 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..

  • RFC call from ECC to SCM -- Debug Steps required

    Hello,
    The steps being done for this issue is:-
    1) In ECC system ,CN22 Transaction Code (Change Networks) --> Click on Schedule (at the Header) and click on SAVE
    2) This seems to trigger an RFC call to SCM server (as per the trace log).
    3) From SCM, it comes back to ECC server as User 'BATCHRFC'. This has been defined in SM59 correctly.
    4) BATCHRFC in ECC system calls an RFC FM 'CIF_PJ_INBOUND' and changed the status of networks to DSEX (date set by External system)
    We are trying to understand why is the RFC call being made? I can debug the FM in ECC when an external breakpoint is used.
    However, I want to know where in ECC is the RFC call made (to SCM), and how? How can I control it as we do not want this to happen? How can I debug to understand how an RFC call is made?
    Your views would be appreciated.
    Regards,
    Sanjiv

    Hi,
        What you do is, enter the Tcode, CN22, then in Command window activate debugger by entering /H
    It takes u to debugger, from menu > utilities set a break point at Satetment Call Function, it will stop at all the Function modules in debugger, so you can look for the RFC FM in the program where it is called.
    And also look for setting in debugger, may be u have some options for RFC FM.
    Regards
    Bala Krishna

  • RFC Call not returning in normal exec;retunrs in debugger

    Hi all
    i m sorry for posting it twice,due to my ignorance
    i first posted it in wrong forum
    i had a requirement to invoke a RFC Async and recieve the results in my program with a condition that the name and parameters of RFC are determined runtime.
    To meet this requirement, i generated a the RFC call and return form code dynamically and called that code from my program via a subroutine.
    The problem i am facing is that, whenever i execute my program in debug mode the RFCs are called and the parameters are returned( perform on end of task edition is used)
    via subroutine, but when i execute the code via F8 the program goes in indefinite wait for return parameters.I am calling 2-3 RFcs at same time, and all of them are on local host.
    the Functions are working well and the RFC destination is also working well.
    But this amalgum of my program and dynamic calls is not going through.
    I read in documentation that if we change the program context or the roll area then the results are not recieved by main program. by the way i am using WAIT to receive the results.
    For the moment if i consider, my program context or roll area is getting changed because of dynamic code generation then also the dynamically generated code is the one containing the RFC call and its revieve subroutine, therefore there shall be no problem with that, the other thought i am getting is that in debugger implict commit work happens, is the program working because of that in debugger?? i dont know....
    Can any one help me with this, in the above long paragraph if anyone gets confused..i can again try to restate my problem.
    One more thing..i have checked the ST22 and SM50 for any abnormalities, couold not find one.
    thanks in advance
    praveen

    WAIT statement also triggers a DB commit like debugger.
    Are you using WAIT UNTIL <condition>?
    Regards
    Sridhar

  • Problem passing a table parameter in rfc call using the function control

    I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
    The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
    The SAP RFC Control is created with
    Set sapFunctions=CreateObject("SAP.Functions")
    Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    <i>'set exports</i>
         .Exports("PA_GLPUPDLEVEL") = "S"
         .Exports("PA_VKORG") = "FI14"
    <i>'append table row</i>
         .Tables("IT_SALES_DATA_UPD").AppendRow
         .Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
         .Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
         .Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
         .Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
         .Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
         .Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
        <i>'do something with the return tables here...</i>Else
        Debug.Print sapMaterialUpd.Exception
    End If
    The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
    The local logfile that the control generates shows that an exception occurs at the point of the call:
    <i>10.02.2005  17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
    Packing Parameter PA_GLPUPDLEVEL.
    Packing Parameter PA_VKORG.
    Packing Table 0.
    Packing Table 1.
      10.02.2005  17:54:20.766 *** Calling  RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
      10.02.2005  17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
      10.02.2005  17:54:20.986 RFC Error: RFC_IO27
      -Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
      -Message:connection closed
      -Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
      10.02.2005  17:54:20.986 Function call finished.</i>
    Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    'set exports
        .Exports("PA_GLPUPDLEVEL") = "S"
        .Exports("PA_VKORG") = "FI14"
        'do <b>not</b> append a table row, for testing only ;-)</b>
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
    <i>    'do something with the return tables here...</i>
    Else
        Debug.Print sapMaterialUpd.Exception
    End If
    This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
    So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
    Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
    Any hints are welcome!

    hi All partner,
    who solved this problem , I meet it too and
    can't clear it.
    SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');    
    SAPitab := sapfunc.tables.item ('I_DNMO');
    SAPitab.appendrow;                                       SAPitab.value(1,'MANDT') := '220'; 
    SAPitab.Value(1,'VBELN') := '2150000001';
    SAPitab.Value(1,'POSNR') := '50';
    SAPitab.value(1,'MATNR') := '19-99999-00'; 
    SAPitab.value(1,'AUFNR') := '921241512001';
    SAPitab.value(1,'DEDAT') := '2005/09/09';
    SAPitab.value(1,'LFIMG') := '100';  
    IF  SAPfunc.call = true then
      begin
      end
    else
        begin
        showmessage('call fail!!') ;
        end;
    end;
    RFC source code as below
    FUNCTION z_get_sfcs_dn_mo.
    ""Local interface:
    *"  TABLES
    *"      I_DNMO STRUCTURE  ZDN_MO
      data: wa type zdn_mo.
      LOOP AT i_dnmo.
        wa-mandt = i_dnmo-mandt.
        wa-vbeln = i_dnmo-vbeln.
        wa-posnr = i_dnmo-posnr.
        wa-matnr = i_dnmo-matnr.
        wa-aufnr = i_dnmo-aufnr.
        wa-dedat = i_dnmo-dedat.
        wa-lfimg = i_dnmo-lfimg.
       modify  zdn_mo from wa.
        insert into zdn_mo values wa.  --dump at here
        commit work.
      ENDLOOP.
    T/C: ST22 error message say at
      insert into zdn_mo values wa. ---dump at here
    the sapfunc.call returns fail.
    Message was edited by: jorry wang

  • RFC call failing due to UNICODE implementation

    Hi
    We are trying to connect to a SAP system using the JCO (SAP-JAVA Connectivity). We are passing the user name as an input parameter and in turn the SAP system send back the no. of item (ABAP Type integer) pending for the user name to the java and its inserted/updated in Oracle DB (which does accept the unicode characters).
    It was all wokring fine untill the SAP system has been migrated to Unicode upgrade. Now the RFC call is getting failed from our system. On analysis we found with debug, that the user name is not getting accepted by the SAP system and throwing the error -says Exception in thread "main" com.sap.aii.proxy.framework.core.BaseProxyException: Conversion error between two character sets., error key: RFC_ERROR_SYSTEM_FAILURE and at the SAP end the error says "Conversion of "UNAME" from code page 4103 to 4102 is failed". The unicode change in SAP system cannot be reverted back due to some constraints.
    Can you please help, how can we pass the user name as encoded in character set 4102 or any other solution so that it can be accepted by SAP and run the Function module and return the data.
    Many Thanks
    Snehil Joshi

    Check RFC destination in Tx SM59. You must have one tab for unicode settings.
    Regards.

  • RFC call from a Windows Service

    Hi All,
    I have created a simple windows service which is making an RFC call to R/3 system. This is not working. Whereas the same piece of code written in a windows application projects(exe) works properly. Does anyone had similer issues working with Windows services ? Is it a known issue of RFC calls from windows service ???
    Thanks & Regards
    Ganesh Datta

    Hi Juergen,
    After I put the debug statements I figured out that connection to R/3 system is unsuccessful.
    I am using the SAP .Net Connector 2.0. I wrote a windows service which is manually started. Withing my service I am using Single sign on to connect .This is what was causing the problem. If I disable Single sign on and supply userID and password then connection is successful and also subsequent RFC calls.
    I guess within windows service Single sign on does not work.
    Thanks for your reply
    Best Regards
    Ganesh Datta

  • RFC call history - View Parameter data

    Hi all!
    I would like to view the parameter values of an incomming RFC call made by an external system. Is this possible?
    I have had a look at ST01 and ST05 and ST11...
    (Obviously I have activated the trace with "RFC Trace" checkbox selected and run through a few calls via the external system (which were successful) and then turned off the trace)
    - ST01 and ST05 (same functionality?) do not even list the function calls!?
    - ST11 (error log!) does list the function module but it only says how many bytes were sent and received, and does not appear to have parameter specific details...
    Thanks for any clues!
    N

    Hi N K and others with a similar problem
    I am not aware of the possibiblity to see the parameters. But I had a similar problem as I am calling a function module in SAP through a webservice, but the response was not as expected. To see the input parameter I added a HTTP breakpoint in the function module I was trying to call.
    Remember in the function builder to activate the external debugger for the user making the call ("Utilities" -> "User-specific Settings" -> "ABAP Editor" -> "Debugging")
    When the debugger stopped at my brekpoint i was able to see the parameters.
    Hope this helps anyone out there
    Best regards
    Chris Christoffersen

  • Custom Metadata Extension with RFC call

    Hi all,
    I am trying to create a custom metadata extension that pulls data from ECC via an RFC call and returns values as a IMetaValueList in the getAllowedValues method.
    Does anybody have any experience?
    Thx
    Ismail

    Hello Sanjeev,
    - I Kept External break point in SRM where we are calling RFC Call for ECC, I am able to debug untill the RFC call,
    - But, on RFC Call ( CALL FUNCTION ZABC destination <Destination>), when I press F5 it is not going inside the function module.
    - I am getting Export parameter values, means ctrl is going to ECC, but not able to debugg our BE system -ECC.
    Pls suggest. Thanks for your quick reply.
    Regards,
    Mohan Vamsi

  • 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.

  • PCD Filter using RFC call

    does any body has done PCD filtering by reading filter attribute using RFC?
    I have created one CountryFilter that read country information from RFC. I am using Java connector Framework to connect to RFC. It is working fine but my concern is about performance. I have put some debug message in R/3 function module. and what I have noticed is that RFC is called 7 times to filter one page
    _Does any body have any idea that what is the good practice? Is it really good idea to use RFC call in Filtering PCD content.?_
    My code looks like below
    java code looks like below
    class CountryFilterFactory
    method getObjectInstance()
    calling RFC and getting Country value from R/3 system
    return filterexpression
    I have also put debug message in getObjectInstance method of factory class. and I also noticed that getObjectInstance() method is also called several times.
    Thanks
    Chetan Patel.

    HI AVIK SANYAL 
    I don't understand what you want to say. I have made seperate java clas to call RFC. But as getObjectInstance is calling so many time so RFC .....I don't know anything about storing the value in session. Can you please tell me in detail how to do that
    Thanks
    Chetan.

  • Tracing rfc calls

    Hi
    I was wondering if their is  a way of debugging specifiic RFC action. I have a system which is suppose to change a password in the SAP, it says it does ,however it does not and  I need to trace it step by step. in the st0 and st05 I see the calls but its to generic, I can see the functions being used for the RFC, example I need to know if bapi_user_change is executing the packges passworx and I do not see that.
    can some help me please

    Hi,
      Instead of using ST01 and ST05 to trace the RFC, you can set the external break-point and activate your user to debug.
      See this link for more details and question
      http://sapignite.com/how-to-debug-sap-rfc-background-job-update-fm-etc/
      How to debug RFC function module in ECC 6.0
    Regards,
    Chaiphon

  • Program making a RFC call to Function Module not working in background

    Hi All,
    I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
    1.     Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
    2.     Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
    3.     Function Module Passes back the count values and aggregated Net_Value to the program
    4.     Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
    However we are facing an issue.
    Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
    Thanks & Regards
    Dharmendra

    RFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.

Maybe you are looking for

  • Why the back of my camera iphone 5 is no longer the focus?

    She doesnt word and my iphone is always protected by a cover, i buy my iphone5  1 year ago. Except this problem with the back camera focus, hé works perfectly

  • FM to find valid warranty for service order?

    Hi Experts, Is there any FM available to find the valid waranty for the Service order? I knw there is link between warranty and Ibase component. Valid waranty is getting determined while creating service order. But I need to read this warratny from t

  • Reading attachments in PI map

    Hi, I have a scenario where, i have attachment (PDF) are getting attached through Proxy. I need to save these attachments to Live Link Folder. I have seen some posts here where they have explained the java code used in UDF to read the attachments. I

  • Clean Uninstall of Palm Desktop on Windows 7HP 64bit

    I read the message for XP & Vista but I hope to find support for the same with Windows 7 Home Premium 64bit. Thanks, Selvan Post relates to: Treo 90

  • Adobe Première et Mac

    Bonjour, Je travaille avec Adobe Première sur un PC. J'aimerais acheter un Mac Book Pro pour faire des montages vidéos en déplacements. Quel modèle me conseillez-vous ? D'avance merci