Hi all!
want to edit DMS document info records (as in cv04n - add, del files) without deleting original DIR -> Version management of DIRs.
I use the following BAPI scenario:
- BAPI_DOCUMENT_GETACTVERSION (get the highest version of a DIR)
- BAPI_DOCUMENT_GETDETAIL2 (to get the object links of the DIR)
- BAPI_DOCUMENT_CREATENEWVRS2 (create a new version of the DIR, copyoriginals = X, object links are copied as well)
- again BAPI_DOCUMENT_GETACTVERSION (get this new version number)
- again BAPI_DOCUMENT_GETDETAIL2 to get the files of the new version DIR)
- to delete single files, i change the file record of the files table ( set deletevalue = X).
- then BAPI_DOCUMENT_CHANGE2 as suggested in a nother thread of mine by 2 community members.
the latest step runs for version = 00, but when having a version gt 00, the bapi_document_change2 returns : "original is already checked in and stored".
also i checked the ph_objid and lo_objid (the ids are the same for Version n and n+1), which might be the reason for the error mentioned above.
i can't find any solution.
thanks for replies in advance,
Christoph