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

Function BERECHNEN_BESTAND performance

Hello Gurus.

I'm writing a report that creates an extract file from Function BERECHNEN_BESTAND (used in Transaction MC49 etc).

The requirement is to run it for all materials in several plants. This will have a long background run time of +2 hours.

Presently the program builds up a large 10,000 row table of Plant/Materials and loops at BERECHNEN_BESTAND 10,000 times.

I thought I could improve performance by Calling BERECHNEN_BESTAND once with 10,000 Plant/materials (or calling it 10 times with 1000 plant/materials, etc).

This did not work as I expected, and actually made performance much worse! I guess it's a memory issue.

Thanks for any comments/suggestions.

Zenon K.

p.s. (I found note 457615 that adds an index to MSEG. This did improve performance when running BERECHNEN_BESTAND 10,000 times)

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2011 at 06:00 PM

    More to the point; What is faster?

    1) To Call a Function 1 time with a very large table as an input parameter,

    OR

    2) Call the Function in a loop thousands of times with 1 line.

    ??

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Zenon,

      Running a ST05 trace could give you additional information on needed index. Also since this is a read intensive process placing the table into a tablespace located on a Enterprise Flash Drive (Memory drive) would certainly help. EMC Fully Automated storage tiering puts highly active blocks on the top tier automatically but unless all this data is accessed often you would need to place it there yourself or with a DBA. Unless you really need faster performance that may be overkill but if there were several applications that together could be justified then it may make sense. Good Luck

      Allan Stone

      SAP Solutions Architect

      EMC Solutions Design Center

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2011 at 04:24 PM

    Thanks for the replies.

    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.