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: 

Smartforms dynamic image.

former_member375795
Participant
0 Kudos

How to give Image path dynamic in smart forms.

requirement like that

If some verify the document , so that there related verify signature have to show when i take  print out

person who do signature

sme

ssc

je

whole there signature have to come in dynamic

1 ACCEPTED SOLUTION

adrian_mejido
Contributor
0 Kudos

Hi Alok,

You can do this:

1º You have to define a global variable in your smartform like this:

               VL_IMAGEN TYPE STRING

2º Then you have to create a Graphic in your smartform and in the name of the image you have to put

&VL_IMAGEN&.

The you can implement the logic to fill the variable VL_IMAGEN, for example:

if    author = me

   vl_imagen = 'MYSIGN'.      

ELSE.

  vl_imagen = 'OTHERSIGN'.

ENDIF.

Best Regards

3 REPLIES 3

adrian_mejido
Contributor
0 Kudos

Hi Alok,

You can do this:

1º You have to define a global variable in your smartform like this:

               VL_IMAGEN TYPE STRING

2º Then you have to create a Graphic in your smartform and in the name of the image you have to put

&VL_IMAGEN&.

The you can implement the logic to fill the variable VL_IMAGEN, for example:

if    author = me

   vl_imagen = 'MYSIGN'.      

ELSE.

  vl_imagen = 'OTHERSIGN'.

ENDIF.

Best Regards

Former Member
0 Kudos

I think first you have to upload all the images trough se 78,

then follow these steps Print Images Dynamically using Smartforms!

0 Kudos

Hi,

1.Install IrfanView to computer.

2.Create windows bat file for changing resolutuion and size of image using IrfanView. Cause of this standart CL_IGS_IMAGE_CONVERTER is not good in image type conversion. You can convert your image file to 256 color BMP with IrfanView scripts.

For example you can convert your image with a windows bat file :

i_view64.exe c:\temp\source.jpg /ini="c:\temp" /advancedbatch /convert=c:\temp\target.png
i_view64.exe c:\temp\target.png /bpp=8 /resize=(330,495) /convert=c:\temp\target.bmp

3. After image type conversion you can upload yours image to BDS programmaticaly.

PERFORM import_bitmap_bds
IN PROGRAM saplstxbitmaps
USING gv_res1
gv_file1
'GRAPHICS' "Object
'BMAP' "ID
'BCOL' "B/W
'BMP' "Extension
'TargetName'
space
' '
' '
CHANGING l_docid
l_resolution.

4. You can use "TargetName" object in any form like SapScript or SmartForms. You can view yours image in SE78 with "TargetName" object id.

Regards.