Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM extraction -Filtering -Performance issue

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

0 Kudos

Hi,

Thank you for your Input.

but still did not solve my performance issue?

Any better way?

regards

Praveen