Data Structure in Profitability Analysis
(see Chapter 3 in note 21773 and the example found there)
Reading Using a Nested Select
(see also section 4.1 in note 21773)
Using the data basis (segment table CE4xxxx and segment level CE3xxxx) as an example:
When reading the data for a report, the system first accesses the segment table CE4xxxx using the characteristic values specified in the report definition. Then it accesses the segment level CE3xxxx using the profitability segment numbers (PAOBJNR) of the records found (“hits”) and, if available, the characteristic values for the period.41 The value fields selected using these criteria are collected together with the characteristic values from the segment table CE4xxxx to answer the search query. These “hits” are then passed on to the report to be displayed.
41 ...and a few additional technical fields: Record type, Plan/actual indicator and Plan version.
PAOBJNR Criteria
PAOBJNR Period... Value fields
Query
Hit set
"Join"
Criteria Value fields CE3 CE4
In standard installations, the read performance can yield a throughput of about 200,000 data records per hour. We will use this figure for all calculations in the following section. Actual performance can be improved considerably through fine-tuning.
For your own calculations, you need to determine the read performance of your system.
If no characteristic values (in particular, no time frame) are specified for a report, the system has to read all the records in the segment table CE4xxxx and all the records in the segment level CE3xxxx. Thus, if you know the size of your data basis, you can determine how long it will take to run a report that reads “all the data” using the following formula:
T read [in hours] ( PS + SL ) / 200,000
where the read time is determined by the number of profitability segments ( PS ) and the number of records in the segment level (SL).
Otherwise, you need to estimate how many records will be read from the segment table and the segment level based on the specific data content of your installation. You can then insert these
values in the above formula in place of PS andSL. Size of Report Data and “Frozen Data”
(see also section 10.4 in note 21773)
Internally, a report needs to hold all the data that you can access by displaying the report, including any data that you can drill down to. The system creates an internal table to store this report data in.
• All the characteristics chosen for the report serve as the “key”. The system summarizes the report data so that every row in the table has a different key. Combinations of
characteristic values for which no values have been posted are not saved. (Since the drill-down reporting tool only works with the values read from the data basis, it does not
even recognize these combinations.)
• The report data contains figures that are to be displayed for the characteristic values that serve as the key. These figures add 8 bytes each to the length of the row.
• For basic reports, these are the selected key figures (value fields or elements of the report line structure).
• For form reports, the system essentially stores the content of the cells to be displayed on the detail screens.
• The texts for the characteristics are not part of the report data, since these can always be read using the keys of the characteristics whenever they are needed for the displayed report.
• In addition, some management information of a constant size is stored for each row of the internal table. We will ignore this information here.
Example: A report should display the revenues (value field VVREV). The characteristics chosen are “Regional sales director” (WWV03, 5 values) and “Product range”
(WWP04, 3 values). No values are specified for these characteristics in the report definition. In this case, the report data will contain no more than 15 rows, because the key of the rows is made up of the combination of characteristics WWV03 and WWP04. The internal table for the report data will look like this:42
42 The combination WWV03=3000, WWP04=200 is missing in the report data because no data was posted for this combination in the example.
WWV03 WWP04 VVREV
To display this data in summarized form, the system selects and aggregates the values from the internal table as needed.
When you freeze the report data, the entire internal table is saved in table COIX_DATA in clustered form (in blocks).43 When you later display this frozen report data, the system exports this table again. Typical read times run about 200 kB of report data per second. Similar times can be observed for WRITE operations.
From Release 3.0D on, R/3 compresses the data to be written to the database for SAP cluster tables. Consequently, the amount of main memory actually required may be reduced. Factors of around 2 have been observed.
The storage form described above gives us a simple formula for estimating the amount of space needed for the report data.
For each row of the internal table, space is required for all the characteristics in the report and for all the value fields (or cells) that are to be displayed. We must calculate the actual length of the characteristics (according to the ABAP/4 Dictionary) and 8 bytes for the value fields.
Calculating the required number of table rows is usually more difficult. If the report selects all the data and does not summarize any, the number of rows must correspond to the number of profitability segments. However, if one of these criteria does not hold, we need to use more
complex assumptions for our estimate, since this requires more detailed knowledge about the content of the data.
If the data is summarized to a high degree, we can normally conclude that (almost) all the possible combinations of values of the selected characteristics actually exist, and estimate the
number of rows in the internal table by multiplying the number of values of these
characteristics. This gives us the following formula for calculating the size of the report data:
Assume that N is the number of rows in the most detailed level of the drill-down list, B is the number of cells in the form (detail list), and S is the size of the report data. Then if we take the size of the space required for the characteristics and the technical information for each report line to be about 50, we obtain the following:
43 In Release 3.0 the table is named COIX_DATA. Up to and including Release 2.2, frozen report data was stored in table COIX, which now only contains the report definitions (since Release 3.0). With release 4.0 the table is named COIX_DATA40.
S [in bytes] ≈ N × ( 8 × B + 50 )