Parking a document allows saving an SAP FI document without actually posting it.
Parked documents are often used in accounts payable and accounts receivable with invoices and credit memos. You can park a receipt to post it at a later point in time.
Parked documents can also be saved incomplete with data missing that is required for posting. Missing data needs to be completed before the document can be posted. When posting a parked document, the parked document is deleted and a real FI document is posted. Once this is done, the financial values are updated in the SAP FI module.
If you want to create parked documents programmatically, the business application programming interface (BAPI) BAPI_ACC_DOCUMENT_POST
can be used.
This BAPI can be useful when documents are created through an interface or customer-specific report and need manual verification before posting.
BAPI_ACC_DOCUMENT_POST Example Implementation
Below source code is a test program to park an accounting document with a vendor line. Further information on the BAPI fields can be found in the comments.
DATA: documentheader TYPE bapiache09,
accountpayable TYPE bapiacap09,
currencyamount TYPE bapiaccr09,
return TYPE bapiret2_tab.
DATA: documentheader TYPE STANDARD TABLE OF bapiache09,
accountpayable TYPE STANDARD TABLE OF bapiacap09,
currencyamount TYPE STANDARD TABLE OF bapiaccr09.
documentheader-bus_act = 'RFBV'. " Business Transaction, see SAP Note 2092366
documentheader-username = sy-uname.
documentheader-header_txt = 'TEST'. " Change Header Text
documentheader-comp_code = '1000'. " Change Company Code
documentheader-doc_date = sy-datum. " Document Date
documentheader-trans_date = sy-datum. " Transaction Date
documentheader-pstng_date = sy-datum. " Posting Date
documentheader-doc_type = 'KR'. " Change Document Type
documentheader-ref_doc_no = 'TEST'. " Change Document Reference
documentheader-doc_status = '2'. " Document status Park, see SAP Note 2092366
APPEND documentheader TO documentheader.
accountpayable-itemno_acc = '0001'.
accountpayable-vendor_no = '0000100000'. " Change Vendor
accountpayable-comp_code = '1000'. " Change Company Code
APPEND accountpayable TO accountpayable.
currencyamount-itemno_acc = '0001'. " Accounting Document Line Item Number
currencyamount-curr_type = '00'. " Currency Type and Valuation View
currencyamount-currency = 'EUR'. " Currency Key
currencyamount-amt_doccur = '1000.00'. " Amount
APPEND currencyamount TO currencyamount.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = documentheader
TABLES
accountpayable = accountpayable
currencyamount = currencyamount
return = return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = abap_true.
Please note: There are no BAPIs that you can use to post, edit or delete a parked document. Further processing must be carried out using transaction FBV0
or FBV2
.
Further information on this BAPI can be found in SAP Note 2092366.