2013 Oct 11 11:27 AM
Hi All,
I am getting run time error one select query of a standard program - LSCD2F01.
The issue is -
" The program "SAPLSCD1" has exceeded the maximum permitted runtime without
interruption 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 900 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."
Please help.
Thanks
Mansi
2013 Oct 14 8:01 AM
Hello,
Please review note 573864.
You can try to create an index with the fields MANDANT, OBJECTCLAS and UDATE.
It will be helpful to reduce the size of CDHDR by archiving change documents that are not used any more.
Thanks.
Jim
2013 Oct 11 11:44 AM
Hello Mansi Asnani.
Run time error seems to be because of TIME-OUT.
Which tcode returns this error?
If possible, try to give some more data inputs for that tcode.
Regards.
2013 Oct 11 12:04 PM
Hello,
I am running a Z tcode which in turn calls the select query of program - LSCD2F01 -
SELECT * FROM cdhdr APPENDING TABLE pt_cdhdr
WHERE objectclas IN pt_sl_objectclas
AND objectid IN pt_sl_objectid
AND changenr IN pt_sl_changenr
AND username IN pt_sl_username
AND (
(
udate = date_of_change
AND
utime >= time_of_change
)
OR
udate > date_of_change
)
AND (
(
udate = date_until
AND
utime <= time_until
)
OR
udate < date_until
).
This select query is giving the run time error in production system but not in any other system,
Please let me know what more information is required.
Thanks for the help.
Mansi
2013 Oct 11 12:12 PM
2013 Oct 11 12:20 PM
Single purchase order on the selection screen of the z report.
2013 Oct 11 11:51 AM
Hi,
Check notes :
459838 : Performance improvement with very large dataset
AND
671283 : Performance problem
You can run your report in Background if its take very much time.
Regards
Ajit Tiwari
2013 Oct 11 12:19 PM
Hi Ajit,
It is a Z report which insides calls the standard program LSCD2F01 query -
SELECT * FROM cdhdr APPENDING TABLE pt_cdhdr
WHERE objectclas IN pt_sl_objectclas
AND objectid IN pt_sl_objectid
AND changenr IN pt_sl_changenr
AND username IN pt_sl_username
AND (
(
udate = date_of_change
AND
utime >= time_of_change
)
OR
udate > date_of_change
)
AND (
(
udate = date_until
AND
utime <= time_until
)
OR
udate < date_until
).
which is giving the run time error.
The Z report is required to be executed in Foreground and the error is only coming in production sys and not in any other system.
I checked the given notes but none of it is related to the run time error caused for standard program LSCD2F01.
Thanks
Mansi
2013 Oct 11 12:31 PM
Hi Mansi,
The table CDHDR is a very large table and it will have huge data in PRD system, hence giving time out dump in PRD. Please get in touch with your QA review team and get a permanent solution on the design since this issue will come over and again with time by any temporary fix.
Regards,
DN.
2013 Oct 11 12:53 PM
Hello Deepak,
Thanks for providing the input, Please let me know do i have any note to correct this dump and how can i achieve in getting permanent fix for this issue coming from the standard program select query code.
Thanks
Mansi
2013 Oct 14 8:21 AM
Dear Mansi,
Just implement Note Note 733150 - DB2-z/OS: Optimizer problems with predicate localization .
And also check other notes which i have provided above.
Regards
Ajit
2013 Oct 11 3:25 PM
Do you have all the key fields provided in the select query, especially object type and object id and changenumber ?
In the standard program these fields are provided, but if in your z-program these are empty then it will take very long.
Also I checked the select statement in my sap version and it has a special variant for DB2 database. Do you have a DB2 database ? try the first select in stead maybe it helps.
* select header from cdhdr
* We ask for the database
IF sy-dbsys = 'DB2'.
* special select concerning the note 733150
SELECT * FROM cdhdr APPENDING TABLE pt_cdhdr
WHERE objectclas IN pt_sl_objectclas
AND objectid IN pt_sl_objectid
AND changenr IN pt_sl_changenr
AND username IN pt_sl_username
AND udate >= date_of_change
AND udate <= date_until.
* delete not wanted time period
* delete the lower time period up to pv_time_of_change
DELETE pt_cdhdr WHERE udate = date_of_change
AND utime < time_of_change.
* delete the upper time period from pv_time_until
DELETE pt_cdhdr WHERE udate = date_until
AND utime > time_until.
ELSE.
* normal select
SELECT * FROM cdhdr APPENDING TABLE pt_cdhdr
WHERE objectclas IN pt_sl_objectclas
AND objectid IN pt_sl_objectid
AND changenr IN pt_sl_changenr
AND username IN pt_sl_username
AND (
(
udate = date_of_change
AND
utime >= time_of_change
)
OR
udate > date_of_change
)
AND (
(
udate = date_until
AND
utime <= time_until
)
OR
udate < date_until
).
ENDIF.
2013 Oct 14 7:48 AM
Hello Peter,
This is a standard program select query through which i am getting the run time error,
I cannot edit the standard program LSCD2F01 code. Can you please suggest me some helpful
SAP Note which can resolve the issue.
Thanks
Mansi
2013 Oct 14 8:01 AM
Hello,
Please review note 573864.
You can try to create an index with the fields MANDANT, OBJECTCLAS and UDATE.
It will be helpful to reduce the size of CDHDR by archiving change documents that are not used any more.
Thanks.
Jim
2013 Oct 14 8:09 AM
Hi Mansi,
do you use an IBM DB2 Universal DATABASE (UDB) ?
Then SAP performance note 1731215 may be an option.
Regards,
Klaus