How to Debug Functional Module called via RFC?

Hi Experts,
     Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
  Best Regards,
Aleksandar

Hi Laxman,
   First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
     I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I can’t change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply can’t get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen ‘NEXT STEP’ (F6).
     To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users?  If you need any additional info please tell me.
  Thanks again for your support.
Aleksandar

Similar Messages

  • How  to debug function module in update task ?

    Hi ,
              i have following code :
    CALL FUNCTION 'ZSD_t_UPDATE' IN UPDATE TASK
                 TABLES
                                  it_xvbkd = xvbkd.
    Inside this function module i have some code  to debug . How can i debug it ?
    I put the breakpoint in it but its not working .
    It is triggered on save of  a tcode .
    Thanks and Regards .

    My home-grown method:
    Set your breakpoint in the FM.
    In your transaction, just before you press save, enter hobble mode in your command box with '/h'.
    press save.
    In your first debug screen, toggle settings>system debugging ON (NetWeaver Drop-down menu) or see previous notes for earlier WebAS versions.
    Select continue (F8).
    The program should then stop at your break-point in the FM.

  • How to debug Function Modules from ISA!!!

    Hi Gurus,
                     How to debug the function modules from ISA.
    For Ex:If i am in shopping cart or product catalog,e.t.c..i need to know which FM is calling from backend, how to debug the FMs/Bapis related to that from ISA side.
    direct me to all the possible ways.
    Regards,
    Anil.

    Hello Anil,
    There are a few things you need to look at when trying to debug .
    1. The function module needed ( you can do a trace to see which one is called.)
    2. The user that is been user With statefull and stateless connection the FM can be called by either the JCO user or the internet user. This will need to be considered when setting your external break point.
    3. The server been used, You will need to check the XCM to see which server is been used ie are you using a group connect of a specific server , You need to make sure that you are setting the breakpoint on the server that is specified in the XCM.
    Have a look at note [871907|https://service.sap.com/sap/support/notes/871907]   the attachment to the note may help you a lot. .
    Hope this helps.
    Regards
    Mark
    Edited by: Mark Foley  on Feb 11, 2009 11:10 AM

  • Debugging ECC FM called via RFC

    Hello experts,
    From a CRM Function Module, we are trying to invoke a custom ECC FM. On debugging, the flow does not go to the ECC module for debugging (although it returns the values). We tried several options like adding RFC param in su01, Activate Remote Debugging in ECC, sm51, sm50 etc. But none of this helps.
    Any suggestions on debugging would be most welcome.
    Regards,
    Nisha

    You can follow these steps to indirectly debug your ECC FM.
    1) Put an infinite loop in your ECC FM, say
         DATA TEMP.
         DO.
          IF TEMP = 'X'.
            EXIT.
          ENDIF.
         ENDDO.
      2) Execute your CRM FM in which your ECC FM is being called.
      3) Go to ECC, Transaction SM50 (Process Overview). You will see your FM's entry. Select your FM's entry then from the  menu select Program/Session>Program>Debugging. This will open your ECC FM in debug mode. Put value of TEMP as 'X' and continue debugging.

  • How to find  function module call in 'BP_GIVE_MESSAGE' in BAPI

    Hi experts
    i want debugg the BAPI_GOODSMVT_CREATE  to find out what data passing to 'BP_GIVE_MESSAGE' function module.
    i tried to find through FIND button i could not find it.
    please can you tell me how can i find  call 'BP_GIVE_MESSAGE' in BAPI_GOODSMVT_CREATE source code.

    Hi experts
    i want debugg the BAPI_GOODSMVT_CREATE  to find out what data passing to 'BP_GIVE_MESSAGE' function module.
    i tried to find through FIND button i could not find it.
    please can you tell me how can i find  call 'BP_GIVE_MESSAGE' in BAPI_GOODSMVT_CREATE source code.

  • Function Module Call Via CMOD Logic for Master Data Enhancement

    Hi Friends Please help me to resolve this, would really be very kind of all of you.
    Requirement. I want to Enhance the field ZFACTREG from VIBDBE table in my datasource 0busentity_attr extract structure l_s_REIS_BUSENTITY_ATTR, I want to create the logic in CMOD exit_saplrsap_002 to call my function module for enhancement of master data. Please help me Step by Step
    Thanks
    Poonam Roy
    <b>Step #1</b>
    I put this code which gives me error in CMOD like this
    ERROR : Das formale Argument 'OTHERS' muss am Schluss der Ausnahmeliste stehen.
    ABAP Code#1 IN exit_saplrsap_002     
    DATA: l_d_fmname(30) TYPE c.
    CONCATENATE 'Z_DS_' i_datasource(25) INTO l_d_fmname.
    TRY.
    CALL FUNCTION l_d_fmname
    EXPORTING
    I_DATASOURCE = I_DATASOURCE
    I_UPDMODE = I_UPDMODE
    TABLES
    I_T_SELECT = I_T_SELECT
    I_T_FIELDS = I_T_FIELDS
    I_T_DATA = I_T_DATA
    C_T_MESSAGES = C_T_MESSAGES
    EXCEPTIONS
    RSAP_CUSTOMER_EXIT_ERROR = 1
    OTHERS = 2
    IF FOUND.
    IF SY-SUBRC <> 0.
    RASIE RSAP_CUSTOMER_EXIT_ERROR.
    END IF
    CATCH CX_SY_DYN_CALL_ILLEGAL_FUNC.
    ENDTRY.
    <b>Step#2</b>
    I simple created the Function module Z_DS_BUSINESS
    and put the code in source code  which gives me error . what should i put in other tabs like"Import", Export", Tables" i kept blank
    ABAP CODE give me error : The Dictionary structure or table "FIELD-SYMBOLS" is either not active. i have to remove include in the FM. WHY SO??
    FUNCTION Z_DS_BUSINENSS
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_DATASOURCE) TYPE  RSAOT_OLTPSOURCE
    *"             VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM
    *"             VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE
    *"       TABLES
    *"              I_T_SELECT TYPE  SBIWA_T_SELECT
    *"              I_T_FIELDS TYPE  SBIWA_T_FIELDS
    *"              I_T_DATA
    *"              C_T_MESSAGES STRUCTURE  BALMI OPTIONAL
    *"       EXCEPTIONS
    *"              RSAP_CUSTOMER_EXIT_ERROR
    INCLUDE ZXRSAU02.
      WRITE: / 'INSIDE THE Z_DS_MEASUREMENTS PROGRAM'.
    TABLES: REIS_BUSENTITY_ATTR,
            VIBDBE,
    field-symbols:.<fs_REIS_BUSENTITY_ATTR> like REIS_BUSENTITY_ATTR.
    DATA: BEGIN OF i_c_t_data OCCURS 0.
              include structure REIS_BUSENTITY_ATTR.
    DATA END OF i_c_t_data.
    DATA: i_c_t_data_copy like i_c_t_data OCCURS 0 WITH HEADER LINE,
          begin of i_vibdbe occurs 0,
          INTRENO like vibdbe-INTRENO,
          ZFACTREG like vibdbe-ZFACTREG,
                  end of i_vibdbe.
    i_c_t_data_copy[] = i_c_t_data[] = c_t_data[].
    sort i_c_t_data_copy by vibdbe.
    Select  INTRENO
            into table i_VIBDBE from VIBDBE
            for all entries in i_c_t_data_copy
            where  INTRENO = i_c_t_data_copy- INTRENO.
    if sy-subrc = 0.
      sort i_VIBDBE by INTRENO.
      loop at i_c_t_data assigning <fs_REIS_BUSENTITY_ATTR>.
        clear: i_VIBDBE.
        read table i_VIBDBE with key INTRENO = <fs_REIS_BUSENTITY_ATTR>-INTRENO
        BINARY SEARCH
        transporting ZFACTREG .
        if sy-subrc = 0.
          <fs_REIS_BUSENTITY_ATTR>-ZZFACTORY = i_vibebe-ZFACTREG
        endif.
    null

    (I leave office until Monday morning, Europe time)
    in include from customer-exit ZXRSAU01, etc.
    CASE I_DATASOURCE.
    WHEN '0CUSTOMER_ATTR'.
       PERFORM 0customer_attr changing i_t_data...
    ENDCASE.
    In each perform, doing what you wrote ; select (needed fields) from complementary-database-table into an internal table with a for all entries. sort the table. LOOP and MODIFY on i_t_data.
    In some case i had to insert lines of i_t_data to an internal table of DS_structure when entering subroutine and back at exit. (on 4.6C PI 2003 if i remember)
    Some optimization done when reading small tables (T001 society and the same, these are filled once and not for each packet of data.
    Your idea of creating different FM is of interest, but the cost of passing i_t_data between two programs (two function groups) may overcome the gain of performance. In a job only one DataSource is processed so only one routine is actually called.
    Regards.

  • Call of function module "SUBST_START_BATCHJOB" by RFC failed

    Hello Guru's,
    We have the following Issue:
    In Phase PREP_INIT/JOB_RSUPDTEC we get this error from EHPI (Version 710-1)
    Checks after phase PREP_INIT/JOB_RSUPDTEC were negative!
    Last error code set: BATCHJOB RSUPDTEC FAILED: Calling RSUPDTEC failed - repeat phase.
    In the file PSUPDTEC.LOG are the following error:
    4 ETQ260 Starting batchjob "RSUPDTEC"
    4 ETQ230 Starting RFC Login to: System = "E11", GwHost = "sape11", GwService = "sapgw00"
    4 ETQ359 RFC Login to: System="E11", Nr="00", GwHost="sape11", GwService="sapgw00"
    4 ETQ232 RFC Login succeeded
    4 ETQ233 Calling function module "SUBST_START_BATCHJOB" by RFC
    4 ETQ399 JOBNAME='RSUPDTEC', REPNAME='RSUPDTEC', VARNAME='', BATCHHOST='sape11', IV_SCHEDEVER=' '
    4 ETQ234 Call of function module "SUBST_START_BATCHJOB" by RFC succeeded
    4 ETQ399 Returned JOBCOUNT='14230100'
    2EETQ235 Call of function module "SUBST_START_BATCHJOB" by RFC failed (error-status "27")
    2EETQ261 Start of batchjob "RSUPDTEC" failed
    In the Sysem we can see, that the Job RSUPDTEC was created by DDIC but not started.
    We can start (and finish) the job successfully as logged in DDIC.
    We don't know whats the problem. The EHPI stopped every time at this point.
    Need Help...
    regards
    Chris

    Issue solved.
    In /etc/hosts the first entry was SAPE11.
    But it must be sape11, because the instance is sape11_E11_00.
    In SM51 we could see that
    sape11_E11_00     SAPE11     Dialog Batch Update Upd2 Spool Enqueue ICM     active
    We changed the entry and restarted SAP.
    Then the job can be started.

  • Third party system call function module/BAPI through RFC to update Z table

    Dear Friends,
    We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
    We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
    waiting for inputs..
    Thanks,
    Kumar

    if third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
    You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table.

  • Rfc function module call error

    Hi Abaper,
    I'm doing upgrade from 4.7 to ecc 6.0 currently and encounter problem in one of the rfc function module that we used. I've tested the connection to destination using sm59 and the connection is successful.
    As an information, in the rfc setting, the target system is not Unicode system.
    When I test using se37 and put the rfc destination in my function module call, I always encountered system_error exception. There's no issue with this rfc call before in 4.7 system.
    Please help me on this. Thank you.
    Edited by: Abraham Bukit on Sep 3, 2008 2:36 AM

    Hi,
    I had the same issue in the past and solved it in the following way.
    If the destination system is not Unicode please try to set the password for the communication user set in SM59 using only upper-case characters and taking into account that the password shouldn't be longer than 8 characters.
    Hope this will help.

  • Function module call with destination

    Hi,
    how can check if a function module call with destination works or not ?
    How can I debug.
    What can be the reason if it is not calles
    regards
    ertas

    * to chcek the rfc Destination By pass RFC destination name and Connection Type..
    RFC_CHECK_DESTINATION
    or
    RFC_CHECK_DESTINATION_ID
    or
    You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
    Check this sample code from Craig Cmehil's weblog.
    CALL FUNCTION 'RFC_VERIFY_DESTINATION'
      EXPORTING
        DESTINATION = TMP
            TIMEOUT = 10
      EXCEPTIONS
        INTERNAL_FAILURE           = 1
        TIMEOUT                    = 2
        DEST_COMMUNICATION_FAILURE = 3
        DEST_SYSTEM_FAILURE        = 4
        UPDATE_FAILURE             = 5
        NO_UPDATE_AUTHORITY        = 6
        OTHERS                     = 7.
      IF SY-SUBRC EQ '0'.
        "* Do code here
      ENDIF.
    Prabhu

  • How to trace Function Modules ?

    Hi ,
    Can anybody tell me how I can trace or find all the function modules called by a trancaction ?
    I tried it using transaction ST05 but didn't got the expected result. Is there any other way to find it other than debugging the transaction ?
    I want the same for transaction "VK12".
    Thanks
    Ashwa

    Hi Ashwa,
    Approach it in this way.
    1) Goto the transaction VK12, first screen (Change Condition records).
    2) Then in the command prompt enter <b>/h</b>, ie.. switch debugging on.
    3)Hit Enter, will enter the debugging mode
    4)Then in the MENU BAR goto Breakpoints>Breakpoints At>Statement
    5)Enter <b>CALL</b> here
    6)Save and execute (F8)
    Now your debugger  will stop at all CALL statements, and thus you can trace the FM's called.
    Regards,
    Arun Sambargi.

  • Problem with function module calling

    Hi,
    I have two questions here
    i have a function moduel 'Z_GET_MATL_BALANCE'
    in my code it called in the below said way
    CALL FUNCTION 'Z_GET_MATL_BALANCE'
        DESTINATION 'NONE'
        STARTING NEW TASK 'A'
        PERFORMING f_back ON END OF TASK
        EXPORTING
          ref_dte    = s_datum-low
          str_dte    = s_datum-high
          end_dte    = s_datum-high
          i_werks    = p_werks
          i_past     = 'X'
          i_future   = 'X'
          verselem   = p_mrpver
          plscn      = p_scenar
          r_outrec   = r_outrec
          supstk     = p_supstk
          days_ahead = w_days_ahead
          shipnt     = p_shipnt
        TABLES
          mat_bals   = w_zmat_bals_a
          i_zdatum   = i_datum
          mat_movmts = w_mat_movmts_a
          mat_ship   = i_mat_ship_a.
      IF sy-subrc NE 0.
        MESSAGE e005(ZMIM) WITH
       text-009 text-166 text-054 sy-subrc.
      ENDIF.
    FORM f_back USING task.
      CASE task.
        WHEN 'A' .
          RECEIVE RESULTS FROM FUNCTION 'Z_GET_MATL_BALANCE'
         TABLES
              mat_bals                     = w_zmat_bals_a
              mat_movmts                   = w_mat_movmts_a
              mat_ship                     = i_mat_ship_a
           EXCEPTIONS
                call_material_lesen_fail     = 1
                call_t450n_fail              = 2
                call_t399d_fail              = 3
                call_aufbauen_mdpsx_fail     = 4
                call_mdezx_aufbauen_fail     = 5
                call_t001w_fail              = 6
                call_zmrpelem_failed         = 7
                call_aufbauen_mdpsx_sim_fail = 8
                OTHERS                       = 9.
          IF SY-SUBRC NE 0.
           RET_CODE1 = SY-SUBRC.
          ENDIF.
    now my first question is what is the difference between function modules calling normally and in the above said way
    and the second question is
    under tables parameter i have four internal tables defined where as while calling the same function module using recive results i have three internal tables. is this correct?
    i am asking this because i am getting an error message while using this funciton module
    please do not give generic answers, all the helpful answers will get a def reward

    Call function starting new task is used to make Asynchronus RFC Call. In this case your function module will be called in a NEW SESSION and it will exceute independently from the Main program which is calling the FM. Also, the main program will continue its own processing and it will not wait for the RFC FM to complete.
    Its not mandatory to have all the TABLES parameters in the RETURN Perform (..Receive results from ...)

  • How to Use Function Module READ_TEXT

    Hi
    Anyone give me code or link or example for how to use function module READ_TEXT
    and what are the parameters which we have to pass in module.
    Regards.
    Mohsin

    Hi,
    refer the given below code.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        id                            = 'KOPF'uF0E0 these details we will get thru transaction , where we enter these details.
        language                      = 'EN'uF0E0 these details we will get thru transaction , where we enter these details.
        name                          = TNAME  "table name
        object                        = 'AUFK'    " these details we will get thru transaction , where we enter these details.
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        = HTEXT
      tables
        lines                          = LTEXT
    * EXCEPTIONS
    *   ID                            = 1
    *   LANGUAGE                      = 2
    *   NAME                          = 3
    *   NOT_FOUND                     = 4
    *   OBJECT                        = 5
    *   REFERENCE_CHECK               = 6
    *   WRONG_ACCESS_TO_ARCHIVE       = 7
    *   OTHERS                        = 8
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks
    Arun

  • How to use functional module " DETERMINE_DUE_DATE"

    Hi All,
    Can anyone suggest how to use functional module " DETERMINE_DUE_DATE" as it is used in an FI transaction code "FBL5N" and i have to use it in my zprogram to capture the net due date..please suggest..
    Regards,
    Shanu

    hi,
    CALL FUNCTION 'DETERMINE_DUE_DATE'
                 EXPORTING
                      I_FAEDE = LS_FAEDE
                 IMPORTING
                      E_FAEDE = LS_FAEDE
                 EXCEPTIONS
                      OTHERS  = 1

  • Dynamic function module call

    Hi,
    I need to call few function modules dynamically.The exporting and importing parameters are also known only at run time.
    Can somebody help me out in this regard,
    Thanks and regards,
    Archna

    hi ,
    Create Function module according to your requirment  and call the same 
    such as
    Create functi0n module   where you are passing PLant  runtime   and get data related to Plant 
    write  code in function according to requirment  .
    FUNCTION zrfc_test.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(ZWERKS) TYPE  MARC-WERKS OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    *"  TABLES
    *"      ZIT_DATA STRUCTURE  MARC
      IF zwerks IS NOT INITIAL.
        SELECT *
          FROM marc
          INTO CORRESPONDING FIELDS OF TABLE zit_data
         WHERE werks = zwerks .
      ELSE.
        SELECT *
          FROM marc
          INTO CORRESPONDING FIELDS OF TABLE zit_data.
      ENDIF.
      IF sy-subrc = 0 .
        MESSAGE ' Selected ' TYPE 'I' .
      ENDIF.
    ENDFUNCTION.
      Suppose  at runtime you get Plant  7100
    types : begin  of w_marc .
             include structure  marc  .
    types : end of w_marc .
    data : it_data type standard table of w_marc with header line  .
    p_plant  = 7100 .
    Call to function module 
    CALL FUNCTION 'ZRFC_TEST'
    EXPORTING
       ZWERKS         = 'p_plant 
    IMPORTING
      RETURN         =
      TABLES
        zit_data       =  it_data  .
    You will get result in it_data .
    Note : if you don't know how to create  Function Module then  search on SDN you will get lots of Forum  .
    Regards
    Deepak.

Maybe you are looking for