cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DMS BAPI_DOCUMENT_CREATE2

Former Member
0 Likes
1,997

Hi guys,

I am in using the BAPI BAPI_DOCUMENT_CREATE2 for Data Migration.

Consider 2 Systems Source - S Target - T and Document Number D1

  1. First i am using BAPI BAPI_DOCUMENT_GETDETAIL2 in Source System S to exract Data of Document Number D1.
    in the Table T_DOCUMENTFILES i get the details of all the attached orignals. The Orignals are checked in.
  2. Now i use BAPI_DOCUMENT_CREATE2 Destination T and pass the values i get from the GETDETAIL2 FM to create the same document in Target System T.

Now the Problem.

Suppose i am creating Document D1 on my system and checking it in it stores the orignal path as my system path for the file. This does not matter if i am opening the document from anyother system. But when i am using the CREATE FUNCTION MODULE it does not consider it to be checed in and it checks the DOCFILE variable of table T_DOCUMENTFILES and picks the file from there.

The error message i am getting is unable to check in FIle "\\................................"" this is the same value stored in t_documentfiles-DOCFILE

This is not what i want.

My purpose is to pick any document number and migrate its attached files picking the path from the Storage Category.

Any help would be grateful

Thanks and Regards.

Devrath Sampat

View Entire Topic
christoph_hopf
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Devrath,

regarding your description I don't think that the BAPI will be the best solution. I think that it would be even better to use the IDOC functionality and transfer document info records by using DOCMAS IDOCs from transaction BDA5.

Best regards,

Christoph

Former Member
0 Likes

Hi,

Thanks for the reply. Can you please explain how do i use BDA5 . Thanks

christoph_hopf
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Devrath,

regarding BDA5 I can tell you that you have to enter the document data and of course the logical system value. Because this is important for sending the documents to the right target system.

The logical system values could be customizing in transaction WE20 and this partner profiles are the basis for a correct ALE transfer.

I hope that this information could be useful for you.

Best regards,

Christoph