ltannous
4th February 2005, 19:03
I have a report that is using the table tfgld410. I am trying to get this report to print tfgld410.dim2, but I noticed that the records that are credits contain this data but the records that are debits dont. How can I hold the value from dim2(credits) and use them for dim2(debits) in my report?

Similarities :
Item, docn, quantity, trans type ...
There are many fields where debit = credit so I want to look up the value for dim2 in credits, and use that on my report for dim2 in debits.

I was trying something with hold.dim2... but not sure how to write this report script.

example of report
leac......dim2........item...........docn................deb/cred
12345...ASDFFD...1212121.....10022333............credit
12211................1212121.....10022333............debit

if I have the similarities of item/docn how can I carry the dim2 from credit line to dim2 debit line??

tjbyfield
5th February 2005, 00:53
I have a report that is using the table tfgld410. I am trying to get this report to print tfgld410.dim2, but I noticed that the records that are credits contain this data but the records that are debits dont...how can I carry the dim2 from credit line to dim2 debit line??

Are you sure that all the records are in tfgld410? If there is supposed to be a value in "dim2" or any other "dimN" or "leac" and the records have been integrated then they will be there.

I think you need to look at table tfgld417 also. This table contains credit account details. (Contra would probably be a better name because if the tdgld410 posting is a credit then this table will have the debit account). Table tfgld418 may also be useful in that it contains the key fields. (tfgld417/8 were introduced with baanIVc (I think) to reduce the disk space useage.

Terry

mark_h
5th February 2005, 04:52
Not sure about the stuff Terry posted, but you could try something like this in the report script:


detail.1:
before.layout:
if isspace(tfgld410.dim2) then
print.dim2 = hold.dim2
else
print.dim2 = tfgld410.dim2
endif

after.layout:
if not isspace(tfgld410.dim2) then
hold.dim2 = tfgld410.dim2
endif


Of course you need to print "print.dim2" in the report. Not done too much finance stuff and I am not sure I have the domain correct. Of course this also depends on the credits and debits being in the correct order.

Mark

Hitesh Shah
5th February 2005, 12:48
Terry's right in that one will have to use the table tfgld417 for credit records (with exception of sales invoice records ) and tfgld418 for integration status.

Further give some code to be able to give more concrete suggestion.

ltannous
7th February 2005, 16:24
Mark suggestion worked. I just needed to resort my report so the credit printed before the debit lines.

Thanks for all your help and suggestions.