cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract image from adobe from and upload to archive ?

Former Member
0 Kudos

Hi,

is it possible to extract the image file uploaded into the offline form and store it to sap archive link?

we manage to extract that data into a string variable, and call 'ARCHIVOBJECT_CREATE_TABLE' to store it into archive, the function module returns no error, but the uploaded document can not displayed correctly , i guess something wrong with the data type.

first i got a string from the image file embed in the pdf, then

convert it to a table then call the fm.

could you pls tell me what's wrong here?

CALL FUNCTION 'SCMS_STRING_TO_FTEXT'

EXPORTING

text = l_photo_buffer-mime_content

IMPORTING

length = l_length_i

TABLES

ftext_tab = l_ftext_tab.

l_length = l_length_i.

CALL FUNCTION 'ARCHIVOBJECT_CREATE_TABLE'

EXPORTING

archiv_id = 'A2'

document_type = l_doc_type

length = l_length

IMPORTING

archiv_doc_id = l_doc_id

TABLES

binarchivobject = l_ftext_tab2

EXCEPTIONS

error_archiv = 1

error_communicationtable = 2

error_kernel = 3

OTHERS = 4.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jun,

Do you want to store this image for an employee? If yes then you may try Function Module "ARCHIV_CREATE_FILE". This function module creates the archive link we used it to store the Image for an employees.

ar_object = 'HRICOLFOTO'

object_id = [employee personnel number]

sap_object = 'PREL'

doc_type = 'JPG'

path = [path for your image]

Hope this helps you.

Regards,

<b>Bhawanidutt.</b>