Laufzeitintensive Auswertungsreport in ABAPS beschleunigen

Hinweise, Tips und Tricks, FAQs - keine Anfragen!!

Laufzeitintensive Auswertungsreport in ABAPS beschleunigen

Postby Dieter1844 » Mon Dec 05, 2011 10:23 am

Hallo!

Hier ein Betrag - wen immer es interessieren mag:

SIMI*
in SAP ERP™ Systems

(*Speed Increase at Minimum Impact)


0. Executive summary

SIMI is a programming technique in SAP ABAP™ to accelerate common ABAP reports made to analyze transaction data. The acceleration factor in a real-life example was 1 / 5000 (from 12 minutes to 8 seconds)

1. Introduction

The basis for this paper is a real-life example of an ABAP Report running on an ERP 6.0 standard installation. There are two main loops in the report. One reads accounting documents the other one internal controlling documents (not derived from accounting documents.

The report had been used by other companies of that SAP installation for years. These users were able to narrow down by posting date which kept the runtime at a reasonable level. In 2011 a new company started using ECC 6.0 on this installation. They generate huge numbers of documents and they wanted to use a derivative of this report without restricting posting dates. The run times increased rapidly after a few months of productive operation.

This problem needed to be solved without:

- implementing customer specific tables
- implementing customer specific database indexes

as both features are not part of the underlying SAP strategy which does not allow any modifications of SAP standards.

2. The approach SIMI

The report is divided into a data collecting part and a data output part. Within the data collecting part an internal table is filled which is the basis for the data output.

Simplified structure of the internal table:

data: begin of buch occurs 0,
budat like bkpf-budat,
saknr like bkpf-saknr,
field_a like tab-field_a,
field_b like tab-field_b,
dmbtr like bseg-dmbtr,
end of buch.

Simplified structure of the original report:

Data collection part:

select from bkpf where ...
...
append buch
endselect.

select from coep where....

append buch.

endselect.

Data output part:

loop at buch.

write:..

endloop.

The selects from bkpf/bseg and cobk/coep cause the runtime-problem. In the case of the one company using the SIMI report the selects could not be restricted by posting date which caused a huge runtime-problem in a few months.

Here are the key features of the approach SIMI:

2.1 SIMI Data collection report

Every night the SIMI data collection report is scheduled as an automatic job with no further selection criteria. The data output part is skipped, instead the internal table is moved line-by-line into an internal table which consists of text lines. At the end of the process the internal table is saved into a regular SAP standard text.

Data structure of the internal text table:

DATA BEGIN OF TEXT OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA END OF TEXT.

Transfer the internal table to the text table:

BUCH(1)-->TEXT(1)
BUCH(2)-->TEXT(2)

BUCH(n)-->TEXT(n)

Save the internal table TEXT to a SAP standard text with the function module “SAVE_TEXT”.

The SAP standard texts have a size-limit. So in real life several standard texts need to be generated to store the internal table Text.

The output section is omitted in the SIMI data collection report.

Simplified structure of the SIMI data collection report:

select from bkpf where ...
...
append buch
endselect.

select from coep where....

append buch.

endselect.

move BUCH to TEXT.
SAVE_TEXT (to SAP standard text)

2.2 SIMI Output report

The output report starts with reading the standard texts into the text table. The text lines are converted back to the internal table BUCH

TEXT(1)-->BUCH(1)
TEXT(2)-->BUCH(2)

TEXT(n)-->BUCH(n)

All criteria of the selection screen are applied before the APPEND BUCH statement in order to keep the internal table BUCH as small as possible.

Then the output procedure is performed based on the internal table BUCH.

Simplified structure of the SIMI output report:

READ_TEXT from standard text into TEXT.


loop at text
move text to buch.
check ...
append buch.
endloop

loop at buch.

write:

endloop.

2.3 Delta run

In the SIMI report which is in live operation we added the optional function of a delta run. This function reads the bkpf and cobk documents since the last SIMI data collection based on the timestamps and adds them to the internal table BUCH. This makes the report up-to-date with little extra run-time. (30 secs )

3. Performance and system load

As described before the speed increase factor is approx. 5000. The report was at 12 minutes before and is now at 8 seconds. Obviously the upload of standard texts is optimized to a high extent in the SAP system. The nightly data collection run needs appr. 20 minutes. The standard texts created need extra disk space which is a minor cost factor in our case.
Dieter1844
.
.
 
Posts: 1
Joined: Mon Dec 05, 2011 10:23 am

Re: Laufzeitintensive Auswertungsreport in ABAPS beschleunig

Postby Fiona462 » Mon Dec 05, 2011 10:36 am

Mir ist nich ganz klar, ob das Posting nun unter schlechte Werbung, SPAM oder "kidding" (" Verarsche" wird wohl nicht gerne gelesen) einordnen soll.

Es gehört bestimmt nicht unter: "Praxistips, Tricks und Tutorials für Entwickler"
Fiona462
...
...
 
Posts: 149
Joined: Tue Dec 07, 2010 11:28 pm

Re: Laufzeitintensive Auswertungsreport in ABAPS beschleunig

Postby Gianluca500 » Tue Dec 06, 2011 7:44 am

*facepalm*

Wenn der Artikel nicht so möchtegern-professionell geschrieben wäre, könnte man noch annehmen, dass der Autor einfach nur neu im Thema ist und es nicht besser weiß.

Aber danke für die Erheiterung :)
Gianluca500
..
..
 
Posts: 49
Joined: Tue May 18, 2010 11:15 am


Return to Tips + Tricks & FAQs

Who is online

Users browsing this forum: No registered users and 5 guests

cron