Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Debug BTE issue

Former Member
0 Kudos

Hi,

We have written a Business transaction event(BTE) for Customer. BTE number is 00001150 and is used for offset account determination.

My question is, how do I debug this code written in this BTE ?

Any explination related to BTE is very much appreciated.

Cheers

5 REPLIES 5

former_member188685
Active Contributor
0 Kudos

try with update Debugging, keep the break point in BTE code. and run the transaction with normal debugging using /h and then activate the update debugging and see..

uwe_schieferstein
Active Contributor

Hello Sudhaker

BTEs are user-exits that are realized by dynamically called function modules.

In case of BTE 00001150 you will find fm OPEN_FI_PERFORM_00001150_P with the following coding:


FUNCTION OPEN_FI_PERFORM_00001150_P.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  TABLES
*"      T_ACCIT STRUCTURE  ACCIT
*"      T_ACCCR STRUCTURE  ACCCR OPTIONAL
*"      T_ACCITSUB STRUCTURE  ACCIT_SUBST
*"  EXCEPTIONS
*"      NOTHING_ACTIVE
*"      WRONG_SUBST
*"----------------------------------------------------------------------
DATA: L_ACCIT TYPE TABLE OF ACCIT,                     "start:note530655
      L_ACCCR TYPE TABLE OF ACCCR.                     "end:note530655

call function 'PC_FUNCTION_FIND'
       exporting
            i_procs       = '00001150'
       tables
            t_fmrfc       = fmtab
       exceptions
            nothing_found = 4
            others        = 8.
  if sy-subrc ne 0.
    message s015 with '00001150' raising nothing_active.
  endif.

*---------- Contents of fields that can be substituted -----------------
  perform accitsub_fill tables t_accitsub.

*------------------ Save interface data --------------------------------
*  memid+6 = '00001150P'.                             "start:note530655
*  export t_accit t_acccr to memory id memid.
  L_ACCIT[] = T_ACCIT[].
  L_ACCCR[] = T_ACCCR[].                              "end:note530655

  loop at fmtab.
    check not fmtab-funct is initial.
    if fmtab-rfcds is initial.
*------------- Open FI Interface with local destination ----------------
      call function fmtab-funct
           tables
                t_accit    = t_accit
                t_acccr    = t_acccr
                t_accitsub = accitsubtab .
    else.
...

Function module PC_FUNCTION_FIND selects all fm's defined for this BTE which are subsequently called dynamically:

call function fmtab-funct
...

Thus, BTE debugging is by no means different from debugging any other function module.

If you are already on SAP release >= 6.20 then you can use activatable break-points, e.g.:

BREAK-POINT ID <name of checkpoint group>.

Regards

Uwe

Former Member
0 Kudos

Hi,

You can keep break-points inside the BTE and test it. Else find OPEN_FI_PERFORM_00001150_P from the main program and keep the breakpoint in the next call statement( which is a dynamic call of a function module.

Regards,

Prasana.

Former Member
0 Kudos

Hi,

I am able to debug now but I have another issue now. We have implemented OSS note 354529 and this note talks about replacement of OPEN_FI_PERFORM_00001150_P by a z function module Z_SAMPLE_PROCESS_00001150. We have done setup in FIBF and entered data as follows.

MANDT 030

PROCS 00001150

LAND

APPLK FI-AA

FUNCT Z_SAMPLE_PROCESS_00001150

PRDKT OPEN_FI

MONIT

The new func module is not being called. It is failed at call function 'PC_FUNCTION_FIND' in OPEN_FI_PERFORM_00001150_P.

Can you please let me know what I am missing here.

Former Member
0 Kudos

Please check thread for details