on 11-23-2007 9:44 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
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.