cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Original as Checked-In via BAPI without executing storage

former_member581711
Discoverer
0 Kudos

Hi everyone;

We have a scenario where we already have the original file stored in an external content repository (via a separate non-SAP interface) and just want to assign it to an existing DIR. 

We are able to create the new/unique LOIO and PHIO records with their relationship via SDOK_LOIO_CREATE_WITH_PHIO.  Obviously the only thing missing is the DMS2_DOC2LOIO entry to associate this with the DIR record.

When trying to use BAPI_DOCUMENT_CHANGE2 with the 'DOCUMENTFILES' table, the result is we now see the original file in the DIR record! (ie: the DMS2_DOC2LOIO is created!) but it has the unlock symbol indicating it is has not been checked in (and therefore cannot be viewed from the external repository).

To complete the process (so that the existing content repository document can be viewed), we don't seem to be able to override this and "force" the original file status to be checked-in. 

As soon as we either specify a storage category in the change2 BAPI call, or try and check the PHIO in directly (for example using SDOK_PHIOS_CHECKIN), all the BAPI's and API's want to upload the file and execute the storage.  But in our case, it has already been stored direct to the external repository. 

We want to avoid having to export these from the content repository and and "re-storing" them again just to have them appear as "checked-in".

Does anyone know a way to programmatically set an original document as checked in without having to execute the storage procedure?

This must be a BAPI/function module based solution as the volume is too high and frequent to execute manually as well as the original documents have existed in the external repository for many years prior to SAP being implemented.

Thanks in advance,

Accepted Solutions (0)

Answers (3)

Answers (3)

robin_f
Member
0 Kudos

Over seven Years later, i'm facing the same problem discripted her (or her https://answers.sap.com/questions/10533151/dms---kpro---abap.html)

We want to create a DIR for documents which are already stored on external DMS (by Third-Party Software).
With SDOK_LOIO_CREATE_WITH_PHIO we can create PHIO AND LOIO record on DMS_PH_CD1 - but can not create DIR or an reference to an DIR on Table DMS_DOC2LOIO.

The solution from the other thread linked aboth didn't work to. Which fields have to be filled on table DOCUMENTFILES in BAPI_DOCUMENT_CREATE2 to get this working?

christoph_hopf
Advisor
Advisor
0 Kudos

Hi,

from my point this requirement does not make sense, because why you would like to simulate that the original file is checked in (lock closed) if it is not transferred to the storage category. This would mean to be a serious inconsistent behavior.

If you use the BAPI_DOCUMENT_CHANGE2 and you fill a storage category (e.g. DMS_C1_ST) into table DOCUMENTFILES the originals should be checked in automatically and this would be a consistent scenario.

Best regards,

Christoph

former_member581711
Discoverer
0 Kudos

Hi Christoph, thanks for the input.

Agree, it's a bit out of the ordinary, but the case is that the content/file (ie: the document) is being stored via a separate non-SAP interface directly to the external repository (of which we cannot change the process).  So the scenario:

1.  We already have an existing image in the external repository

2.  We already have an existing DIR in SAP DMS.

Issue: "simply" 🙂 establish the link in the DIR to the existing external file.

Seems every time I use a valid storage category (I agree, as you would normally do) DMS tries to execute the entire storage process...which I'm trying to avoid.

Cheers,

Former Member
0 Kudos

Hi,

You should try checkin the document originals using Function module BAPI_DOCUMENT_CHECKIN, BAPI_DOCUMENT_CHECKIN2.

Best Regards,

Simran