Friday, July 12, 2013

Runtime Errors : TIME_OUT ABAP program: "CL_SQL_STATEMENT==============CP" has exceeded the maximum permitted runtime)

Category               ABAP Programming Error
Runtime Errors         TIME_OUT
ABAP Program           CL_RSBK_DTP_D=================CP
Application Component  BW-WHM-DST
Date and Time          12.07.2013 14:43:40




Short text


    Time limit exceeded.





What happened?


    The program "CL_RSBK_DTP_D=================CP" has exceeded the maximum


     permitted uninterrrupted


    runtime and has therefore been terminated.








Error analysis


    The system profile contains the maximum runtime of a program.


    When this time limit has been exceeded, the program is terminated


    to make way for other users who may be waiting.





    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 maximum runtime of a program is limited by the system profile


    parameter "rdisp/max_wprun_time". The current setting is 600 seconds. After


     this limit has


    been exceeded an attempt is made to interrupt the SQL statement running


    or to tell the ABAP processor to interrupt the current program. A


    maximum of 60 seconds is then waited. If after this time the program is


    still active then the work process is restarted.





Trigger Location of Runtime Error


    Program
CL_RSBK_DTP_D=================CP


    Include
CL_RSBK_DTP_D=================CM00C


    Row
11


    Module type
(METHOD)


    Module Name
GET_DVERSKEY_FROM_DTP





Source Code Extract


Line
SourceCde


    1
method get_dverskey_from_dtp.


    2
  select single src srctp tgt tgttp updmode


    3
    from rsbkdtp


    4
    into (r_dverskey(45),


    5
          r_dverskey+45(6),


    6
          r_dverskey+51(45),


    7
          r_dverskey+96(6),


    8
          r_dverskey+102(2))


    9
    where dtp = i_dtp


   10
    and objvers = rs_c_objvers-delivery.


>>>>> 
  IF sy-subrc <> 0.


   12
    SELECT SINGLE src srctp tgt tgttp updmode


   13
      FROM rsbkdtp


   14
      INTO (r_dverskey(45),


   15
            r_dverskey+45(6),


   16
            r_dverskey+51(45),


   17
            r_dverskey+96(6),


   18
            r_dverskey+102(2))


   19
      WHERE dtp = i_dtp


   20
      AND objvers = rs_c_objvers-active.


   21
  ENDIF.


   22



   23
ENDMETHOD.





Active Calls/Events


No.   Ty.          Program                             Include                             Line


      Name


   35 METHOD       CL_RSBK_DTP_D=================CP    CL_RSBK_DTP_D=================CM00C    11


      CL_RSBK_DTP_D=>GET_DVERSKEY_FROM_DTP


   34 METHOD       CL_RSBK_DTP_D=================CP    CL_RSBK_DTP_D=================CM007     6


      CL_RSBK_DTP_D=>CREATE_FROM_DTP_D


   33 METHOD       CL_RSBK_DTP===================CP    CL_RSBK_DTP===================CM070    52


      CL_RSBK_DTP=>IF_RSO_TLOGO_SOURSYS_DEPENDENT~PSEUDO_DVERSION_WRITE


   32 FUNCTION     SAPLRSDS_DATASOURCE                 LRSDS_DATASOURCEU24                   117


      RSDS_DATASOURCE_PSEUDO_IMPACT


   31 FORM         SAPLRSAOS                           LRSAOSF07                            1388


      RSDS_DVERSION_IMPACT


   30 FUNCTION     SAPLRSAOS                           LRSAOSU28                             414


      RSAOS_INT_DATASOURCES_UPLOAD


   29 FUNCTION     SAPLRSAOS                           LRSAOSU12                              80


      RSAOS_INT_METADATA_UPLOAD


   28 FUNCTION     SAPLRSAOS                           LRSAOSU11                              29


      RSAOS_METADATA_UPLOAD


   27 METHOD       CL_RSAWBN_TOOLS_LOGSYS========CP    CL_RSAWBN_TOOLS_LOGSYS========CM001   384


      CL_RSAWBN_TOOLS_LOGSYS=>HANDLE_REQUEST_NO_NAV


   26 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM00K    37


      CL_RSAWBN_AWB=>NAVIGATE_GENERAL_REQ_NO_NAV


   25 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM001    68


      CL_RSAWBN_AWB=>NAVIGATE


   24 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM002    10


      CL_RSAWBN_AWB=>NAVIGATE_FROM_CONTROL


   23 METHOD       CL_RSAWBN_COMP_MEDIATOR=======CP    CL_RSAWBN_COMP_MEDIATOR=======CM004     3


      CL_RSAWBN_COMP_MEDIATOR=>IF_RSAWBN_COMP_MEDIATOR~NAVIGATE_FROM_CONTROL


   22 METHOD       CL_RSAWBN_OBJ_SERVICE=========CP    CL_RSAWBN_OBJ_SERVICE=========CM005    36


      CL_RSAWBN_OBJ_SERVICE=>ACCESS_FCODE


   21 METHOD       CL_RSAWBN_OBJ=================CP    CL_RSAWBN_OBJ=================CM001    32


      CL_RSAWBN_OBJ=>ACCESS_FCODE


   20 METHOD       CL_RSAWBN_OBJ_LSYS============CP    CL_RSAWBN_OBJ_LSYS============CM008    32


      CL_RSAWBN_OBJ_LSYS=>ACCESS_FCODE


   19 METHOD       CL_RSAWBN_TREE_MODEL==========CP    CL_RSAWBN_TREE_MODEL==========CM00W    25


      CL_RSAWBN_TREE_MODEL=>ACCESS_FCODE


   18 METHOD       CL_RSAWBN_TREE_MODEL_FOLDER===CP    CL_RSAWBN_TREE_MODEL_FOLDER===CM00S    22


      CL_RSAWBN_TREE_MODEL_FOLDER=>ACCESS_FCODE


   17 METHOD       CL_RSAWBN_TREE_VIEW===========CP    CL_RSAWBN_TREE_VIEW===========CM00G    13


      CL_RSAWBN_TREE_VIEW=>HANDLE_CTXMENU_SEL_NODE


   16 METHOD       CL_RSAWBN_TREE_VIEW_LSYS======CP    CL_RSAWBN_TREE_VIEW_LSYS======CM001    21


      CL_RSAWBN_TREE_VIEW_LSYS=>HANDLE_CTXMENU_SEL_NODE


   15 METHOD       CL_RSAWBN_TREE_VIEW===========CP    CL_RSAWBN_TREE_VIEW===========CM00O     4


      CL_RSAWBN_TREE_VIEW=>HANDLE_CTXMENU_SEL_ITEM


   14 METHOD       CL_ITEM_TREE_MODEL============CP    CL_ITEM_TREE_MODEL============CM00T     8


      CL_ITEM_TREE_MODEL=>HANDLE_ITEM_CONTEXT_MENU_SEL


   13 METHOD       CL_ITEM_TREE_CONTROL==========CP    CL_ITEM_TREE_CONTROL==========CM00S    40


      CL_ITEM_TREE_CONTROL=>HANDLE_EVENT


   12 METHOD       CL_GUI_COLUMN_TREE============CP    CL_GUI_COLUMN_TREE============CM01P    15


      CL_GUI_COLUMN_TREE=>HANDLE_EVENT


   11 METHOD       CL_TREE_CONTROL_BASE==========CP    CL_TREE_CONTROL_BASE==========CM017    33


      CL_TREE_CONTROL_BASE=>DISPATCH


   10 METHOD       CL_GUI_CFW====================CP    CL_GUI_CFW====================CM001   138


      CL_GUI_CFW=>DISPATCH


    9 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM00C     8


      CL_RSAWBN_AWB=>IF_RSAWBN_NAVIGATOR~PAI_DISPATCH


    8 FORM         SAPLRSAWBN_MAIN                     LRSAWBN_MAINF01                       111


      PAI_1000


    7 MODULE (PAI) SAPLRSAWBN_MAIN                     LRSAWBN_MAINI01                        10


      PAI_1000


    6 FUNCTION     SAPLRSAWBN_MAIN                     LRSAWBN_MAINU01                        19


      RSAWBN_MAIN_DYNPRO


    5 METHOD       CL_RSAWBN_DWB_MODELLING_TOOL==CP    CL_RSAWBN_DWB_MODELLING_TOOL==CM002    11


      CL_RSAWBN_DWB_MODELLING_TOOL=>HANDLE_REQUEST


    4 METHOD       CL_RSAWBN_TOOLREQ=============CP    CL_RSAWBN_TOOLREQ=============CM005    15


      CL_RSAWBN_TOOLREQ=>EXECUTE


    3 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM003    25


      CL_RSAWBN_AWB=>CALL_TOOL


    2 METHOD       CL_RSAWBN_AWB=================CP    CL_RSAWBN_AWB=================CM006    64


      CL_RSAWBN_AWB=>START


    1 EVENT        RSAWBN_START                        RSAWBN_START                           23


      START-OF-SELECTION





Solution:
SNote: 25528

Symptom
The meaning of parameter rdisp/max_wprun_time is not clear.
Other terms
TIME_OUT, timeout, SY 098, Time limit exceeded, instance profile, SM50
Reason and Prerequisites
If a work process terminates with a timeout or if transactions and reports terminate with message SY 098: "Time limit exceeded", this may be due to the parameter mentioned above.
Furthermore, transaction SM50 may display reports that were started in dialog mode and may display runtimes (in the Time column) that are far longer as defined in rdisp/max_wprun_time.
Solution
The parameter rdisp/max_wprun_time was introduced to intercept endless loops and other UNINTENDED long-running transactions.
Technical information about the parameter rdisp/max_wprun_time:
The parameter rdisp/max_wprun_time sets a flag in shared memory, which is checked regularly by the ABAP/4 interpreter. When the time in seconds defined by the value of the rdisp/max_wprun_time parameter is exceeded, all dialog transactions are terminated when the next ABAP/4 command is submitted.
In this context, note the following recommendations:
  • Every program that calls up a "COMMIT WORK." at regular intervals resets its clock to 0 and can have longer run times than defined by the parameter rdisp/max_wprun_time.
  • You cannot check the runtime for a transaction that is waiting at a database lock or semaphore. You can use transaction SM50 to observe this behavior by choosing "CPU" to display the CPU time. The CPU time does not increase in this case because the work process is actively waiting.
  • As of Release 4.6, running database queries can be terminated. Therefore, a program is already terminated after rdisp/max_wprun_time seconds have run. Only if the termination of the database query fails, the clock is reset to 0 and the process can continue running for a short period of time. If this (short) period is exceeded again, the process is exited hard.
  • When you function module TH_REDISPATCH, the clock is reset, but a COMMIT is forced. The function module only resets the clock if the process is somewhere near the runtime limit.

Remark: You must not set this parameter to 0. If you do so, there will be no time limit. This will avoid the error message mentioned above, but endless loops will block the work processes forever. This can eventually lead to a system standstill. Usually, there is no need to change the standard setting 600 (10 minutes).
Also read the parameter documentation in transaction RZ11.





the rule of thumb that we use at clients is any job that runs longer than 10 min has to run in the background, or else if everyone does that it will fill up the DIA processes and then no one can logon or work until they free up or system restart.

for your reference:
http://scn.sap.com/thread/278023

NOTE: In my case, just work process time has been increased by BASIS team.

1 comment:

  1. Thanks for providing the solution of this runtime error. When I was working on SQL then I face this problem and unable to fix so I searched for its solution and get this web page which helps me to fix runtime error of SQL.

    ReplyDelete