Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Migrate Documents via RFC

Former Member
0 Likes
856

Hi,

I also wanna migrate

- the Hierarchy of Documents

- the MetaData of Documents

- the Content of Documents

from one SAP-System to another via RFC.

Is there a standard Function Module from SAP available ?

or let me know a User FM if possible!

thanks for your help in advance

Franz

Hi,

- Go to transaction BAPI

- Select tab "Alphabetical".

- Look for "Document". ( Since it is alphabetical list, just scroll down the list you will find "Document" ).

- There are multiple BAPIs available related to "Document" to, get detail, create, change etc.

Let's say you have two SAP system SAP1 and SAP2. The documents are create in system SAP1 and you want to migrate them into SAP2.

- First get the document data using BAPI BAPI_DOCUMENT_GETDETAIL2 from SAP1. You will use this BAPI in SAP2 to get data from SAP1.

Here i assume that 'sap1' is rfc destination created for system SAP1.

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2' DESTINATION sap1
     EXPORTING
        documenttype         = lf_doctype
        documentnumber       = lf_docnumber
        documentpart         = lf_docpart
        documentversion      = lf_docversion
        getobjectlinks       = 'X'
        getcomponents        = 'X'
        getstatuslog         = 'X'
        getlongtexts         = 'X'
        getactivefiles       = 'X'
     IMPORTING
        documentdata         = ls_doc_data
        return               = ls_return
     TABLES
        objectlinks          = lt_links
        documentdescriptions = lt_desc
        longtexts            = lt_texts
        statuslog            = lt_statuslog
        documentfiles        = lt_files
        components           = lt_comp.

- Once you get this data you can use BAPI BAPI_DOCUMENT_CREATE2 in system SAP2 to create documents with data data got from SAP1. This way you will also generate different document number in SAP2.

I have never worked with DMS before. But i am sure you can use BAPIs available here and meet your requirement.

Regards,

RS

6 REPLIES 6
Read only

Former Member
0 Likes
827

HI Kornell

just refer this thread it may helps you...

if it helps reward with points..

regards rk

Read only

0 Likes
827

Sorry thats not what I was looking for.

I want to migrate

- the Part-List of Documents

- the MetaData of Documents

- the Content of Documents

from one SAP-System to another via RFC.

Has anybody of you already used the above mentioned migrations?

Are there any Function Modules from SAP available for that, and if so, what are their names?

Has anybody of you written any programmes/function moduls of your own for that?

thanks for your help in advance

Franz

Read only

0 Likes
827

Hi,

You want to move data from one SAP system to another, BUT what kind of data it is. Is it

- Material master / Customer mater / Vendor master

- Sales order data / Billing data / Invoice data

- Accounting data ( AP / AR )

Please be more clear. There are different RFC FM available in SAP for different purpose. There is not generic RFC FM available. Please clarify your requirement.

Regards,

RS

Read only

0 Likes
827

Hello,

I want to move Data from the Document Mananagement System (DMS)

createt with CV01N from one SAP-System to another.

From one Document (Masterdocument) I want to move all other depending notes, folders, documents, structures, content etc.

A special task is, that I have to give the nodes in the target SAP-System a new name and

that the structure of the Masterdocument should be different between source- and Target-system.

Regards,

Franz

Read only

0 Likes
827

Hi,

- Go to transaction BAPI

- Select tab "Alphabetical".

- Look for "Document". ( Since it is alphabetical list, just scroll down the list you will find "Document" ).

- There are multiple BAPIs available related to "Document" to, get detail, create, change etc.

Let's say you have two SAP system SAP1 and SAP2. The documents are create in system SAP1 and you want to migrate them into SAP2.

- First get the document data using BAPI BAPI_DOCUMENT_GETDETAIL2 from SAP1. You will use this BAPI in SAP2 to get data from SAP1.

Here i assume that 'sap1' is rfc destination created for system SAP1.

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2' DESTINATION sap1
     EXPORTING
        documenttype         = lf_doctype
        documentnumber       = lf_docnumber
        documentpart         = lf_docpart
        documentversion      = lf_docversion
        getobjectlinks       = 'X'
        getcomponents        = 'X'
        getstatuslog         = 'X'
        getlongtexts         = 'X'
        getactivefiles       = 'X'
     IMPORTING
        documentdata         = ls_doc_data
        return               = ls_return
     TABLES
        objectlinks          = lt_links
        documentdescriptions = lt_desc
        longtexts            = lt_texts
        statuslog            = lt_statuslog
        documentfiles        = lt_files
        components           = lt_comp.

- Once you get this data you can use BAPI BAPI_DOCUMENT_CREATE2 in system SAP2 to create documents with data data got from SAP1. This way you will also generate different document number in SAP2.

I have never worked with DMS before. But i am sure you can use BAPIs available here and meet your requirement.

Regards,

RS

Read only

0 Likes
827

hi,

thanks, your message is very helpfull and I will check the other BAPI's related to 'Document'.

now I need only further information for handling the structure of a document.

Regards, Franz