Application Development 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: 

OLE2_OBJECT AND DOCUMENT MANAGEMENT SYSTEM (DMS)

Former Member
0 Kudos

Hi Experts.

I'm trying to make a excel inform like a catalog with materials and images which are in a Document Management System.

I'm using OLE2_OBJECT to make the inform in EXCEL, because I'm trying to do it with SMARTFORMS, and I cannot because I need to resize and put ok the images and with SMARTFORMS I cannot.

To see the information I have a ALV Objects with a custom container with the information to the database..., material, price, etc..., and in other container when you click in a row I show the picture which is in the DMS.

To do it, I use this method to get the URL to the image.

CALL METHOD cl_dms_thumbnail_display=>get_url

EXPORTING

i_doc = ls_doc "IMPORTING

e_url = g_graphic_url.

And after I call the method of instance of class cl_gui_picture to show the picture in the cl_gui_alv_container

CALL METHOD g_picture1->load_picture_from_url

EXPORTING

url = p_graphic_url

IMPORTING

RESULT = p_result.

In the code to excel print to insert the picture if I put this URL to my local pc, it's ok,

CALL METHOD OF picture 'INSERT'

EXPORTING

#1 = 'C:Documents and SettingsadministradorMis documentosMis imágenesprueba.bmp'.

but the URL of the g_graphics_url it's

SAPR3://SAPR3CMS/get/200/ZAFD_5F100/DC99BBC5172158F18A14005056C00008/DSR_20DEP_202_20BANDAS_20BROWN_20389_2020070719.JPG

and this URL it's nothing if I put in the internet explorer...

What can I do to do this??

If you have another idea I appreciate it.

Thanks.

3 REPLIES 3

former_member194669
Active Contributor
0 Kudos

Hi,

May be try this way . ( I am not 100% sure about this)


data : g_picture   type ref to cl_gui_picture.
data : g_thumbnail type ref to cl_gui_custom_container.

CALL METHOD cl_dms_thumbnail_display=>get_url
EXPORTING
i_doc = ls_doc "IMPORTING
e_url = g_graphic_url. 

if not g_graphic_url is initial.
 create object g_thumbnail
      exporting container_name = <Your container name>.
 
 create object g_picture
       exporting parent = g_thumbnail.

 call method g_picture->set_display_mode.

endif.

aRs

Former Member
0 Kudos

...sorry, but your answer has not valid because I'm try to "copy" the image in the Dev. Manag Document to the EXCEL inform that I'm making... and you tell me a method to display in the container the image... it's not the same.

Thanks at any rate.

0 Kudos

Solved by myself