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

select stmt going to dump

ricky_shaw
Contributor
0 Likes
962

Hello Experts,

This is a simple select query in STD SAP Function Module  /1PWB/20020120307183419.

This  should actually fail as there are no matching entries between the tables DFKKKO & DFKKOP.

But, code stops here, does not go thru and is taking 2 hrs and finally dumps.

* Select any collective document cleared after the previous invoice and before or during the current collective invoice.


  select  *  appending corresponding fields of table lt_abwbl_docs
    from  dfkkko as h  inner join  dfkkop as l
      on   h~opbel = l~augbl
where  augst = 9
     and  abwtp = ' '
     and  ( vkont = x_cdoc_head-vkont or abwkt = x_cdoc_head-vkont )
     and  ( cpudt > wa_cprev_doch-cpudt  or
( cpudt = wa_cprev_doch-cpudt and cputm > wa_cprev_doch-cputm ) )
     and  ( cpudt < gt_ccurr_doch-cpudt  or
( cpudt = gt_ccurr_doch-cpudt and cputm <= gt_ccurr_doch-cputm ) ).

Please suggest.

7 REPLIES 7
Read only

Former Member
0 Likes
917

Hi Ricky,

I suggest you to open an OSS Note.

Regards,

Christian

Read only

ThomasZloch
Active Contributor
0 Likes
917

Please provide details about the dump, especially title and error analysis.


Thomas

Read only

0 Likes
917

Hello Thomas,

Its a time out dump.

Title:

The program "/1PWB/SAPL23120121219072017" has exceeded the maximum permitted

runtime without nterruption and has therefore been terminated.

Error Analysis:

After a specific time, the program is terminated to make the work area
available to other users who may be waiting.
This is to prevent a work area being blocked unnecessarily long by, for
example:
- Endless loops (DO, WHILE, ...),
- Database accesses with a large result set
- Database accesses without a suitable index (full table scan)

The maximum runtime of a program is limited by the system profile
parameter "rdisp/max_wprun_time". The current setting is 1200 seconds. If this
time limit is
exceeded, the system attempts to cancel any running SQL statement or
signals the ABAP processor to stop the running program. Then the system
waits another 60 seconds maximum. If the program is then still active,
the work process is restarted.

Read only

0 Likes
917

HI Ricky,

may be due to large size of internal table it go for a dump,

rather than using select * condition, define structure with required fields and select the records from  table

Regards,

Sinagam.

Read only

Former Member
0 Likes
917

Ricky,

There are several option eo avoid this timeout dump from select queries.

1. Check how much data is there into those 2 tables and actually how much it is going to select .

2. Use index and data base hint to make it faster.

3. You can use open cursor and try to fetch a chunk of data at one go and multiple times

4. check the select stmt and where condition is anything possible to add over there or not.

5. some time it works like remove the greater than less than option from select stmt, and after select 'delete itab where field1 GT ......'  - try this. sometime it works. But it will select more than so may be it will not work in your case.

6. remove appending corresponding fields of, take a fresh new itab after sleection you can append those data into this itab.

try it. it may work.

Thanks,

Jo

Read only

Former Member
0 Likes
917

Hi Ricky,

I tried to open the FM name provided by you, but could not find it in system.

As, you have stated that its a Standard FM, so kindly try to search for some Note.

Some basis activities can also help you, pls take take from your Basis people, activities like Table Statistics Update , or chack whether the table actually exists in Database, may help you.

If possible, pls provide the FM name.

Thanks.

Read only

yuri_ziryukin
Product and Topic Expert
Product and Topic Expert
0 Likes
917

Hello Ricky,

the coding seems to be generated.

There is no index for the table DFKKKO that could help database to select required data. No surprise that it dumps due to timeout.

I suggest trying to create an index for the table DFKKKO with fields:

MANDT, AUGST, ABWTP, CPUDT, VKONT, ABWKT

Fields VKONT and ABWKT are unfortunately specified with OR condition. I have included them into index to avoid table access for checking them and you don't get the ultimate improvement, but hopefully your program does not dump anymore.

Regards,

  Yuri