on 10-09-2012 2:09 PM
Hello,
I wanna use a BAPI for the manual content versioning for originals of DIRs like it is possible in the GUI (menu "Originals" -> "Checkin as new Version"') I found already the following 3 BAPIs which might be useful:
- BAPI_DOCUMENT_CHANGE2
- BAPI_DOCUMENT_CHECKIN2
- BAPI_DOCUMENT_CHECKIN_REPLACE2
However, when I tried to use those BAPIs, the original is replaced all the time. So, what do I have to consider here in order to get a content version of an original!?
BR, Jens
Dear Jens,
from my point of view you have to use a BAPI sequence which simulates the checkout and checkin
process of the SAPGUI (e.g. CV02N).
So I think that the creation of content versions would be possible by using BAPI_DOCUMENT_CHECKOUTVIEW first and then BAPI_DOCUMENT_CHECKIN2 or BAPI_DOCUMENT_CHANGE2.
Best regards,
Christoph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christoph,
thanks for your response.
I already tried the mentoined three BAPIs for the checkin and therefore, as precondition, I had to checkout the original.
In order to checkin now the original as new content version, from my understanding, I somewhere should tell this to the calling checkin BAPI (BAPI_DOCUMENT_CHECKIN2 or BAPI_DOCUMENT_CHANGE2).
First, if I want to checkin an original as a new content version via the GUI, you can also do this explicit by choosing the action "Checkin as new Version".
So, I don't know what field or flag has to be filled that this BAPIs work or is the manual content versioning not possible in background?
BR,
Jens
Hi Jens,
if you create content versions for a file normally the function module 'CV120_KPRO_CHECKIN_NEW_VERSION' gets called. So maybe this can be used in a special program or report to create content versions.
There is no specific flag in the BAPIs to trigger the creation of a new content version. This is only made if the used document status has the flag for 'Content Versions' set.
Best regards,
Christoph
Hi Christoph,
yes, I've seen the function module 'CV120_KPRO_CHECKIN_NEW_VERSION'.
If I set the flag 'Content versions' in DC10 -> "document status" for a specific document type, then the creation of the content version is based on the document status. This works but this would be the way for the automatic content versioning, as described in the SAP help.
So, in order to set the content version manually, I'll follow your suggestion and will create an own function module although I would have prefered the use of a BAPI.
Thanks and regards,
Jens
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.