09-13-2006 11:22 AM
Hi Guys,
<u>Question 1:</u>
Would like to check with you instead of using Tcode STAT(online) to pull the most recent executed program, is there a FM/any tools available?
My intention is, to execute my customize program in background mode to extract the list. Because im having 1000++ programs that i need to access where manual way by using TCode STAT is very+++ difficult to achieve.
<u>Question 2:</u>
May i know what is the retention period for the log that keep in the system? Is there a way to check?
Please comment for the above.
Thanks in advance.
09-13-2006 11:31 AM
Check the below FM:
SAPWL_READ_STATISTIC_FILES
SAPWL_READ_STAT_A_ASTAT_FILES
SAPWL_STATREC_DIRECT_READ
Regards,
Prakash.
09-13-2006 11:33 AM
You can use the Function module SAPWL_WORKLOAD_GET_STATISTIC for getting the statistics of the executed programs.The data to be passed to the Function module can be retrieved using the Function module SAPWL_WORKLOAD_GET_DIRECTORY.
Loop through the dir(internal table) returned by FM SAPWL_WORKLOAD_GET_DIRECTORY and call the function module SAPWL_WORKLOAD_GET_STATISTIC .
Hope this helps.
09-14-2006 7:41 AM
Thanks Imtiaz Ahmed, Prakash. Im in the midst of testing on the FMs that mentioned by you guys.
In the mean time, im checking the table(s) to stored all the customize objects where included program, sapscript, smartforms.
I know table TRDIR used to stored objects for Program, but how about sapscript and smartforms?
Instead of looking for tables, do you know which FM(s) that i can use to achieve the search for customize objects for Program, Sapscript and Smartforms?
Pls comment.
09-14-2006 11:20 AM
Hi Imtiaz Ahmed, Prakash.
After went through the FMs given by you, noticed the execution of the FM is base on Start date/time, End date/time and etc to produce the statistic.
But for my requirement, the key input is <u>Program name</u>. FYI, <u>i will extract a list of customize program name and check for their most recent execution date</u>. As compare to those FMs, Program name is not part of the IMPORT parameter.
Please comment.
Thanks in advance.
09-14-2006 11:37 AM
The Function module SAPWL_WORKLOAD_GET_STATISTIC returns table MEMORY_STATISTIC which will have the information regarding the reports run in the particular time period. The field <b>memory_statistic-entry_id</b> has the report name. you can loop through the Memory_statistic internal table return and compare check the report name which we require and if it is successful append the data to one more internal table.
Hope this helps.
09-15-2006 2:31 AM
Hi Ahmed,
Thanks for your prompt reply. But there are few similar FMs like the one mentioned by Prakash: SAPWL_READ_STATISTIC_FILES
SAPWL_READ_STAT_A_ASTAT_FILES
SAPWL_STATREC_DIRECT_READ
and yours SAPWL_WORKLOAD_GET_STATISTIC. Im a bit confuse here after executed each of them. And found there are similar. Could you pls advice which FM is best suite me?
Furthermore, i notice the FM SAPWL_WORKLOAD_GET_DIRECTORY only returned statistic for <u>ONE month</u> only, for eg: 15.08.2006 - 14.09.2006. But for my case, i need to access the statistic for the pass 3 months...
Pls comment.
Thanks in advance.
09-15-2006 2:36 AM
Guys, futhermore do you know which TCode to used for the setting of statistic log's retention period?
09-15-2006 7:22 AM
Hi Ahmed,
Below is the list that returned by FM SAPWL_WORKLOAD_GET_DIRECTORY from my system:
STARTDATE P HOSTID FIRSTRECDY LASTRECDY
15.08.2006 D TOTAL 15.08.2006 15.08.2006
16.08.2006 D TOTAL 16.08.2006 16.08.2006
17.08.2006 D TOTAL 17.08.2006 17.08.2006
18.08.2006 D TOTAL 18.08.2006 18.08.2006
19.08.2006 D TOTAL 19.08.2006 19.08.2006
20.08.2006 D TOTAL 20.08.2006 20.08.2006
21.08.2006 D TOTAL 21.08.2006 21.08.2006
22.08.2006 D TOTAL 22.08.2006 22.08.2006
23.08.2006 D TOTAL 23.08.2006 23.08.2006
24.08.2006 D TOTAL 24.08.2006 24.08.2006
25.08.2006 D TOTAL 25.08.2006 25.08.2006
26.08.2006 D TOTAL 26.08.2006 26.08.2006
27.08.2006 D TOTAL 27.08.2006 27.08.2006
28.08.2006 D TOTAL 28.08.2006 28.08.2006
29.08.2006 D TOTAL 29.08.2006 29.08.2006
30.08.2006 D TOTAL 30.08.2006 30.08.2006
31.08.2006 D TOTAL 31.08.2006 31.08.2006
01.09.2006 D TOTAL 01.09.2006 01.09.2006
02.09.2006 D TOTAL 02.09.2006 02.09.2006
03.09.2006 D TOTAL 03.09.2006 03.09.2006
04.09.2006 D TOTAL 04.09.2006 04.09.2006
05.09.2006 D TOTAL 05.09.2006 05.09.2006
06.09.2006 D TOTAL 06.09.2006 06.09.2006
07.09.2006 D TOTAL 07.09.2006 07.09.2006
08.09.2006 D TOTAL 08.09.2006 08.09.2006
09.09.2006 D TOTAL 09.09.2006 09.09.2006
10.09.2006 D TOTAL 10.09.2006 10.09.2006
11.09.2006 D TOTAL 11.09.2006 11.09.2006
12.09.2006 D TOTAL 12.09.2006 12.09.2006
13.09.2006 D TOTAL 13.09.2006 13.09.2006
14.09.2006 D TOTAL 14.09.2006 14.09.2006
<i><u>01.07.2006 M</u></i> TOTAL 01.07.2006 31.07.2006
<i><u>01.08.2006 M</u></i> TOTAL 01.08.2006 31.08.2006
<i><u>01.09.2006 M</u></i> TOTAL 01.09.2006 14.09.2006
31.07.2006 W TOTAL 31.07.2006 06.08.2006
07.08.2006 W TOTAL 07.08.2006 13.08.2006
14.08.2006 W TOTAL 14.08.2006 20.08.2006
21.08.2006 W TOTAL 21.08.2006 27.08.2006
28.08.2006 W TOTAL 28.08.2006 03.09.2006
04.09.2006 W TOTAL 04.09.2006 10.09.2006
11.09.2006 W TOTAL 11.09.2006 14.09.2006
15.08.2006 D saprz1#1 15.08.2006 15.08.2006
16.08.2006 D saprz1#1 16.08.2006 16.08.2006
17.08.2006 D saprz1#1 17.08.2006 17.08.2006
18.08.2006 D saprz1#1 18.08.2006 18.08.2006
19.08.2006 D saprz1#1 19.08.2006 19.08.2006
20.08.2006 D saprz1#1 20.08.2006 20.08.2006
21.08.2006 D saprz1#1 21.08.2006 21.08.2006
22.08.2006 D saprz1#1 22.08.2006 22.08.2006
23.08.2006 D saprz1#1 23.08.2006 23.08.2006
24.08.2006 D saprz1#1 24.08.2006 24.08.2006
25.08.2006 D saprz1#1 25.08.2006 25.08.2006
26.08.2006 D saprz1#1 26.08.2006 26.08.2006
27.08.2006 D saprz1#1 27.08.2006 27.08.2006
28.08.2006 D saprz1#1 28.08.2006 28.08.2006
29.08.2006 D saprz1#1 29.08.2006 29.08.2006
30.08.2006 D saprz1#1 30.08.2006 30.08.2006
31.08.2006 D saprz1#1 31.08.2006 31.08.2006
01/09/2006 D saprz1#1 01.09.2006 01.09.2006
02/09/2006 D saprz1#1 02.09.2006 02.09.2006
03/09/2006 D saprz1#1 03.09.2006 03.09.2006
04/09/2006 D saprz1#1 04.09.2006 04.09.2006
Got to know that Period type D=Daily, W=Weekly, M=Monthly, and Y=Yearly.
<u>Question 1:</u>
Im forcusing on the Period with M, thats 01.07.2006, 01.08.2006 and 01.09.2006. Since my request is to access records from the recent pass 3 months, can i just take these 3 records for the process of FM SAPWL_WORKLOAD_GET_STATISTIC? Im not sure abt this. pls comment.
<u>Question 2:</u>
May i know what is the meaning of HOSTID "TOTAL" and "saprz1#1". What are the diferrences between these 2?
<u>Question 3:</u>
If base on the Daily(D) rec above, i just have from date 15.08.2006 until 14.09.2006. But why the Month(M) rec return by FM included month July plus 1st half month of Aug? Am i save to just process the Month(M) record (pointed at question 1) ???
Your comment is highly appreciated.
Thanks in advance.
09-15-2006 8:15 AM
Hi FSCHU,
answer to question 1 - use the function module SAPWL_READ_STATISTIC_FILES
SAPWL_ASTAT_DIRECT_READ
or use tcode ST03 or ST03N.
answer to question 2 - yes you can chek the retention period and also allowed to change by default SAP maintain for 2 days 2 weeks 2 months
runn tcode ST03n -> select expert mode from leftmost top coner ->collector and performance DB -> performance database -> Reorganization
here you will get default retention setting i.e. 2-2-2
change according to your requirement and save the changes
hope this helps you.
~john
09-15-2006 9:10 AM
Hi John,
1.
Thanks for your suggestion. Im having problem for using FM SAPWL_READ_STATISTIC_FILES. My intention is to read the log from the pass 3 months. But eventhough i key in the READ_START_DATE = 01.08.2006 , the FM will return nothing to me. As i noticed, statistic will only return for today's date. Pls comment if i key in the input wrongly.
SAPWL_ASTAT_DIRECT_READ -> does not exist. Do you mean FM SAPWL_READ_STAT_A_ASTAT_FILES? If yes, then the problem for this FM is: always return yesterday's (14.09.2006) statistic eventhough i key in the READ_START_DATE = 01.08.2006, READ_END_DATE = 15.09.2006
Pls comment for the above, im just worried i key in the wrong input.
2.
Im using 4.6C, in ST03N i can get until -> select expert mode from leftmost top coner ->collector and performance DB -> performance database, in my system do not have option for <u>Reorganization</u>
Pls comment for all the above.
Thanks in advance.
09-17-2006 4:23 AM
Hi Guys,
I have a question for FM SAPWL_WORKLOAD_GET_STATISTIC. It table parameter MEMORY_STATISTIC, may i know what are the values defined for the <u>TASKTYPE</u>? From the desc of the data element, it stated the value is stand for DIA, BTC, UPD. But i can not determined the mapping value. Because the actual value returned is "01", "02"...etc...
Thanks in advance.
09-18-2006 4:37 AM
Hi Guys,
Just want to check with you further, whether i can access the statistic for the execution of Smartforms and SAPScripts?
Pls comment.
Thanks in advance.
09-18-2006 6:08 AM
Hi Fschu,
if you want to read last 3 months log than try with this FM "SAPWL_WORKLOAD_GET_STATISTIC"
and your input should be
if you want to read for Day/Week/Month than your
1. periodtype will be D/W/M int your case now it will be M for months
2.Hostid = TOTAL
3. Startdate = 08/01/2006
the return table - HITLIST_DBCALSS will give all statistics.
hope this help you.
~John
09-18-2006 8:03 AM
Hi John,
Thanks for your reply. But may i know what are the differences for the return table HITLIST_DBCALLS and MEMORY_STATISTIC. Base on desc HITLIST_DBCALLS is reporting the hit list for DB while MEMORY_STATISTIC is reporting by the memory hits.
By applying to my case, where i just need to get the full list of executed program within the accessing period. <b>Which returned table do you think is best suite me?</b> As i checked MEMORY_STATISTIC is returning more entries than HITLIST_DBCALLS
Thanks in advance.