Skip to Content
avatar image
Former Member

BDS_BUSINESSDOCUMENT_CREATEF

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 07, 2010 at 04:53 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Dec 07, 2010 at 01:47 PM

    Hi,

    Sorry that i do not have solution for you.

    Search in specific for Thomas Jung replies .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 23, 2010 at 11:10 AM

    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

    Add comment
    10|10000 characters needed characters exceeded