04-24-2012 10:42 AM
Hi all
I use BAPI_ACC_DOCUMENT_CHECK to checking data before post but it doesn't trigger FI validation.
How to execute it before accounting?
04-24-2012 11:34 AM
You could try calling BAPI_ACC_DOCUMENT_POST instead with a ROLLBACK WORK afterwards, and see if this does call the validation (it should, by all means). However make sure that there are no other DB changes lined up that you would roll back unwantedly.
I used above method successfully for the test mode of a posting program.
Thomas
04-24-2012 11:34 AM
You could try calling BAPI_ACC_DOCUMENT_POST instead with a ROLLBACK WORK afterwards, and see if this does call the validation (it should, by all means). However make sure that there are no other DB changes lined up that you would roll back unwantedly.
I used above method successfully for the test mode of a posting program.
Thomas
04-24-2012 12:00 PM
04-24-2012 12:13 PM
BELNR will be rolled back as well. After some more thoughts, my document type and number range here is exclusively used for that process, so I acknowedge there might be issues when the number range is used more widely.
You could also try calling FI_VALIDATION_HEADER, FI_VALIDATION_ITEM and FI_VALIDATION_DOC yourself, however you would have to map the data from your BAPI structures to the import structures of these function modules.
Thomas