10-01-2008 5:32 AM
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
10-01-2008 5:36 AM
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..
10-01-2008 6:04 AM
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
10-01-2008 12:31 PM
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.
10-06-2008 9:21 AM
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.
06-15-2009 5:41 AM