2011 Nov 16 6:13 AM
Hi Gurus,
During one of the development I require to see the Contact Account's Open Items are cleared or not. Means Payment against the Contract Account's (Print documents) is received? FPL9 shows the cleared items against the contract account but during one of the Development I need to write logic to check if the CA open Items are cleared.
Please advice the table link or if there is any FM to check this.
Thanks with regards,
Rahul
2011 Nov 16 8:05 AM
Hi,
Tables DFKKOP and DFKKKO has the posting related information of the documents. You can refer to DFKKOP with the specific logic as per the requirement and can refer to DFKKKO table to get the posting relevant header data (Source and creation date / time).
Also, FKK_ACCOUNT_BALANCE_COMPUTE is the FM that gives the open balance and posting data for CA /Contract for the specified interval.
Hope this helps.
Regards,
Rajesh Popat
2011 Nov 16 3:02 PM
Hi,
If it does not matter for what reason the items have been cleared, proceed as follows:
Using the Contract Account number, look up table DFKKOP as follows:
VKONT = (the Contract Accont in question)
AUGST (Clearing Status) = 9
If you wish to only look at Invoices, provide the Document Type parameter (field BLART = the Document Type you use for Invoices)
This will retrieve the cleared items (if you specified a document type, it will only retrieve items for that Doc Type).
NOTE:
If you wish to isolate only clearings due to incoming payments, please use Clearing Reason (AUGRD) = 01. Otherwise all cleared items are retrieved, e.g. Written off items, Transferred items, items cleared due to Account Maintenance, etc..
Imporant fields related to Clearing:
If you want the Clearing Document number, it will be stored in the retrieved item/s in field AUGBL.
The Clearing Amount will be stored in field AUGBT
The Clearing Date will be stored in AUGDT.
I hope this helps.
Ivor Martin
2011 Nov 21 4:43 AM
Hi,
Check for field AUGST in table DFKKOP against the documents for the CA. If field value is 9, document is cleared. If field value is blank. It is still open.
In case of partial payments, finance document is split up. All items with field value 9, partial payment has been made. Items for which field value is blank, are yet to be cleared.
Please explore table DFKKOP (Document Items) and DFKKKO (Document Header) for more info.
Thanks.
Ravi
2011 Nov 21 7:32 AM
Hi Rahul
You can use below FMs
FKK_ACCOUNT_BALANCE_COMPUTE
BAPI_ACCOUNT_GETBALANCES
to dereive OPEN ITEM / CLEARED ITEM.
Thanks,
Imran