cancel
Showing results for 
Search instead for 
Did you mean: 

Print DMS image in SApScript

Former Member
0 Kudos

Hi,

I'm looking about the way to print an image uploaded to DMS with tcode CV01N on SAPScript form.

Any one could send me an example.

I try with that code but without success:

Doc Type: DTC

Docname: ADTESTE

Doc Part: 000

Version: 00

INCLUDE '000DTCADTESTE 00000' OBJECT TEXT ID ST

I try too with a doc name '0000000000000000000000001' but without success.

Any image is displayed on SAPScript layout.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Welcome to SDN...

do u want to print image in tif or bmp format?

to display image...

/: BITMAP 'ENJOY' OBJECT GRAPHICS ID BMAP TYPE BCOL

ur code resembles that u r inserting a Standard text but not the image...

Regards

SAB

Former Member
0 Kudos

Thanks for your fast reply..

i think that the code you include only work's with images uploaded by tcode SE78.

I have the images on DMS uploaded with CV01N and attached to Production Order.

Could you confirm that I must use "BITMAP" command to images uploaded on DMS?

Edit: The image have JPG format, but could be converted if necessary

Thanks in advance

Message was edited by:

António Almeida

Former Member
0 Kudos

HI,

I tested here for standard text.... when u want display a image that should be in Document server uploaded with SE78.

You can add a image and also text in Standard Text file.

In standard text it take the BITMAP command along with the custom text.

and in sapscript u can use INCLUDE to display standard text. ( which has Image too).

i believe u need to upload the images in Document server.

As per my knowledge, Sapscript takes only BMP and TIF files.

Regards

SAB

Former Member
0 Kudos

Hy Syed A

You solution was correct and I use them regularly to include company Logo's.

My actual problem was that I need to attach one image to Production Order (CO02) and for that i think the unique solution passes from DMS.

With the images on DMS I could not find any solution to include them on SAPScript

I'm start to thinking that this is not possible

Regards

Former Member
0 Kudos

Hi António,

have you found any solution to your problem (to print out images on dms with SAPScript or Smartforms?) I've got the same problem here. Maybe there is a solution when we try to print the images via frontend application ?!

Best regards!

Andreas

Former Member
0 Kudos

Hello,

I found a solution to print any jpg, tif, bmp etc. via frontend application (WIN XP). It's not exactly the answer to the question of this Thread, but anyway it could be helpful:

In my program I use the following Steps:

1.) To identify the relationship between the SAP-Object and the documents use FM "BAPI_DOCUMENT_GETOBJECTDOCS" .

2.) To check out and save the document to the Frontend PC use FM "BAPI_DOCUMENT_CHECKOUTVIEW2" This FM gives back the name and the path where the document has been saved at the Frontend PC.

3.) to print out the Document use "CALL METHOD cl_gui_frontend_services=>execute".

You have to commit at least two parameters (Application and Parameter)

Application should be defined like this:

Application = 'C:\WINXP\system32\rundll32.exe'.

The parameter field has to be build out of three parts:

parameter1 = 'C:\WINXP\system32\shimgvw.dll,ImageView_PrintTo /pt "'.

parameter 2 = path and name of the image as a result of FM BAPI_DOCUMENT_CHECKOUTVIEW2 (for example "lt_files-docfile")

parameter3 should be defined like this:

parameter3 = '" "
RSPGATE1\PN0349_T630"'.

(RSPGATE1\PN0349_T630 ist the name of my printer).

CONCATENATE parameter1 lt_files-docfile parameter3 INTO parameter.

After that you can print any picture via the Frontend PC.

CONS:

- Every picture use a new sheet of paper

- It's not a "SAP only" solution

- there is no possibility to vary the layout of the printout

PROS:

- The picture size will be optimised automatically by windows

You can also try to use mspaint for the print. The command line instruction should look like this: c:\winxp\system32\mspaint.exe /pt C:\temp\picture001.jpg

Best regards

Andreas Puetz

Former Member
0 Kudos

Hello andreas,

These solutions not resolve my problem, because I need to include the picture on the SAP script layout.

I use one solution that still working and consists:

When I associate the picture with the document I use a report to upload one image to "Sap Script Graphics Admin" Tcode SE78 and store a "key" name on a field document.

When I need to print the image I just get the image key name and get that image to sap script with the instruction "BITMAP".

By the way many thanks for your idea.

Regards

Antonio

Former Member
0 Kudos

Hi Antonio,

this solution is very interesting. Is it possible to post your solution to this Thread, or could you please send me an email with this report?

My mail adress is:

a.puetz@wtal.de

thank you very much!

Andreas

Former Member
0 Kudos

Hello Antonio,

I have the same problem as you have had 2007.

Can you please post or send me your solution.

Please send to:

frust @ gmx.de

Thanks

Arnfried

Edited by: Arnfried Doetsch on Dec 18, 2009 7:32 AM

Sandra_Rossi
Active Contributor
0 Kudos

use RSTXLDMC program to upload a BMP image into SE78. If program is running in background, file is from application server, and when in dialog, it comes from presentation server.