‎2010 Mar 10 11:45 AM
Hi,
We have Custom program to post the document in FB01 using BDC.User asked us to show the data in ALV before posting the document like simulation in FB01. We have documents in the internal table before passing the data into BDC program.?
Is it possible to simulate the document like in FB01 Simulation.? Is it there any function module to simulate the FI doucuments.?
Thanks in Adavance
P.Senthil Kumar
‎2010 Mar 10 2:37 PM
Hi Senthil,
IF you execute BAPI_ACC_DOCUMENT_POST instead of a BDC to FB01 and if there were no errors, just do a COMMIT WORK. After this COMMIT you'll see the changes on the database.
For example you can have a checkbox for testing purposes. If there are no errors and the checkbox = 'X' then do not do a Commit Work (Simulation).
Regards
Ernesto
‎2010 Mar 10 2:48 PM
Adding to this suggestion, there is also function module BAPI_ACC_DOCUMENT_CHECK, which does the same without having to commit or not.
Thomas
‎2010 Mar 11 11:01 AM
Hi Thomas,
Is this function module(BAPI_ACC_DOCUMENT_CHECK) act like simulation in FB01.My requirement is that in selection screen, i want to add "Test Run Only" option,If user selected this one then i want to show the required details for posting and simulation of posting data but actual posting should not happen when i executing this program with test run.
Actually this custom program already created by some one which has BDC program to post the document.so i need to add one option test run.
Layout should be display the following fields (Layout data should have both credit and debit entries)
Documnet Number (test Run)
Reference BKPF-XBLNR
Company Code BSEG-BUKRS
Item BSEG-BUZEI
Currency BKPF-WAERS
Posting key BSEG-BSCHL
Account BSEG-HKONT
Amount BSEG-WRBTR
Material BSEG-MATNR
Quantity BSEG-MENGE
Trading Partner BSEG-VBUND
Cost Centre BSEG-KOSTL
Profit Center BSEG-PRCTR
Functional Area BSEG-FKBER
Sales order BSEG-VBEL2
Regards
P.Senthil Kumar
Edited by: senthil kumar on Mar 11, 2010 12:02 PM
Edited by: senthil kumar on Mar 11, 2010 12:03 PM
Edited by: senthil kumar on Mar 11, 2010 2:19 PM