2016 Aug 10 6:24 PM
Hi,
How do I use SO_OBJECT_INSERT to overwrite document which has exact same name.
Shruti
It does accept file with same name. But even though file name is same it does not overwrite and create new attachment with same name.
2016 Aug 10 9:00 PM
Sorry, but you shouldn't use this function module as SAP never released it. If you want to attach a file to a business object (?), you could use SO_DOCUMENT_INSERT_API1. But I don't understand why it wouldn't accept a file with same name, could you tell us more?
2016 Aug 10 9:03 PM
It does accept file with same name. But even though file name is same it does not overwrite and create new attachment with same name.
2016 Aug 11 6:52 AM
Oh sorry. No, it's for creation, not for overwriting, it's not like file upload/download in a file system, every SAPoffice document has its own unique ID, which is a kind of auto-incremented number, its unique ID is not its name. Consequently, you must do it differently: read all attachments of the business object (search SCN to get examples, for instance search CL_BINARY_RELATION), get the ID of the one with same file name, delete it (SO_DOCUMENT_DELETE_API1), and insert the new document.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |