Add an attachment to a document via ABAP
I'm looking for a function module or something similar that creates attachments to a document, i.e.:
If you open a Purchasing Order (PO) and press "Services for object" ->"Create"->"Create attachment", you can attach a file to the current document.
I'm trying to make it in abap, for a batch of documents (not only PO), without user intervention, picking the files to attach from the sap server and/or the local machine.
Do you know how to do this?
Thank you in advance!!