cancel
Showing results for 
Search instead for 
Did you mean: 

Upload files from frontend application

AntonPierhagen
Active Participant
0 Kudos

hi all

I have a question. I made an ABAP program which should make files in the DMS from the data which is retrieved from a frontend application.

The document is created with the function module CVAPI_DOC_CREATE. When the document is made i get a document number and no error or warning messages.

After this, when i would like to watch the document with CV01N i see the document, but i cannot open it. Nothing happens when i double click on it.

I also try to the check the document in with the function module BAPI_DOCUMENT_CHECKIN2 (where is this needed for anyway) nothing happens.

So, the question to you, do you know, why this could happen?

kind regards

Anton Pierhagen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anton,

Have you checked-in the documents? it's very important in dms to store documents in repository to retrieve them. If you have not checked-in then it will not get opened. Kindly confirm and revert back.

Regards,

Ravindra

AntonPierhagen
Active Participant
0 Kudos

Hi Pradeepkumar Haragoldavar and Ravindra

I found out that at some point the data of the file is not taken to the table DRAO where the data is set for the files of DMS.

So i think i have something forgotten in the function module CVAPI_DOC_CREATE. Do you know maybe anything i could have forgotten?

kind regards,

Anton Pierhagen

Former Member
0 Kudos

Hi Anton,

When the documents are getting created in DMS,it has to get stored in one content repository and the same u can check in DRAW table.

1. Check whether u are passing the content repository in the function module that u are using.

2. Check the settings in Work station application : DC30

3. Try to open the created documents in TCode:CV02N

You can make use of the function module BAPI_DOCUMENT_CREATE2 to upload and store the documents in content repository

Regards

Bhanu

AntonPierhagen
Active Participant
0 Kudos

Hi!

I made my document in the code.

I create a pdf file and want to put this one into the DMS via this function module CVAPI_DOC_CREATE.

When i debug the function module, i see that it searches for a file, and that is not the case in my program.

How can i set CVAPI_DOC_CREATE so that it gets the raw data of the PDF out of the PF_CONTENT table which is yust created?

Daniel_KASIMIR
Participant
0 Kudos

Hallo Anton,

I think the APIs need a file in the file system to be uploaded. Is it possible to save the pdf on the local machine or on the application server?

Mit freundlichen Grüßen

Daniel K.

AntonPierhagen
Active Participant
0 Kudos

Hi Daniel

I saw that the function module can be set on the content_provide = 'TBL'.

When i looked at the help it says that it would retrieve the data from the internal table.

But besides this, i need always a file?

kind regards,

Anton Pierhagen

Daniel_KASIMIR
Participant
0 Kudos

Hi,

I'm not sure but I think there has to be a file. Have look at table PT_FILES_X (type CVAPI_DOC_FILE). It does'nt seem to accept something like data only.

Regards

Daniel

AntonPierhagen
Active Participant
0 Kudos

Hi

I have the solution. I can set the data via binary data. But you must be careful what you send with the FM.

Also in the DMS the application type you use for creating a document must be customize in a good manner.

I also had set a document with a path and that is not correct. When i only set the filename. the fm works fine.

The filename is used for the name in the DMS.

so this question is solved

Edited by: AntonPierhagen2 on Dec 28, 2010 11:22 AM

Answers (2)

Answers (2)

AntonPierhagen
Active Participant
0 Kudos

Hi

I have the solution. I can set the data via binary data. But you must be careful what you send with the FM.

Also in the DMS the application type you use for creating a document must be customize in a good manner.

I also had set a document with a path and that is not correct. When i only set the filename. the fm works fine

so this question is solved

Former Member
0 Kudos

Use CV02n mode.Test and confirm if you are still unable to process/view the Document in question.

Regards,

Pradeepkumar Haragoldavar