Application Development and Automation 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: 
Read only

Dynamic Image display in smartform

Former Member
0 Likes
4,812

Hellow,

dear experts i have one requirment to print student Identy card , i am using one input screen (screen 100) and one smartform ,

once user put the student id i am getting detail of student in input screen 100 now i have one push button (Print) once user click this button i m running smart form to display detail fetching from screen 100.

my question is how can i get image which is on screen. means employe photo.

please give me some sort of help for how to decalre image veriable to decalre in form interface or if any one have better sample to print Identy card please provide me,

Regards,

Neha .S

Thanks in advance.

Hellow,

dear experts i have one requirment to print student Identy card , i am using one input screen (screen 100) and one smartform ,

once user put the student id i am getting detail of student in input screen 100 now i have one push button (Print) once user click this button i m running smart form to display detail fetching from screen 100.

my question is how can i get image which is on screen. means employe photo.

please give me some sort of help for how to decalre image veriable to decalre in form interface or if any one have better sample to print Identy card please provide me,

Regards,

Neha .S

Thanks in advance.

8 REPLIES 8
Read only

Former Member
0 Likes
2,172

Hi Neha,

In Smartforms you have a node called Graphic. You can include graphics in smartform specifing following data:

- Name

- Object

- ID

You can have a look at the graphics in transaction SE78.

All you have to is to debug or check coding how the graphic is retrieved in the coding based on student number. Then pass it to Smartforms (or use the same retrieval logic in the form - first option is recommended).

Regards,

Marcin Cudo

Read only

0 Likes
2,172

Hi mecin,

my requirment is also smae but wht you trying to told is only for static , but i have 100 images how can i called them dynamically will you please explain in detail..

Read only

0 Likes
2,172

Hi,

but I did not say you have to use it as static.

You can define logic for retrieving graphic name and place its name in a variable. Then put this variable as NAME in object node (as far as I remember - you have to put variable name in &...&).

Kind regards,

Marcin Cudo

Read only

Former Member
0 Likes
2,172

Hi,

First we have to upload required images into SAP (using t-code smartstyles). once upload action completed, after that we have to get the person number from database table and have to retrieve respective image based on person number which one we got earlier.

try with the logica..it will work definitely.

Ram.

Read only

Former Member
0 Likes
2,172

Hi

Ram Suggesting is perfect.

We need to upload all the images first into SAP than only we can call the images dynamically based on employee num or any other condition.

Thanks

Surendra

Read only

0 Likes
2,172

Hi ,

Uploading the images could be done by

1) going to se78 transaction

2)Double-click on u201CGRAPHICSu201D node and click on u201CImport (F5)u201D to import the image

3)Select the file name by using the F4 functionality available. Name your graphic and enter a short description. If you have color image, select the radio button u201CColor Bitmap imageu201D. Click on tick mark to proceed.

4)The graphic is imported and is stored in u201CBusiness Document Serveru201D.

Regards,

mithun

Read only

Former Member
0 Likes
2,172

Hi Neha

Please find the below link :

[|]

for uploading images dynamically.

Thanks and Regards,

Rinzy Deena Mathews

Read only

Former Member
0 Likes
2,172

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.