cancel
Showing results for 
Search instead for 
Did you mean: 

upload image from desktop and display it in a smartform

Former Member
0 Kudos

Hi Experts ..!!

Plz can anyone guide me how do i programatically upload a image file and show that image directly in a smartform,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

PFB the code to upload the images from your PC to SE78.

DATA: gi_filename type rlgrap-filename,

gi_name type stxbitmaps-tdname,

gi_object type stxbitmaps-tdobject,

gi_id type stxbitmaps-tdid,

gi_btype type stxbitmaps-tdbtype,

gi_resident type stxbitmaps-resident,

gi_autoheight type stxbitmaps-autoheight,

gi_bmcomp type stxbitmaps-bmcomp,

gi_resolution type stxbitmaps-resolution,

l_extension type rlgrap-filename,

l_docid type stxbitmaps-docid.

gi_filename = 'C:\ENJOY.BMP'.

gi_name = 'ZTEST_SIGN'.

gi_object = 'GRAPHICS'.

gi_id = 'BMAP'.

gi_btype = 'BCOL'. "If u want black and white pass BMON

gi_resident = ' '.

gi_autoheight = 'X'.

gi_bmcomp = 'X'.

l_extension = 'BMP'.

perform import_bitmap_bds IN program SAPLSTXBITMAPS using gi_filename

gi_name

gi_object

gi_id

gi_btype

l_extension

' '

gi_resident

gi_autoheight

gi_bmcomp

changing l_docid

gi_resolution.

Thanks,

Rathish

Former Member
0 Kudos

Thank you so much Rathish.k

Your code helped me a lot.. I m giving you full points

Answers (5)

Answers (5)

0 Kudos

thanks...

Former Member
0 Kudos

Thanks mate, this helped me too.

brad_bohn
Active Contributor
0 Kudos

Well, don't use RSTXLDMC. Why folks are still using TIFF and standard texts I don't know. But the other assertions are correct, for a smartforms print, the image has to be in the system at runtime. However, you can easily load and destroy the image at runtime, and in between those points, render the image (BMP format) via smartform dynamically if you want. I've discussed it in other topics - the code you need for the load and destroy is available in the SE78 transaction and calling an image using a variable name in a smartform is straightforward. It's a strange approach though.

Former Member
0 Kudos

but the requirment is that it has to be uploaded programaticaly ( not using se78 )

arul_murugan
Active Participant
0 Kudos

Hi,

You can use the program RSTXLDMC to upload images for script or smart forms

Thanks

Arul

Former Member
0 Kudos

Thanks arul for the reply .!!

this report will store the image in the SAP R/3 system but i dont want to store any image into SAP R/3 system.

I just want to upload image from desktop and want to use it in smartfom.

Former Member
0 Kudos

Hi..

In smartforms images can generally be used in two ways:

1. Page background picture.

2. Graphic.

For both the usage the image must be present in SAP R/3 system, which can be done either via SE38 or using the program RSTXLDMC as mentioned in the previous posts.

Regards,

Karthik

Former Member
0 Kudos

One way is to import picture using se78 transaction into sap ,then using graphic object into smartform.