‎2013 Sep 12 7:22 AM
Hi All,
Can any body give some idea "how to read image using external url link" and display that image in Adobe/smartforms.
Thanks.
‎2013 Sep 12 8:18 AM
Upload the image in SE78 in MIME directory/repository.
Determine the image details using below code and then pass it over to you adobe level
Form Context
Image Object at form context leve
Regards
Ansumesh
‎2013 Sep 12 8:24 AM
‎2013 Sep 12 8:30 AM
Hi both,
thanks for reply.
The thing, we don't want to save the picture any where. Because those pictures are millions.
I just want to use the link and get the picture in byte string/hex string and convert to image and show in smartform/adobe reader.
Any help will be highly appreciated.
thanks.
‎2013 Sep 12 8:44 AM
Hi,
Sorry but you can't use external images directly in the smartforms. You need to import it in the Document server in BMP format using transaction SE78 and then use it in your form.
regards,
Ashish Rawat
‎2013 Sep 17 3:13 AM
Hi,
In that case, I have requested image into HEX STRING (RAW format from .Net) and the file will be saved in the server. I am able to read file and save into desktop. But when I open desktop image, it is giving error. Attached is the Raw format file.
Any Idea?
Thanks.
‎2013 Sep 17 5:30 AM
Kumar,
You could create a custom folder in the Mime Repository (SE80-->Click on Mime Repository button on the top) under path /sap/public/bc instead of using SE78 etc.
Then upload the image file (.JPG for example) in that new folder in the Mime Repository. Make sure the Mime Type is set to image/jpeg (Right click then see Properties of the image file)
In the context of your form, define an image file of type Graphic Content. Set the Graphic content field to a variable (say var1) of type XSTRING and set the Mime Type to a constant (say co1) of type STRING value 'SAP/PUBLIC/BC/your_folder/your_image.jpg'
In the Code Initialization of the form interface, work with the SAP standard mime_repository object.
data: lr_api type ref to if_mr_api.
lr_api = cl_mime_repository_api=>get_api( ).
lr_api->get( exporting i_url = co1
importing e_content = var1 ).
Finally, in the form, don't forget to bind the image object of the form to the image/Graphic Content of the context.
Cheers,
Sougata.
‎2013 Sep 17 6:58 AM
The file data string should be BMP format....the string you have shown here is not in BMP format. Save the file in BMP format on your desktop.