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

Run time error in LSCD2F01

Former Member
0 Likes
1,780

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

1 ACCEPTED SOLUTION
Read only

JimRadiantExplorer
Product and Topic Expert
Product and Topic Expert
0 Likes
1,689

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

13 REPLIES 13
Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,689

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.

Read only

0 Likes
1,689

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

Read only

0 Likes
1,689

What inputs you are giving for that Z tcode?

Read only

0 Likes
1,689

Single purchase order on the selection screen of the z report.

Read only

Former Member
0 Likes
1,689

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

Read only

0 Likes
1,689

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

Read only

0 Likes
1,689

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.

Read only

0 Likes
1,689

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

Read only

0 Likes
1,689

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

Read only

PeterJonker
Active Contributor
0 Likes
1,689

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.

Read only

0 Likes
1,689

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

Read only

JimRadiantExplorer
Product and Topic Expert
Product and Topic Expert
0 Likes
1,690

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

Read only

Former Member
0 Likes
1,689

Hi Mansi,

do you use an IBM DB2 Universal DATABASE (UDB) ?

Then SAP performance note 1731215 may be an option.

Regards,

Klaus