A trial version of the detailed explanation of the use of the SAP ABAP report progress display control

Some SAP ABAP reports contain multiple business processing steps. Here is an example:

Calculate the total amount of all sales orders in the system within a certain period of time.

Most of SAP's sales order designs based on the ABAP technology stack adopt the data structure of orders 抬头(header)and orders . 行项目(Line Item)The time period of the order is maintained on the header structure. An order may contain multiple line items, and each line item has an amount field. So the total amount of the order is its line item amount 之和.

The order header structure and line item structure are maintained in two different database tables.

For example, in SAP CRM, the order header structure is in CRMD_ORDERADM_H, and the order line items are in the table CRMD_ORDERADM_I.

D in CRMD means Database, ADM is the abbreviation of Administration, H is Header, and I stands for Item.

Therefore, the conventional processing ideas for the above requirements are:

  1. From the order header structure database table, read all header data within a certain period of time.

  2. According to these header data, read out all line item data.

  3. The line item data is traversed in a loop, and the amount field of the line item is accumulated. After the loop ends, the cumulative result is the total amount.

If the number of order entries in the system is very large in a certain period of time, for example, 100 million, then reading the header structure of the 100 million orders from the database table to the ABAP application layer for processing may be difficult due to the excessive amount of data. Large reasons, causing the application to abort and exit abnormally.

The detailed reason has been introduced in detail in the previous article:

One of the solutions to avoid errors caused by reading a large amount of data to the ABAP application server at one time is the idea of ​​​​divide and conquer, that is, to read in blocks, such as reading only 1,000 pieces of data to the ABAP server at a time. After accumulating the amount, read the next thousand items.

The idea of ​​reading in blocks is introduced in the steps before the author's tutorial:

Using block reading will bring another problem: the user does not know how many blocks have been processed by the current system and how many blocks are left to be processed.

Faced with this situation, one approach recommended by SAP is to use the Function Module SAPGUI_PROGRESS_INDICATORto display an interactive progress prompt control in the SAPGUI.

This kind of progress prompt control in the ABAP system is more distinctive. It is not the horizontal progress bar we often see in the Windows operating system, but a clock-like appearance. As shown in the figure above, the solid filled fan-shaped area means that it has been completed. progress. When the entire clock circle is completely filled, the progress reaches 100%.

The rest of this article describes the specific usage of this function.

The effect is shown in the following gif:
4.gif

Guess you like

Origin blog.csdn.net/i042416/article/details/132051892