Posted: Sun Nov 25, 2007 12:53 pm Post subject: User load and dialog step number for a selected day
Create a graphical chart of user load and dialog step number for a selected day
Code:
*
* This program creates a graphical user load and dialog step chart
* for a specific day.
*
*
REPORT ZUSRLOAD NO STANDARD PAGE HEADING.
PARAMETERS: DATE LIKE AMDS-ANDAT DEFAULT SY-DATUM.
DATA: M(3), CLIN(7) TYPE N, CCLIN(7), DATEC(25), MAX TYPE I,
MONTH(36) VALUE 'JanFebMarAprMayJunJulAugSepOctNovDec',
MONTHNUM(2) TYPE N, DAYNUM(2) TYPE N, ITIM(4), LIN TYPE I,
IDAT(8), A(50), FILE(30) VALUE '/usr/sap/trans/usr_login_log',
LINC(7), X1 TYPE F VALUE 6, X2 TYPE F VALUE 20, Y1 TYPE F VALUE 0,
Y2 TYPE F VALUE 320.
DATA: BEGIN OF ITAB OCCURS 500,
TIME(4), DB TYPE I, AP1 TYPE I, AP2 TYPE I, AP3 TYPE I, SUM TYPE I,
DS1 TYPE I, DS2 TYPE I,
END OF ITAB.
DATA: BEGIN OF OPTS OCCURS 1,
C(80),
END OF OPTS.
DATA: BEGIN OF DATA OCCURS 1,
W TYPE F,
F TYPE F,
END OF DATA.
DATA: BEGIN OF TASKTYPE_RES OCCURS 30,
TIME TYPE F, SUM1 TYPE F, SUM2 TYPE F,
END OF TASKTYPE_RES.
DATA: BEGIN OF TASKTYPE_STATISTIC OCCURS 50.
INCLUDE STRUCTURE SAPWLTSKTI.
DATA: END OF TASKTYPE_STATISTIC.
DATA: PERIODTYPE LIKE SAPWLACCTP-PERIODTYPE VALUE 'D',
HOSTID LIKE SAPWLACCTP-HOSTID.
DATA: BEGIN OF TASKTYPE_SUM OCCURS 50,
TIME LIKE SAPWLTSKTI-TIME,
COUNT LIKE SAPWLTSKTI-COUNT,
CSUM LIKE SAPWLTSKTI-COUNT,
CNT001 LIKE SAPWLRTDIS-CNT001,
CNT002 LIKE SAPWLRTDIS-CNT001,
CNT003 LIKE SAPWLRTDIS-CNT001,
CNT004 LIKE SAPWLRTDIS-CNT001,
CNT005 LIKE SAPWLRTDIS-CNT001,
CNT006 LIKE SAPWLRTDIS-CNT001,
CNT007 LIKE SAPWLRTDIS-CNT001,
CNT008 LIKE SAPWLRTDIS-CNT001,
CNT009 LIKE SAPWLRTDIS-CNT001,
END OF TASKTYPE_SUM.
HOSTID = 'aaaaaaaa'. PERFORM CALCULATE.
HOSTID = 'ssssssss'. PERFORM CALCULATE.
HOSTID = 'dddddddd'. PERFORM CALCULATE.
HOSTID = 'ffffffff'. PERFORM CALCULATE.
LOOP AT TASKTYPE_SUM.
IF TASKTYPE_SUM-TIME CS '00--06' OR
TASKTYPE_SUM-TIME CS '21--24' OR
TASKTYPE_SUM-TIME CS '20--21'.
DELETE TASKTYPE_SUM.
ENDIF.
ENDLOOP.
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.