Skip to Content
author's profile photo Former Member
Former Member

FM extraction -Filtering -Performance issue

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.