cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically import graphics for smartforms printing?

Former Member
0 Kudos

Hello everyone,

I have to do a smartform with dynamic graphics in it. The graphics come from a webservice and are runtime-generated, so I cannot import them with SE78, it has to be done dynamically. I can get the image as .tif, so conversion is not necessary.

How can I add thess images directly via abap-code at runtime? Are there any function modules or other things I can use?

Thanks in advance,

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stefan,

I have done this in the past, but let me assure you it is not very straight forward and not the most efficient approach performance wise.

Also, you have to be at least on a 6.40 system - I struggled to deploy it to a 6.20 instance - to get this to work...

We printed charts generated in a custom developed QA BSP application via SSF (transformed into PDF); this was necessary because the print of the BSP from the browser was not acceptable (go figure ).

What I basically did, was putting a static reference to a graphic stored in SE78 into my Smartform. Every time the SSF is called, I update the graphic in SE78 programatically BEFORE the SSF is displayed (yes, you have to consider multiple users, locking etc.).

You might be better off than we were since in our case the charts created in BSP were in GIF format which could not be used for the upload in SE78; we had to convert them first to TIFFs through the IGS image converter which takes forever. Given that you already got TIFFs, my performance concern above might not apply to you.

Let me know whether this is what you are looking for and I can send you some code samples...

I guess I am preaching to the choir, but if you have it set up and are on a ≥ 6.40 system, you might want to look into Adobe Forms instead which allows "real" dynamic graphics.

Cheers,

Guenther

Former Member
0 Kudos

Hi Guenther,

unfortunately we have a 6.20 system, and Adobe Forms will not be available to us for some years.

Everything would have been a lot easier, I hadn't even have to do the chart graphics outside SAP, and we would have saved a lot of time and nerves. But I cant't do anything about it so we have to live with it.

Your solution sounds pretty much like the one I would like to have.

When the user wants to generate the .pdf for printing inside my BSP app I will fetch the images in .bmp format from the graphics webservice, and then import them in some way to the graphics repository. I already have them stored as XSTRING in a variable, but the importing issue is the real crux.

I would be very happy if you could send me some helpful code.

Regards,

Stefan

Former Member
0 Kudos

Hi Stefan,

Please send me an email at guenther.schober@allstate.com and I will forward you some code.

Cheers,

Guenther

Former Member
0 Kudos

Hi Stefan/Guenther

I have seen your conversation and i would like to know more details.

My requirement is:

We are having a retail store and when the customer buy from the store, they user credit card to pay for the items. In the sales order, signature has to come as a image file. We are using a third party software to convert the signature into .jpg image and will be stored in the application server (/usr/sap/images/..).

When they print the sales order how to bring the image dynamically to show in the sapscript. How do i link the image to the sales order. Do we have to follow any rules for that to identify. Also need to check whether we need to use se78 or we can upload direct from the application server.

Can you pl. send me the code related to that also advice how to proceed.

My email id: ktabhinav@gmail.com

Hope to hear from you soon. This request is very urgent.

Many thanks in advance.

regards

Thiru

Answers (0)