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: 

4.6C dynamic picture in sapscript for HR

Former Member
0 Kudos

On our fileserver we had pictures of all employees.

Now I must created a sapscript for HR, which includes a picture of the employee. When they print the sapsrcipt for the personalnumber 4711, there must come the picture from the employee 4711 and so on.

Has anyone an idea th do this?

Kind regards

Jens

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Sure, you must have a tied between the images and the employee. Maybe the images names are the employee number. For example, 4711.bmp. Do you want to load all of the images into SAP all at once? If so, do this using SE78. If you want to upload the images at runtime, use it in the sapscript, then delete it, you can do that too, but it will be considerbly more work. I would suggest the uploading all of the images into SAP. Once you have the images in SAP, it is really easy to include it. You will need a variable for the NAME of the image to use in the BITMAP statement.


BITMAP &IMAGENAME& OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100

Here you can see that IMAGENAME is the variable which is holding the name of the image. You can fill this variable in the sapscript print program.

Regards,

Rich Heilman

18 REPLIES 18

Former Member
0 Kudos

Hallo Jens,

You need to maintain a Custome table with Bitmap names and Emplyoee Id (You need to uplaod ont o SAP system all the Images).

In Sap script pass the BITMAP name as Variable

Ex:

BITMAP &PHOTO& OBJECT GRAPHICS ID BMAP TYPE BMON DPI 600

You can pass via scipr depending on Emplyooe Id or use Perform in Script Directly.

Rgds,

Mano Sri

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Sure, you must have a tied between the images and the employee. Maybe the images names are the employee number. For example, 4711.bmp. Do you want to load all of the images into SAP all at once? If so, do this using SE78. If you want to upload the images at runtime, use it in the sapscript, then delete it, you can do that too, but it will be considerbly more work. I would suggest the uploading all of the images into SAP. Once you have the images in SAP, it is really easy to include it. You will need a variable for the NAME of the image to use in the BITMAP statement.


BITMAP &IMAGENAME& OBJECT GRAPHICS ID BMAP TYPE BMON DPI 100

Here you can see that IMAGENAME is the variable which is holding the name of the image. You can fill this variable in the sapscript print program.

Regards,

Rich Heilman

0 Kudos

Hi,

the tied between the image and the employees exists. I don´t want to load all the images.

I want to upload the images at runtime, so I got the newest images, and I have no problems with changes of the images.

Did you havean example, how I can upload the image at runtime?

Kind Regards

Jens

0 Kudos

Upload Runtime as far i know not possible, Even it is Imagine doing on your production system Not a Hot idea.!!

0 Kudos

Jens, it is possible. We actually do this for a custom process at my company. The user creates a autocad drawing and saves it as a .bmp on a server. The ABAP program knows which file to get and uploads it to SE78 without user interaction, and then it is included in a sapscript. As long as the images are not really huge you might be able to get away with it. What I actually did to achieve this is stole some code from the SE78 transaction. Email me for the code.

Regards,

Rich Heilman

0 Kudos

Jens, I just sent the sample program to your email address.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

it works, but ...

It is possibel to unload .jpg files?

How can I change the size of the image in sapscript?

Kind Regards

Jens

0 Kudos

Only .bmp and .tif The images must be the size that i needs to be before you upload to SAP. You have no control once it is uploaded.

Regards,

Rich Heilman

0 Kudos

Jens, it is possible. We actually do this for a custom process at my company. The user creates a autocad drawing and saves it as a .bmp on a server. The ABAP program knows which file to get and uploads it to SE78 without user interaction, and then it is included in a sapscript. As long as the images are not really huge you might be able to get away with it. What I actually did to achieve this is stole some code from the SE78 transaction. Email me for the code.

Regards,

Rich Heilman

Hello Rich May I also aks you for the code I'm dealing now with the same problem Client has the pictures maintained in Material Master I must while running the Smartform read this picture from material master so simulate SE78... I wll be really greatefull for code

my e-mail abapka@op.pl

0 Kudos

Hello Rich May I ask you for the code to download pictures to simulate se78? My email is verao@osram.com.mx Thanks in advance

0 Kudos

Hi Rich,

I am facing a similar situation where I got to upload images created by autocad dynamically. I believe you have some program related to this. Can you please share with me. My email: saprakesh@yahoo.co.in

Thanks in advance,

Regards,

Rakesh

Message was edited by:

Rakesh Ramakrishnan

0 Kudos

Hello plz i to want to upload Product image on to smart form Dynamically... plz can u sen me that code... my mail id is skferozi4@gmail.com

0 Kudos

hello Can i get the code Rlated to Displaying Product image dynamicall on to the smart form.

0 Kudos

Hi Rich..

We have the same problem . Could you please e-mail the code.

We upload employees pictures. But we can't call ths picture dynamic in smart form.

Thanks a lot.

gulhizar.kircali@astron.yasar.com.tr

0 Kudos

Please could you email the solution to me as well, as we have a client who would like a product image printed on an order confirmation.

jenny.veo@morse.com

thank you

0 Kudos

Dear Heilman

can we take PA30 image to SmartForms

if so please let me know

n e l s o n . r o d r i g o @ c a m o p l a s t s o l i d e a l . c o m

thanks in advance

Former Member
0 Kudos

Hello Rich,

We would also want to display the employee picture in our Employee Profile Sapscript report without storing the pictures in SAP. Can you send me the code? I am sorry but I cannot post this message with an email address, but you can view it in my profile.

Thank you!

0 Kudos

could you paste the code here as a post?

Cheers, Lars