cancel
Showing results for 
Search instead for 
Did you mean: 

Error while checking in Original through CVAPI_DOC_MAINTAIN

Former Member
0 Kudos

Hi Experts,

I'm trying to achieve a functionality where I'm creating a DIR and attaching an original with it from external system. Following are my i/p & o/p parameters.

I/P - File Content, Mime Type along with Document Type

O/P - Document Number

I'm using following function modules for the same

  • CV120_KPRO_MASTER_CREATE - To create PHIO & LOIO
  • SDOK_PHIO_STORE_CONTENT - To store content(would be passed as an input) in PHIO generated in step - 1
  • CVAPI_DOC_MAINTAIN - To create a new DIR & attach original from step 1-2

While calling  CVAPI_DOC_MAINTAIN, I'm receiving error Error while checking in and storing: filename.

I have checked logs in SLG1 tcode and I've received following message.

No directory specified for file transfer to physical document (DMS_PCD1, 005056A260E41ED68D8B91C53100E166)

Can anyone help me resolve it ? Let me know if you need further details and I shall provide the same.

Best Wishes,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

ameya_beri
Active Contributor
0 Kudos

Hello Ravi,

By external system do you mean the original is stored on a server which is not connected to your local machine ?

If yes, I am not sure if this is achievable, you need to have the original on your machine from where it can be read or on SAP server (accessible via AL11).

Can you first write the file temporarily in your SAP application server in /tmp path, and then upload it into a SAP document info record & then delete it off ?

For creating the document then use FM, BAPI_DOCUMENT_CREATE2.

Below link might be useful,

http://scn.sap.com/docs/DOC-49337

FYI: The FM you mention are not released check attribute in SE37, and not released function modules should be avoided for custom coding.

Best Regards,

Ameya Beri

Former Member
0 Kudos

Hi Ameya,

By external system do you mean the original is stored on a server which is not connected to your local machine ?

In a way, Yes. I'm trying to develop a FM which is in system A. Then I'm trying to call the FM from system B(which is SAP system again). I'm passing file content and other details from system B to FM of system A. I guess it can be achieved.

Can you first write the file temporarily in your SAP application server in /tmp path, and then upload it into a SAP document info record & then delete it off ?


I'm fairly new to SAP DMS. Can you please guide me through this?


Ravi

ameya_beri
Active Contributor
0 Kudos

Hello,

Please create the file locally and then check it in. If you have the content read, then you should be able to temporarily create the file on your local SAP instance in  /tmp or any other directory.

I am not sure if an remote solution will work.

Best Regards,

Ameya Beri

Former Member
0 Kudos

How can I create it in /tmp directory? Any leads for that ?

ameya_beri
Active Contributor
0 Kudos

Hello,

Check with a ABAP consultant, OPEN DATASET is the ABAP statement to create a file and write data into it, I believe you have the file contents and also the extension information.

See below links,

Working with files - ABAP Development - SCN Wiki

SAPTechnical.COM - Downloading file onto the Application Server

Best Regards,

Ameya Beri

Answers (0)