2008 Aug 19 8:48 AM
Hi,
I got run time error when i executed the Zprogram .the dump is showing below.and here i am giveing the Select query of the dump and the data base table cosp have the 30000000 records in database
SELECT * FROM COSP INTO WA_COSP1
WHERE LEDNR = '00'
AND GJAHR = YEAR
AND WRTTP IN WERTYP
AND KSTAR IN KOSAR
AND VRGNG IN BETVOR.
After a certain length of time, the program is terminated. In the case
of a work area, this means that
- endless loops (DO, WHILE, ...),
- database accesses producing an excessively large result set,
- database accesses without a suitable index (full table scan)
do not block the processing for too long.
The system profile "rdisp/max_wprun_time" contains the maximum runtime of a
program. The
current setting is 600 seconds. Once this time limit has been exceeded,
the system tries to terminate any SQL statements that are currently
being executed and tells the ABAP processor to terminate the current
program. Then it waits for a maximum of 60 seconds. If the program is
still active, the work process is restarted.
successfully processed, the system gives it another 600 seconds.
Hence the maximum runtime of a program is at least twice the value of
the system profile parameter "rdisp/max_wprun_time".
Plese give me solution .
Thanks & Regards,
hari
Hi,
I got run time error when i executed the Zprogram .the dump is showing below.and here i am giveing the Select query of the dump and the data base table cosp have the 30000000 records in database
SELECT * FROM COSP INTO WA_COSP1
WHERE LEDNR = '00'
AND GJAHR = YEAR
AND WRTTP IN WERTYP
AND KSTAR IN KOSAR
AND VRGNG IN BETVOR.
After a certain length of time, the program is terminated. In the case
of a work area, this means that
- endless loops (DO, WHILE, ...),
- database accesses producing an excessively large result set,
- database accesses without a suitable index (full table scan)
do not block the processing for too long.
The system profile "rdisp/max_wprun_time" contains the maximum runtime of a
program. The
current setting is 600 seconds. Once this time limit has been exceeded,
the system tries to terminate any SQL statements that are currently
being executed and tells the ABAP processor to terminate the current
program. Then it waits for a maximum of 60 seconds. If the program is
still active, the work process is restarted.
successfully processed, the system gives it another 600 seconds.
Hence the maximum runtime of a program is at least twice the value of
the system profile parameter "rdisp/max_wprun_time".
Plese give me solution .
Thanks & Regards,
hari
2008 Aug 19 8:59 AM
Hi Hari,
Instead of using * try to select only required fields also try to use more where clause. You can check the report /1BCDWB/DBCOSP via SE38 to see how they are fetching data from COSP.
Thanks & Regards,
Nagaraj Kalbavi
2008 Aug 19 9:02 AM
Hi Hari,
U are using IN operator hence u cant use work area u have to use internal table.
select * from COSP into table lt_cosp.
2008 Aug 19 9:02 AM
Hi Hari,
Your "SELECT" query is wrong.
If you are selecting data into work area, you must use SELECT UP TO 1 ROWS.
2008 Aug 19 9:08 AM
check
1) if you can limit to specific fields and not all the fields in table COSP .
2) if first step not relevent make select with limit of records use in select UP TO N ROWS. make it a couple of time.
2008 Aug 19 9:21 AM
Hi,
Try this.
1. If u dont want all the fields in the table, select only the required fields instead of using select *.
2. Use internal table instead of work area as to handle large amount of data.
Sharin.
2008 Aug 19 10:23 AM
Hi
Here your database has many records, in order to improve the performance, if not all the fields will be used
you'd better to select the exact fields not ' * ' which means all the fields.
Second, your select statement has some problem. There two ways to write select statement. I advise you
to use the first statement.
1. SELECT <FIELD1 FIELD2 ... FIELDn>
FROM datebase_table
INTO TABLE iternal_table
WHERE <clause>.
2.SELECT <FIELD1 FIELD2 ... FIELDn>
FROM database_table
INTO workarea
WHERE <clause>
ENDSELECT.
2008 Aug 19 10:36 AM
Hi,
Plz try this way :
1. Try to have the fields in select query instead of select *.
2. You are selecting the records from table into a workarea without endselect, use this way...
select f1
f2
from cosp
into table wa_cosp1
WHERE LEDNR = '00'
AND GJAHR = YEAR
AND WRTTP IN WERTYP
AND KSTAR IN KOSAR
AND VRGNG IN BETVOR.
endselect..3. Or else it always a good practice performance wise to write select without end select and using a internal table for storing the result of select query.
SELECT f1
f2
FROM COSP INTO IT_COSP1 "internal table
WHERE LEDNR = '00'
AND GJAHR = YEAR
AND WRTTP IN WERTYP
AND KSTAR IN KOSAR
AND VRGNG IN BETVOR.
4. even we can have
SELECT upto 1 rows f1
f2
FROM COSP INTO WA_COSP1
WHERE LEDNR = '00'
AND GJAHR = YEAR
AND WRTTP IN WERTYP
AND KSTAR IN KOSAR
AND VRGNG IN BETVOR.
hope this helps.
thanx,
dhanashri.
Edited by: Dhanashri Pawar on Aug 19, 2008 11:37 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |