cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve GOS Image and import into Print Form

Former Member
0 Kudos

Hello All,

I am having terrible trouble importing an image from the generic object service (GOS) and importing it into a form.

I have success in retrieving the image using function modules:

BDS_GOS_CONNECTIONS_GET and

SO_DOCUMENT_READ_API1

However I can not seem to convert the 255char table from SO_DOCUMENT_READ_API1 into a binary string correctly.

Any help would be greatly appreciated,

Thanks,

Aaron

Accepted Solutions (0)

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello again, did you go through these?

When you need to send a picture into the offline form: and

If your problem is with the GOS, maybe you should ask in the ABAP Genrral or something. In the threads you can read what types of pictures (I hope you can read it there, otherwise you can always open your LCD and check what types of pictures are allowed in Forms) can you use. How to get the pictures out of the GOS is not that Adobe related, right?:))

Regards Otto

Former Member
0 Kudos

Otto,

Thanks for your reply.

I gave up trying to retrieve the images from GOS and worked on retrieving them from the BDS.

I can do this using the following:

*Get attachments.

CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET',

*Get the image in table form

CALL FUNCTION 'BDS_BUSINESSDOCUMENT_GET_TAB',

*Convert content table to Xstring

**Critical Statement

MOVE tl_comp-comp_size TO l_len.

CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

Move the results to a global XSTRING field and link to graphic field within the form.

I really struggled with the FM 'SCMS_BINARY_TO_XSTRING' since I was not populating the parameter INPUT_LENGTH correctly.

I might be able to retrieve images from GOS now that I know about the input length.

Thanks for your concern,

Aaron