cancel
Showing results for 
Search instead for 
Did you mean: 

BDS_BUSINESSDOCUMENT_CREATEF

Former Member
0 Kudos

Hi Guys,

I am trying to upload some documents from C:\ to custom business object via function module BDS_BUSINESSDOCUMENT_CREATEF it works fine when i am testing the function but when i am using the same function i my abap web dynpro application it through the exception 4. even i have used the class cl_bds_document_set method->create_with_files which works fine with abap but it doesnu2019t attached document with abap web dynpro application.

I have gone through few of the thread but couldn't find any answer.

Atul

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You aren't going to be able to use these function modules or classes to upload files. These use the SAPGUI to upload files. When you are running Web Dynpro ABAP you are in the web browser and subject to its security restrictions. This means that you need to use the fileUpload UI element or the ACFUpDownload UI elment (only on 7.01 and higher) to upload the file contents. Once in memory on the application server you can then call the necessary business APIs to save the data, but no APIs that directly try and perform the upload.

Former Member
0 Kudos

Hi guys,

The solution to this is once you upload the UI element FileUpload convert your xstrlen into table and use CL_BDS_DOCUMENT_SET=>CREATE_WITH_TABLE to store in BDS.

Atul

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Atul,

I am facing the same problem as yours. I am getting exception 5. i was using FM 'BDS_BUSINESSDOCUMENT_CREATEF' but it works only for abap not for web dynpro. Can you please tell what all parameter to pass for 'CL_BDS_DOCUMENT_SET=>CREATE_WITH_TABLE' method. i am not getting what value to give for parameter CONTENT .

Advance thanks,

Bhavya

Former Member
0 Kudos

Hi,

Sorry that i do not have solution for you.

Search in specific for Thomas Jung replies .