Please also have a look in our OnlineHelp for further information.
With ERPConnect it is easy to upload documents like excel sheets, word documents or images to the BDS (Business Document Service). All you have to do is to read the file into a byte array and send the array line after line to the function module BDS_BUSINESSDOCUMENT_CREA_TAB.
In the code below you can see how to upload an excel sheet to the BDS. With just a few changes in the coding like the document class, the document and MIME-type you can easily upload other document types.
The relevant document classes and type you can find in the SAP IMG –> Basis Services –> Archive Link –> Basic Customizing
The Classname (BKPF) is standing for the Accounting document type. In the Document Navigator (TA OAOR) you can find other Classes.
The objectkey (100000000115642009) for BKPF is build from the company code, document number and the fiscal year.