2006 Jul 07 6:17 AM
HI,
3) For the documents contained in the INTAB1 table check whether there are any line items posted to HKONTs =(260501,260502,260503) and store them in an internal table INTAB2
If yes then get the following fields from BSIS/BSAS table
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BELNR = INTAB2-BELNR
GJAHR = P_GJAHR
HKONT = (260501, 260502 and, 260503)
SHKZG = H.
Summate the BSIS/BSAS DMBTR and depict against second line item and fourth line.
4) Subtract line1 and line2 and depict against the 3 line.
5) Subtract the DMBTR of 4th line from the 2nd line DMBTR and depict against the 5th line item.
2006 Jul 07 6:16 PM
2006 Jul 07 6:34 PM
Loop at INTAB1.
Select belnr dmbtr shkzg from BSIS appending table intab2 where HKONT IN =(260501,260502,260503) and belnr = intab1-belnr.
Select belnr dmbtr shkzg from BSAS appending table intab3 where HKONT IN =(260501,260502,260503) and belnr = intab1-belnr.
Endloop.
Work on the data in tables intab2 and intab3 to arrive at the result.
I have wriiten a very rudimentary code to select data.
-Kiran