Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SCMS_HTTP_CREATE

Former Member
0 Likes
1,309

Hallo experts,

i would like to upload PDF-documents into our archive systems.

For that I use the function module SCMS_HTTP_CREATE.

It has the table-parameter DATA, which contains some sort of PDF-stream information.

Does anybody know, how I can get that PDF-stream out of the original PDF?

Best regards,

Andi

2 REPLIES 2
Read only

Former Member
0 Likes
823

There is a way to create a bit-stream out of the PDF via JAVA-function. That bit-stream you input the function module.

Best regards,

Andi

Read only

arnaldo_cavazos
Advisor
Advisor
0 Likes
823

Hi,

Just for any ABAPers out there who bump across this question and are still wondering what the answer is:

If you want the user to upload a single file after selecting the file on the filesystem via GUI, you can use the function module GUI_UPLOAD.

For example:

"Grab the file to get its contents and length into local variables...

   CALL FUNCTION 'GUI_UPLOAD'

     EXPORTING

       filename        = lv_filename

       filetype        = 'BIN'

       "codepage = 'UTF-8'

     IMPORTING

       filelength      = lv_file_length

       header          = lv_header

     TABLES

       data_tab        = lt_raw_file_contents

     EXCEPTIONS

       file_open_error = 1

       OTHERS          = 2.


Otherwise, you can try the function module ITS_UPLOAD.

Kind regards,

Arnaldo