SmartForms Total Subtotal

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.