The first step: Define the total parameters (p_total_s) and row count (p_total_l) parameters in the table interface, such as:
Step two: defined in global definition ( tab page of global Data): Current page (z_currpage), subtotal (z_subtotal_s), Subtotal (z_subtotal_s_l ), Total (z_count), Total (z_count_l), as shown:
Step three: Define the quantity, Amount field in the global definition (currency / Quantity field tab ) as shown in:
Step three: Define the calculation rules in the Calculation tab page of the loop loop, as shown in:
Fourth Step: Add the program line and add the following code:
Z_count = Z_count + 1 .
IF sfsy- PAGE <> Z_currpage.
z_subtotal_s = z_subtotal_s_l.
Z_currpage = sfsy-PAGE.
ENDIF .
z_subtotal_s_l = WA_ITAB-ERFMG.
As shown in the following:
Fifth Step: Add the program line in the footnote subtotal and add the following code:
IF sfsy- PAGE > 1 and p_total_l = Z_count and z_count_l = Z_count.
z_subtotal_s = z_subtotal_s_l.
ENDIF .
z_count_l = Z_count.
As shown in the following:
Sixth step: Subtotal display, as shown:
Seventh step: Total display, as shown in:
Special Note: When displaying detail data, the settings inTable :
Table--à detail setting:------L2 no page change selected, as shown:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
SmartForms Total Subtotal