Skip to Content
Oct 24, 2006 at 01:59 PM

f-32 clear debit


hi experts,

i am writing batch input program using tcode f-32. f-32 second screen it is displaying all credit and debit line items.i got all debit and credit line items in the internal tables.

I must select the credit amounts first and then according to the baseline date (bsid-zfbdt) determine the oldest debit and select that debit line.

If there is a credit balance after selecting the first line, (Field RF05A-DIFFB = debit balance) the next oldest debit line must be selected This process of allocating credits against debit lines must continue until a debit balance is calculated (Field RF05A-DIFFB = credit balance).

if the line items are like this.

customer amount baseline date

12300020 79 12.10.2006----

debit line item

12300020 59 13.10.2006----

debit line item

12300020 44 15.10.2006----

debit line item

12300020 89- 14.10.2006----

credit line item

first i must select 3rd line item,after that oldest debit line item according to baseline date i must select 1st line item,after that still

i got credit balance(89-79 = 10-).so i need to select second oldest debit line item that means 2nd line item must select.

how can i write the code for this.can anybodu please help me.

Thanks and regards