Standard SAP functionality allows parking accounting documents before finally posting these documents. Parking can be used to enter and store (in)complete documents in the SAP system, without carrying out extensive entry checks. These parked documents can be completed, checked and then posted at a later date.
When registering accounting documents via interface and not directly online in your SAP environment, the same business application programming interface (BAPI) is used as for posting accounting documents. This is BAPI_ACC_DOCUMENT_POST.
Some fields have to be filled with specific values to park accounting document via BAPI_ACC_DOCUMENT_POST. OSS note 2092366 explains how to park an accounting document using BAPI_ACC_DOCUMENT_POST.
Example program to park accounting document via BAPI_ACC_DOCUMENT_POST
I share with you a test program which parks an accounting document with vendor line using BAPI_ACC_DOCUMENT_POST. The fields to be changed to post in your SAP environment are marked with 'To be changed !'