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

performance issue

Hi Experts,

below statement taking lot of time to execute please help me in what way increase the performance.

there is no way to use key field.

SELECT budat "Posting date in document

bwart_i "Movement type "IR306758

matnr_i "Material

aufnr_i "Production Order

INTO TABLE T_MOV

FROM WB2_V_MKPF_MSEG2

WHERE WERKS_I = it_out-werks

AND MATNR_I = it_out-matnr

AND bwart_i = '261'.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 21, 2015 at 07:07 AM

    Hi Vinod,

    Since, WB2_V_MKPF_MSEG2 is a view of MKPF & MSEG and it seems you are not passing any key field from any off the table.

    I would suggest, try to put some more condition like DATE or YEAR. it will work after.

    As per your query, it's trying to fetch whole records from MSEG and MKPF table.

    Or try to pass some unique where condition.

    in IT_OUT may contains number of duplication combination try to make unique those.

    It's kind of trial process, you have to choose a best way to fetch data from table.

    Regards,

    Praveer.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 21, 2015 at 07:08 AM

    Hi Vinod,

    Please try data fatch from table AUFM on basis of your selection.

    I think , It is helpful .

    Regards,

    Nilesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 21, 2015 at 07:22 AM

    Hi

    create secondary Index on MSEG based on your where condition.

    or

    Pass key fields in where condition like mjahr.

    or

    use BUDAT_MKPF in MSEG is also BUDAT ,it is recently added by sap.But old records, it is not populated.

    Regards

    Chandu

    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.