‎2005 Jun 29 10:59 AM
Hi.
I'm trying to create a report in FI/AR which shows me cleared amounts and the invoices which are cleared.
Layout something like this :
Clearing document 10 , Customer A , amount 1500 Euro is cleared for these invoices :
Clearing document 10 , document 1 amount of 500 E
Clearing document 10 , document 2 amount of 500 E
Clearing document 10 , document 3 amount of 500 E
Clearing document 10 , Customer A, amount 1000 is cleared for these invoices :
Clearing document 10 , document 4 amount of 500
Clearing document 10 , document 5 amount of 500
The problem which I'm facing now is how to link the invoices to the correct cleared amount.
Is there link avaibable from document 1 to the amount of 1500 ??
Can anyone help ??
‎2005 Jun 29 11:19 AM
Yes, the connection is the field augbl (Document Number of the Clearing Document).
e.g:
PARAMETERS:belnr LIKE bsad-augbl,
bukrs LIKE bsad-bukrs,
gjahr LIKE bsad-gjahr,
buzei LIKE bsad-buzei.
DATA itab LIKE bseg.
DATA inv LIKE bsad OCCURS 0 WITH HEADER LINE.
SELECT SINGLE * FROM bseg CLIENT SPECIFIED INTO itab
WHERE mandt = sy-mandt
AND bukrs = bukrs
AND belnr = belnr
AND gjahr = gjahr
AND buzei = buzei.
SELECT * FROM bsad INTO TABLE inv
WHERE bukrs = itab-bukrs
AND kunnr = itab-kunnr
AND augdt = itab-augdt
AND augbl = itab-augbl.
AND belnr <> itab-augbl.regards Andreas