AT NEW PRODUCT. NEW-PAGE. WRITE / WA_COMPANIES-NAME WA_COMPANIES-PRODUCT. ENDAT. WRITE: / WA_COMPANIES-PRODUCT, WA_COMPANIES-SALES. AT END OF NAME. SUM. WRITE: / WA_COMPANIES-NAME, WA_COMPANIES-SALES. ENDAT. ENDLOOP. 这个样例当name变化时,AT new事件也会执行。 2、AT New 发生时工作区...
AT NEW PRODUCT. NEW-PAGE. WRITE / WA_COMPANIES-NAME WA_COMPANIES-PRODUCT. ENDAT. WRITE: / WA_COMPANIES-PRODUCT, WA_COMPANIES-SALES. AT END OF NAME. SUM. WRITE: / WA_COMPANIES-NAME, WA_COMPANIES-SALES. ENDAT. ENDLOOP. 这个样例当name变化时,AT new事件也会执行。 2、AT New 发生时工作区...
重新排序后的内表数据 内表重新排序后,我们就可以在LOOP中使用 AT END OF 关键字配合 SUM 关键字来汇总内表中的数值型数据。 输出结果: 输出各公司薪资总计数据: 首先我们需要删除 月份 数据,以调整 SUM 关键字的汇总范围。然后再将内表重新按 公司 排序。 调整后的内表数据 在LOOP中使用 AT END OF 关键字...
4 然后LOOP AT lt_msegc INTO lw_msegc.5 在loop 中写 SUM 函数除了数量、金额之外,把其它的赋值先写完lw_mseg-budat_mkpf = lw_msegc-budat_mkpf ."过账日期lw_mseg-vgbel = lw_msegc-vgbel ."订单号……lw_mseg-auart = lw_msegc-auart."订单类型AT END OF auart. SUM. lw_mseg-menge =...
SUM只能在loop循环的AT...ENDAT中使用,它只能对数字类型的字段进行分组合计。详细说明参见下面F1帮助。 2, 例子程序 写一个简单的例子进行说明。 下面代码对采购订单的金额进行合计,把同一个采购订单的所有行项目金额汇总合计,并显示出来。 REPORT ztest_sum. TYPES:BEGIN OF gty_ekpo, ebeln TYPE ekpo-ebeln, ...
itab LIKE TABLE OF wa WITH EMPTY KEY. itab = VALUE #( FOR i = 1 UNTIL i > 5 FOR j = 1 UNTIL j > i ( col1 = i col2 = j ) ). LOOP AT itab INTO wa. AT END OF col1. SUM. cl_demo_output=>write( wa ).
1.) Open the file SUM/abap/htdoc/MIGRAT*_DUR.XML (or SUM/abap/doc/analysis/MIGRAT*_DUR.XML if you are using SUM 2.0 SP 02 or newer) with a browser to get a graphical representation of the runtimes of the migrated tables. 2.) Look for long-running tables at the end of the migrat...
G_TYP_TAB_MATDES TYPE STANDARD TABLE OF G_TYP_MATDES, * Plant BEGIN OF G_TYP_WERKS, WERKS TYPE MARC-WERKS, "PlantENDOFG_TYP_WERKS,G_TYP_TAB_WERKSTYPESTANDARDTABLEOFG_TYP_WERKS,*CurrentStockBEGINOFG_TYP_CURSTK,MATNRTYPEMARD-MATNR,"品目コード ...
Notes 1. The fields CNT(h) and SUM(g) can only be addressed after they have been sorted. Otherwise, a runtime error may occur. 2. The fields CNT(h) and SUM(g) are filled with the relevant values for a control level at the end of each control group (AT END OF, AT LAST...
TYPES:BEGINOFTY_ITAB,COL1TYPECHAR20,COL2TYPEF,COL3TYPEI,COL4TYPEP,ENDOFTY_ITAB.DATA:GT_ITABTYPETABLEOFTY_ITAB,GS_ITABTYPETY_ITAB.GS_ITAB-COL1='A'.GS_ITAB-COL2=2.GS_ITAB-COL3=5.GS_ITAB-COL4=6.COLLECTGS_ITABINTOGT_ITAB.CLEARGS_ITAB.GS_ITAB-COL1='A'.GS_ITAB-COL...