ABAP LOOP AT怎么汇总数据后,再相除,就5分了。。。 5
LOOPATit_item1INTOwa_item1."明细项归集MOVE-CORRESPONDINGwa_item1TOwa_itab.IFwa_item1-kwmen...
LOOP AT it_item1 INTO wa_item1."明细项归集
MOVE-CORRESPONDING wa_item1 TO wa_itab.
IF wa_item1-kwmeng NE 0 .
wa_itab-netwr1 = wa_item1-kzwi1 * wa_item1-lfimg / wa_item1-kwmeng."发货金额
ENDIF. "总提货金额
IF wa_item1-auart = 'ZR01'. "总退货
wa_itab-netwr1_zth = wa_item1-kzwi1.
ENDIF.
IF wa_itab-netwr1 NE 0. --这里需要是汇总后才相除,该怎么实现
wa_itab-netwr1_zthl = wa_itab-netwr1_zth / wa_itab-netwr1.
ENDIF.
COLLECT wa_itab INTO it_itab. "汇总
CLEAR:wa_itab,wa_item1.
ENDLOOP. 展开
MOVE-CORRESPONDING wa_item1 TO wa_itab.
IF wa_item1-kwmeng NE 0 .
wa_itab-netwr1 = wa_item1-kzwi1 * wa_item1-lfimg / wa_item1-kwmeng."发货金额
ENDIF. "总提货金额
IF wa_item1-auart = 'ZR01'. "总退货
wa_itab-netwr1_zth = wa_item1-kzwi1.
ENDIF.
IF wa_itab-netwr1 NE 0. --这里需要是汇总后才相除,该怎么实现
wa_itab-netwr1_zthl = wa_itab-netwr1_zth / wa_itab-netwr1.
ENDIF.
COLLECT wa_itab INTO it_itab. "汇总
CLEAR:wa_itab,wa_item1.
ENDLOOP. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询