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: 

Smart from Dynamic Image issue

Former Member
0 Kudos

Helllow experts,

I am new to ABAP , i made one Form (screen Painter) to show the Employe Basic Data like NAME , DEPT ,IMAGE OF EMPLOYEE, From data base. Now i need to print that form with image so i made one smart form and passed the values to smart forms once user hit the PRINT pushbutton.

My issue is, How can i get the Image from Form to smartForm , means from screenpainter to smartform, Image is coming form Database, plz help me with suitable simple steps.

Thanks in Advance.

11 REPLIES 11

Former Member
0 Kudos

how have you stored the images?

0 Kudos

i did not stored images i am calling images from database see my below code you can get the code for displaying image.

Former Member
0 Kudos

Hi,

Better to write your code for image in smart form itself. then no need to pass parameter from form to smart form.

Just simply declare image varaible as global variable in smartform and get the image from respect location or table. pass that variable value to respective window.

Ram.

0 Kudos

thanks for quick responce,

but can you please specify you query i did not get se this is my below seniruo

ZEMMPIIC --Progrme

peace of code for displaying image in screenpainter means form not smartform


FORM GET_PIC.
DATA: REPID LIKE SY-REPID.
REPID = SY-REPID.
IF PICTURE IS INITIAL.
*Object To Create the Custom Container
CREATE OBJECT PICTURE
EXPORTING
PARENT = DOCKING_CONT.
CHECK SY-SUBRC = 0.
*Method To Set Position of Image
CALL METHOD PICTURE->SET_POSITION
EXPORTING
HEIGHT = 40
LEFT = 10
TOP = 10
WIDTH = 70.
*Method To Set Display Mode Fit to Container
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
ELSE.
*Function Module To Reset Image
CALL FUNCTION 'HR_IMAGE_RESET'
EXPORTING
HANDLE = HANDLE
EXCEPTIONS
INVALID_HANDLE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
ENDFORM. "Get_pic

Noe please guied me how to do in samrtfrom. its really thankfull to you.

0 Kudos

I need only to display image which is come from my screen painter plz i realy need badly.

0 Kudos

Hi

Once print button is clicked u r calling form in u r program. So from the screen u r are passing all data to form.

In Form take one inporting parameter to pass image name from the screen painter. In Form,pass this image name to logo window.

Regards,

Raghu.

0 Kudos

Thanks for response but i did not got your point will you please specify ,

i have following seniro

i have scren painter (Input form)

i developed one Zprograme to display image and employe detal on form

i developed one smartform and ,in form interface i decalred the fielld which i have to pick

but i dont know how to decalre the image field plz help me out for this

thanks.

0 Kudos

thx for your response Raghavender Momula

you understand my seniro completley can you tell me how can i take importing paramter, i tried but its showing error that char (20) is unkown i decalre , PICNAME LIKE CHAR(20) in Form Interface Import paramter, plz help me out.

Thanks.

0 Kudos

Hellow experts,

i didnt got any proper soltion , please any body help me on this i really got trouble.

Former Member
0 Kudos

Hi

If the stored image is of type HRTMC_XSTRING, then you can directly select this from the table and pass to the form and can print the image.

Thanks and regards,

Rinzy Deena Mathews.

Former Member
0 Kudos

answered