cancel
Showing results for 
Search instead for 
Did you mean: 

DMS BAPI_DOCUMENT_CREATE2

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

christoph_hopf
Advisor
Advisor
0 Kudos

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 Kudos

Hi,

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

christoph_hopf
Advisor
Advisor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Devrath,

You can try FM BAPI_DOCUMENT_CREATE.

Let me know if it works.

Best Regards,

Simran

christoph_hopf
Advisor
Advisor
0 Kudos

Hi Simran,

why do you suggest an outdated BAPI? Because the BAPI_DOCUMENT_CREATE2 is the latest BAPI to create document info records.

Best regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

You right the one i suggested is outdated ..

Devrath, could you please post the parameteres that you are passing in the BAPI.

Best Regards,

Simran

Former Member
0 Kudos

Hi Simran and Christoph,

BAPI_DOCUMENT_CREATE2 Does not work in this case becuase i am using it for Data Migration and it somehow does not consider the path of the SAP Storage system but instead the File path of the checked in persons system.

Ill check BDA5 in more detail.

i have found a way which is more time consuming but works and it is standard SAP.

Thanks.

Devrath

former_member188883
Active Contributor
0 Kudos

Hi Devrath,

Refer link http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90402d62-cfd9-2d10-e78b-d323b71bb...

This looks to be useful for you in migration.

Regards,

Deepak Kori

Former Member
0 Kudos

hhey hie ,,,,

Do you know how to use the Function Module

  'SDOK_PHIO_LOAD_CONTENT'

using the PHOID i get the file in an internal table but i am not aware of  how to use it to add that orignal file to another Document Number.

  CVAPI_DOC_CHECKIN is used where we have to attach the internal table but it is not working properly.

Any help would be great,

Thanks in advance..