cancel
Showing results for 
Search instead for 
Did you mean: 

Search for a function module to copy documents (DMS)

Former Member
0 Kudos

Hi,

I'm searching for a function module to make a copy of an existing document (including the originals in the document).

The module 'BAPI_DOCUMENT_CREATEFROMSRC2' seems to be the right one, but the copy must be stored in a diffrent storage carrier which depends on the document type. Unfortunately the document type can't be changed when using this module.

Has anyone an idea?

Thanks and regards.

Jan-Christian Treusch

Accepted Solutions (0)

Answers (1)

Answers (1)

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Jan-Christian,

to achieve this behavior I think you can use a seuqence of BAPIs DOCUMENT_GETDETAIL2 and DOCUMENT_CREATE2.

With DOCUMENT_GETDETAIL2 you can read all document related data from the source document and afterwards you can hand these data to DOCUMENT_CREATE2. During this handover you can change the documenttype and just enter all the other data to the CREATE2 BAPI.

To realise the changes you also have to execute BAPI_TRANSACTION_COMMIT in the end. So the whole sequence should be:

BAPI_DOCUMENT_GETDETAIL2

BAPI_DOCUMENT_CREATE2

BAPI_TRANSACTION_COMMIT

I hope this information is useful for you.

Best regards,

Christoph

P.S.: Please reward points for any useful inputs.