cancel
Showing results for 
Search instead for 
Did you mean: 

Create original from internal binary table

Former Member
0 Kudos

Hello experts,

I have an internal table which holds the binary content of a file (type SDOKCNTBIN).

Does anyone know how I can create a new original for a document info record in sap r3 from that table (maybe without saving a temporary file on the server)?

Please let me know if someone has a solution for my problem!

Best regards,

Andreas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Andreas,

I have recently tried to execute the function "SDOK_WS_DOWNLOAD" and I also ended up with an empty file. Did you ever resolve this problem or find another way to download document content to a local file?

I would appreciate any info you have regarding this.

Thank you,

Larry Epps

SC Enterprise Information System

lars_verbchels
Explorer
0 Kudos

hello andreas,

I have not done this before. maybe you can use CV120_DOC_CHECKIN_FROM_CLIENT or CV120_DOC_CHECKIN_FROM_TABLE.

otherwise I would try to save a temp file on the client with SDOK_WS_DOWNLOAD / SDOK_WS_UPLOAD an then add the new file to the existing document info record with BAPI_DOCUMENT_CHECKIN2.

greets,

lars

Former Member
0 Kudos

Hello Lars,

thanks for your answer. I tried the function module SDOK_WS_DOWNLOAD. But the file downloaded to my pc is empty!!!

Here is my function call:


...
DATA: content type TABLE OF sdokcntbin.
...
    CALL FUNCTION 'SDOK_WS_DOWNLOAD'
      EXPORTING
        directory                      = 'c:temp'
        file                           = 'filename.pdf'
       binary_flag                    = 'X'
*       file_size                      = 
     TABLES
*       FILE_CONTENT_TEXT              =
       file_content_binary            = content
     EXCEPTIONS
       file_open_error                = 1
       file_write_error               = 2
       invalid_filesize               = 3
       batch_mode_not_supported       = 4
       rfc_error                      = 5
       unexpected_error               = 6
       OTHERS                         = 7
              .

Maybe someone see where the error is?

Regards,

Andreas