Step by Step Guide for recording CV01N Transaction to Attach Documents
Batch, Non-Batch, GUI Scripting
If you want to be able to upload an actual document from your PC to SAP, you will need to use GUI Scripting as the recording mode. Enable the Document Number field after the recording as fixed with a blank space to ensure that the field is cleared for the next record creation.
See the attached document for step-by-step instructions