01-23-2012 5:44 AM
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.
01-23-2012 5:57 AM
01-23-2012 7:07 AM
i did not stored images i am calling images from database see my below code you can get the code for displaying image.
01-23-2012 6:01 AM
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.
01-23-2012 6:06 AM
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.
01-23-2012 9:28 AM
I need only to display image which is come from my screen painter plz i realy need badly.
01-23-2012 10:13 AM
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.
01-23-2012 11:57 AM
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.
01-24-2012 6:13 AM
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.
01-25-2012 4:30 AM
Hellow experts,
i didnt got any proper soltion , please any body help me on this i really got trouble.
01-25-2012 10:44 AM
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.
02-11-2012 5:54 AM