In particolare viene calcolata la somma delle colonne da hsl01 a hsl16.
SELECT * FROM glt0
WHERE rldnr = '00'
AND rrcty = '0'
AND rvers = '001'
AND bukrs = p_bukrs
AND ryear = p_gjahr
AND racct IN so_hkont
AND rbusa IN so_gsber
AND rtcur = wa_waers
AND rpmax = '016'.
CLEAR bal_accx.
ADD glt0-hsl01 THEN glt0-hsl02
UNTIL glt0-hsl16 GIVING bal_accx
ACCORDING TO so_monat.
bal_acc = bal_acc + bal_accx.
ENDSELECT.
WHERE rldnr = '00'
AND rrcty = '0'
AND rvers = '001'
AND bukrs = p_bukrs
AND ryear = p_gjahr
AND racct IN so_hkont
AND rbusa IN so_gsber
AND rtcur = wa_waers
AND rpmax = '016'.
CLEAR bal_accx.
ADD glt0-hsl01 THEN glt0-hsl02
UNTIL glt0-hsl16 GIVING bal_accx
ACCORDING TO so_monat.
bal_acc = bal_acc + bal_accx.
ENDSELECT.
Nessun commento:
Posta un commento