7、sum( dmbtr ) into table git_bsik_sum from bsik where bukrs = s_bukrs and lifnr in s_lifnr and blart = 'RE' group by bukrs lifnr. "在bsak中累加得到发票总金额 select bukrs lifnr sum( dmbtr ) into table git_bsak_sum from bsak where bukrs = s_bukrs
8、 and lifnr in s_lifnr and blart = 'RE' group by bukrs lifnr. "合并未结算发票总额表git_bsik_sum与已结算发票总额表git_bs