2006 Jan 03 9:57 AM
Hello all!
I would like to know whether it's possible to show graphics in smart forms using the function HR_IMAGE_SHOW.
Thanks a lot!!
Hajar
2006 Jan 03 10:58 AM
Hi Hajar,
See this code:
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = P_PERNR
P_TCLAS = P_TCLAS
P_BEGDA = P_BEGDA
P_ENDDA = P_ENDDA
IMPORTING
P_EXISTS = L_EXISTS
P_CONNECT_INFO = L_CONNECT_INFO
EXCEPTIONS
error_connectinfo = 1
OTHERS = 2.
Regards,
Raj
2006 Jan 03 10:05 AM
Hi,
I think it is not possible. you need to upload the image through se78 and then you can show using smart forms.
thanks
vijay
2006 Jan 03 10:09 AM
Thanks a lot Vijay!
Yes i know this method but the problem is that the images i have are jpeg. If i want to upload them through the se78 i need to convert them all to .bmp or .tif and i don't wanna do that.
If uploading images through the se78 is the only method is there a way to check whether the image is uploaded or not.
Thanks a lot!
hajar
2006 Jan 03 10:25 AM
you can view the print preview(press F8) from se78 itself it is available if image is uploaded
2006 Jan 03 10:36 AM
Thanks a lot for your help!
Maybe i was not that clear. I have created a smart form where i need to show the pictures of the employees. To do so i uploaded some of them into the se78 (these graphics are named by the employees pernr) and i used the graphic node in the smart form in order to display them. However, there are some employees that do not have their pictures uploaded. So, when i execute the smart form i get an error stating that the graphic was not found. How can i solve this problem? I thought about adding some ABAP code where i will check if the graphic exists before printing it. However, i don't know how to do that.
All your suggestions are welcomed!!
Yours,
Hajar
2006 Jan 03 10:07 AM
2006 Jan 03 10:42 AM
Hi Hajar,
Add a 'program lines' node and check if the graphic exits in the system, if yes, then you set a flag,
Use 'Alternative' node, check the flag and then display the graphic.
Regards,
Raj
2006 Jan 03 10:45 AM
Thanks a lot Rajasekhar!
This is what i was thinking about too. But the problem is that how to check if the graphic exists in the system. Is there any function that i need to call??
Thanks a lot.
Hajar
2006 Jan 03 10:58 AM
Hi Hajar,
See this code:
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = P_PERNR
P_TCLAS = P_TCLAS
P_BEGDA = P_BEGDA
P_ENDDA = P_ENDDA
IMPORTING
P_EXISTS = L_EXISTS
P_CONNECT_INFO = L_CONNECT_INFO
EXCEPTIONS
error_connectinfo = 1
OTHERS = 2.
Regards,
Raj
2006 Jan 03 11:29 AM
Can i use this function to check if the image exists in the se78 too???
Thanks a lot.
Hajar
2006 Jan 05 9:34 AM
Can i use this function to check if the image exists in the se78 too???
Does anyone of you have an answer for that??
Thanks a lot.
Hajar
2006 Jan 05 11:05 AM
Hi Hajar,
You could check if the image exists in table STXBITMAPS
Regards,
Ville
2006 Jan 06 10:31 AM
Thank you very much!!
The image exists in the table cited above. However, I still have a question can we dispaly jpeg images in a smart form.
Thanks a lot for your help!
Hajar
2006 Jan 06 10:34 AM
No,
you cannot. convert to BMP and can show it in smartforms.
thanks
vijay