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

Report is taking too long time. Please advice

Hi Experts,

I have created a report which is almost exploding the BOM and getting the all

material documents from MKPF for the given date and then based on those material documents selecting the 601 (Sales) from MSEG. Later based on the material, batch and 901 its drilling down. If it gets the raw materials in that, add those otherwise again if you find some FG or Semi finish in that further explode it.

like that this will go to the deeper level.

I have run this report for almost all the plants and they are updated successfully

but some plants are there which might have the large data due to drill down batch level. So atlast giving the dump.

Please suggest me how get it tuned so that my all plants give the data is speedy way. Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 12:54 PM

    Hi,

    First Observation...make the program run for single plant for the run..should reduce excecution time..let me know if thats not helpful

    santhosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 02:39 PM

    Can't really help you optimaize your code without seeing it. Would you post it please?

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Maddu - your problems (and there are more than one of them) are in form select_material_docs. There you perform a number of nested loops and SELECTS within those loops.

      Have a look at:

      <a href="/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops">The Performance of Nested Loops</a>

      Rob

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 02:53 PM

    Hi,

    Try passing some blank ranges for MJAHR & ZEILE in the where clause of the query, it will definitly be fast.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 06:48 PM

    Please post your code.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi Maddu,

      this is developed by you or old one came for changes.

      if it is you try using work areas from next time.

      coming to the problem,

      1.you are not passing full key for getting data from mkpf.

      try passing atlest MJAHR.

      2. you are looping twice it_mseg and it_mara.

      instead read it_mseg in loop of it_mara once and fill it_mseg1 and do the work

      for id.

      3. you are filling data for bwart with if condition.

      try to change it to read with work areas. i think it will reduce abap time.

      try create index with budat.

      regards,

      krishna.

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.