Posted: Sat Nov 17, 2007 6:07 pm Post subject: Detects long-running ABAP programs - report
* This program interprets the sequential file created by ZHEAVYPR
* and displays the "heavy" ABAPs of a specified period of time.
* The result is a list of ABAPS categorized by app. server and
* work process type, and sorted by a number: how many times
* that particular ABAP was found running for too long time (>5min)
* during that period.
DATA: INPUT_FILE(40) VALUE '/oracle/SID/sapreorg/heavy_abaps'.
PARAMETERS: DATE LIKE AMDS-ANDAT DEFAULT SY-DATUM,
FROMTIME LIKE PLKZ-AEUZEIT DEFAULT SY-UZEIT,
TOTIME LIKE PLKZ-AEUZEIT DEFAULT SY-UZEIT.
DATA: BEGIN OF O,
1(10), 2(8), 3(8), 4(3), 5(8), 6(8),
END OF O.
DATA: BEGIN OF A OCCURS 100,
3(8), 4(3), 6(8), NUM TYPE I,
END OF A.
OPEN DATASET INPUT_FILE FOR INPUT IN TEXT MODE.
READ DATASET INPUT_FILE INTO O.
IF SY-SUBRC <> 0.EXIT.ENDIF.
IF O-1 = DATE AND O-2 >= FROMTIME AND O-2 <= TOTIME.
MOVE-CORRESPONDING O TO A. A-NUM = 1.
CLOSE DATASET INPUT_FILE.
WRITE: / DATE, FROMTIME, '---', TOTIME.
SORT A BY 3 4 NUM DESCENDING.
LOOP AT A.
AT NEW 3.
WRITE: / A-3 COLOR 2.
AT NEW 4.
WRITE: / ' ',A-4 COLOR 3.
WRITE: / ' ', A-6, A-NUM.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.