‎2008 Jan 08 7:08 PM
Hi,
I have FM which givee me history of users who executed t-codes.I don't want to read all data and then filter.Instead I want to it be filtered (Only 3 usernames) in the FM extraction itself.
This because it will take a lot of time and performance is effecting.
Any ideas?
call function 'SAPWL_STATREC_DIRECT_READ'
exporting
read_start_date = fdat
read_start_time = ftim
read_end_date = tdat
read_end_time = ttim
read_client = cli
READ_USERNAME = S_UNAME-LOW
importing
normal_records = normal_records_tbl.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
out_data[] = normal_records_tbl[].
append out_data.
Rgds
Praveen
‎2008 Jan 08 7:22 PM
Hi Praveen,
Take the 3 user names which you want to display into an internal table with a field UNAME.Then write the code like this...
Loop at itab.
call function 'SAPWL_STATREC_DIRECT_READ'
exporting
read_start_date = fdat
read_start_time = ftim
read_end_date = tdat
read_end_time = ttim
read_client = cli
READ_USERNAME = ITAB-UNAME
importing
normal_records = normal_records_tbl.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
Regards,
Ramana
Edited by: venkata ramana on Jan 9, 2008 12:52 AM
‎2008 Jan 08 7:43 PM
Hi,
Thank you for your Input.
but still did not solve my performance issue?
Any better way?
regards
Praveen