cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload To DMS Using WebService

Former Member
0 Kudos

Hello all,

As we know CV01n is the SAP transaction code for creating a document. If am not wrong the document attached in the transaction code is stored in the configured DMS as i have come to know from a source.

Now i have a requirement for using a Enterprise Web Service for achieving similar functionality.

Does a service exist?

If yes what is the name?

What is the service parameter to attach a file?

Thnks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

ok

Daniel_KASIMIR
Participant
0 Kudos

Hello Yogesh,

could you solve this problem?

Is it possible to upload a file via webservice?

with kind regards

Daniel K.

Daniel_KASIMIR
Participant
0 Kudos

ok

It is possible!

You need a "Funktionsbaustein" that calls bapi_create_document2 and has one additional command:

COMMIT WORK.

bruno_esperanca
Contributor
0 Kudos

Hi Daniel,

Could you advise me on how to configure the web service to receive a file? Which parameter type should I use?

I can open a new question to award you with points if needed.

Thanks & regards,

Bruno

markus_deuter
Active Participant
0 Kudos

Hi Bruno,

I don't know much about WebServices, but you can use function module "C_DESK_DOC_GET_URL" to get the file via a qualified URL. Why not implement a service, which gives you this URL back ? This is easier than implementing the BAPI_DOCUMENT_CHECKOUTVIEW2 to get files directly.

But beware: there can be more than one file stored in the document info record.

Regards,

Markus

bruno_esperanca
Contributor
0 Kudos

Hi Markus,

Thanks for your reply.

In the meantime I had already found my answer. I haven't tested it yet but I believe if you use type XSTRING you should be able to get a file from a webservice.

If this doesn't work, however, I can look into your suggestion as a workaround, thanks!

Regards,

Bruno

Former Member
0 Kudos

Hi Bruno

We are having the same requirement to upload files to DMS via webservice. As we know, RFC can not work in background. Would you mind sharing us with your idea or solution.

Best Regards

Yemi

bruno_esperanca
Contributor
0 Kudos

Hi Yemi!

Of course RFC's can work in background. The code above was designed precisely for the scenario you are referring to.

You need to save the file to the application server (using OPEN DATASET) in some temporary folder, and then you need to explore the BAPI's for document creation.

Good luck!

Bruno