Accounting document validation

Question:
All,
I am trying to validate an account document created from a web application before posting it. I am unable to find a fn module, BAPI or program which accepts the document information as an input and perform the validations and returns the errors back.
I found a few Fn modules like API_ACC_DOCUMENT_CHECK, but they do not perform the validations in validation/substution nor they have fields for profitability segment (or atleast I am unable to figure out how to populate them).
Have anyone been in a similar situation or know how to do it? Any help will be appreciated..
Thanks
-TAP
Answer:
The term for such an activity is "simulate". Check function modules related to the documents you want to check, of which the name contains "simulate".

More Articles:

Urgent Help on internal table required?
how to get every value of Var?
URGENT: View ALV Report in Excel?
Read field names of SAP table?
HELP!!! - ALV List Variants?
Just curious.?