Skip to Content
avatar image
Former Member

How to Debug RFC Enabled FM ?

Hello All,

I want to debug an RFC Enabled FM.

I've written a small Test program to check this.

DATA: eenumber	      LIKE	bapip2001-pernr,
      subtype	      LIKE	bapip2001-subty,
      objectid	      LIKE	bapip2001-objps,
      lockindicator	LIKE	bapip2001-sprps,
      validitybegin	LIKE	bapip2001-begda,
      validityend	      LIKE	bapip2001-endda,
      recordnumber	LIKE	bapip2001-seqnr.



CALL FUNCTION 'BAPI_ABSENCE_GETDETAIL 
  EXPORTING
    employeenumber          = eenumber
    subtype                 = subtype
    objectid                = objectid
    lockindicator           = lockindicator
    validitybegin           = validitybegin
    validityend             = validityend
    recordnumber            = recordnumber
* IMPORTING
*   RETURN                  =
*   START                   =
*   END                     =
*   ABSENCETYPE             =
*   ABSENCEDAYS             =
*   ABSENCEHOURS            =
*   NAMEOFABSENCETYPE       =
          .

IF sy-subrc <> 0.
  WRITE:/ 'UNsuccessful'.
ENDIF.

When a Break Point is kept at the above FM and When I press F5 the cursor is going into the FM .

But when I specify the Destination in the Call Statement as :

CALL FUNCTION 'BAPI_ABSENCE_GETDETAIL' DESTINATION 'SID_010'
  EXPORTING
    employeenumber          = eenumber
    subtype                 = subtype
    objectid                = objectid
    lockindicator           = lockindicator
    validitybegin           = validitybegin
    validityend             = validityend
    recordnumber            = recordnumber
* IMPORTING
*   RETURN                  =
*   START                   =
*   END                     =
*   ABSENCETYPE             =
*   ABSENCEDAYS             =
*   ABSENCEHOURS            =
*   NAMEOFABSENCETYPE       =
          .

The control is not going into the FM.

Can any one tell me how to debug the FM within a different system ?

Regards,

Deepu.K

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 21, 2007 at 09:07 AM

    just put a endless loop before calling BAPI n execute u'r prog. n goto destination server TCODE sm50 select workprocess then goto menu program/mode-->debugging

    don't forget to reward.

    Sameer

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Sameer,

      Thanks for ur reply .

      I followed ur steps but still the cursor is not going into the BAPI of the RFC DEstination system.

      and one more thing is :

      I cant change the program now to write the endless loop.

      IN this scenario waht shud I do ?

      Regards,

      Deepu.K

      .

  • Aug 21, 2007 at 09:15 AM

    Hi Deepu,

    *Just put the BreakPoint on ur BAPI Call,

    *Put Break point CALL FUNCTION 'BAPI_ABSENCE_GETDETAIL and Execute the Program.

    Regards,

    Ram

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 09:30 AM

    Hi,

    check whetehr the FM 'BAPI_ABSENCE_GETDETAIL' in presnt in the DESTINATION 'SID_010'.Also check the RFC connectivity between the two systems..also check the logical systems of both the servers.

    Regards,

    nagaraj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Nagraj,

      I checked everything.

      The BAPI is also there in the Destination System.(SID_010)

      RFC COnnectivity is perfectly working

      Logical Systems are perfectly right.

      Regards,

      Depu.K

  • avatar image
    Former Member
    Aug 21, 2007 at 09:57 AM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sandeep Kaushik

      Hello Sandeep,

      Thanks for ur reply.

      In my case I have lot of entries which I can't enter manually in the Target system.

      Any other option ?

      Regards,

      Deepu.K