Application Development and Automation 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: 
Read only

Function module works correctly in debugger, but hangs otherwise.

Former Member
0 Likes
793

I am having an issue with a standard function module that 'hangs' when ran. If i look in sm37, the calling job will just continuously run. If i look in SM50, there aren't any sql statements which are bringing back large results, it seems to be running a large number of sequential reads against a certain table. The odd thing is, if i break in this function module, then press F8 to continue, the function module successfully executes and the job finishes.

The function module in question is ISU_DUNNING_DEACT_INSTPL_0350, which i have attached to a dunning activity. This function module SHOULD deactivate any active installment plans for the dunned account. The FM is odd, as it calls another FM and does a hard EXIT, even though there is code below this line that it can never access.

If I set a breakpoint in the function module, and run FPVB (dunning transaction), it will break into the function module. I can then press F8, the FM completes successfully, then the job completes. If i do NOT break it (just run in background as normal), the job just continuously runs. SM50 reveals reads to the BUT000 table (even though i cannot find any calls to this table in the fm).

Any ideas?

I am having an issue with a standard function module that 'hangs' when ran. If i look in sm37, the calling job will just continuously run. If i look in SM50, there aren't any sql statements which are bringing back large results, it seems to be running a large number of sequential reads against a certain table. The odd thing is, if i break in this function module, then press F8 to continue, the function module successfully executes and the job finishes.

The function module in question is ISU_DUNNING_DEACT_INSTPL_0350, which i have attached to a dunning activity. This function module SHOULD deactivate any active installment plans for the dunned account. The FM is odd, as it calls another FM and does a hard EXIT, even though there is code below this line that it can never access.

If I set a breakpoint in the function module, and run FPVB (dunning transaction), it will break into the function module. I can then press F8, the FM completes successfully, then the job completes. If i do NOT break it (just run in background as normal), the job just continuously runs. SM50 reveals reads to the BUT000 table (even though i cannot find any calls to this table in the fm).

Any ideas?

3 REPLIES 3
Read only

Former Member
0 Likes
745

Hello Aaron,

Can you please have SQL Trace u2013 ST05 u2013 on Fms which shows SQL Trace i.e. all u2018selectu2018 time with index hit. This might give some hint where is maximum time used. Also a Runtime Analysis SE30 to analyze o/p graph to know whether it is consuming more ABAP, DB, SYSTEM side.

Referring to BUT000 table it is for business partners. During Dunning execution your code might be passing more data to BUT000 table call in execution flow.

Thank you,

Nishikant.

Read only

0 Likes
745

Nishikant,

Thanks very much for the help.

I did this, and I can see where its getting stuck. The following entries are repeated indefinitely (until i stop it )

374 BUT000 FETCH 1 0

3 BUT000 REOPEN 0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'

420 BUT000 FETCH 1 0

3 BUT000 REOPEN 0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'

365 BUT000 FETCH 1 0

3 BUT000 REOPEN 0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'

If i double click the SQL statement, i see these details

SQL Statement

SELECT

"CLIENT"

FROM

"BUT000"

WHERE

"CLIENT" = :A0 AND "PARTNER" = :A1

Variable

A0(CH,3) = 120

A1(CH,10) = 0007024125

I caught it in SM50 where the read was, and it says the select exists in Function Pool SAPLBPT1. I have done a search in this for anything containing BUT000, but have found nothing. Any suggestions on how to find where this is occurring, or what might be going on?

Read only

0 Likes
745

BUT000 is a CRM table.. some where in ur code... or some FM check if you are passing all the mandatory fields of that FM