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: 

how can i download a logo into a local file which is an include text in SAP

Former Member
0 Kudos

Hi,

I have a doubt.How can I download a logo which is an include text in SAP Script into any local file so that I can give the path of that logo.Please give me all possible alternatives.

Regards,

Smitha.

5 REPLIES 5

Former Member
0 Kudos

Hi Smitha,

1st you need to convert your Script into PDF.

You can use this FM 'CONVERT_OTF_2_PDF' for conversion.

Later you can download into local file.

****************

No need to download the LOGO part to local and again sending to PDF......

You need to do is just pass the parameters to that FM and it will take care of every thing.

See example.............

data: w_filesize TYPE i.

data wa_ssfcrescl TYPE ssfcrescl. "job output (among others otf data)

DATA: w_doctab_archive LIKE docs OCCURS 0 WITH HEADER LINE.

data i_tline TYPE TABLE OF tline WITH HEADER LINE.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

use_otf_mc_cmd = 'X'

  • ARCHIVE_INDEX =

IMPORTING

bin_filesize = w_filesize

TABLES

otf = wa_ssfcrescl-otfdata

doctab_archive = w_doctab_archive

lines = i_tline

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

OTHERS = 3.

IF sy-subrc NE 0.

w_retcode = 1.

MESSAGE i006(zvq).

ENDIF.

data: filepdf like rlgrap-filename.

  • Download the PDF file generated.

CALL FUNCTION 'DOWNLOAD'

EXPORTING

bin_filesize = w_filesize

filename = filepdf

filetype = 'BIN'

IMPORTING

act_filename = filepdf

filesize = w_filesize

cancel = cancel

TABLES

data_tab = i_tline

EXCEPTIONS

invalid_filesize = 1

invalid_table_width = 2

invalid_type = 3

no_batch = 4

unknown_error = 5

gui_refuse_filetransfer = 6

customer_error = 7.

*********

Simply paste your code in your drive prog..... like this.

paste it at the end i mean at the last stage of ur prog...

************

Thanks.

If this helps you reward with points.

Message was edited by: KDeepak

0 Kudos

Hi Deepak,

The logo is an include text in SAP Script ok.That logo I have to put in my pdf layout.So,I have to download the logo into local file and then give the path of that logo in my PDF Layout.

As you told where can I call the function module since I can't change my print program.I hope you understand my query.

Regards,

Smitha.

0 Kudos

hi deepak,

what smitha is talking about is converting scripts and smartforms into pdf using SFP transaction which is being done in SAP LABS (ERP 2007). no body out are using this now.

now thw problem is she already got print program which she should not change and interface also creted, only think she can do is design layout in tcode SFP.

there she was asked to put a logo which is an include text.

if she can download that text in PC, she can place the logi there by giving path.

but now her problem is how to download the logo to PC??

Former Member
0 Kudos

Q: Can I Print a logo on an Invoice?

A: Save a Logo using Paintshop Pro or Corel Draw as Tiff file. Use RSTXLDMC to convert the logo to standard text in SapScript. When the program is executed, the path and file name have to be correctly specified.

Process could be like the following:

Run RSTXLDMC

Enter file name C:\MAIL\COMPLOGO.TIF

Resolution for Tiff file

Absolute X-position

Absolute Y-position

Absolute positioning

Reserved height

Shift to right

UOM = CM

Text title

Line width for text = 132

Text name ZHEX-MACRO-COMPLOGO

Text ID ST

Text language = E

Postscript scaling

Width & Height according to PS scaling

Number of Tiff gray levels (2,4,9) 2

Then Create a new window 'COMP' with attributes;

Window COMP description Company Logo

Window type CONST

Left margin 7.00 CH window width 10.00 CH

Upper margin LN window height 8.00 LN

Finally in the text element , mention

/: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.

Please note that if object name is not indicated as 'ZHEX...', the logo may not be printed!

You will not be able to see the logo in a test print. The same will be printed in actual printout.

If you are using two logos in the same layout, the names of the logos should be unique. Say 'ZHEX-MACRO-LOGO1' and 'ZHEX-MACRO-LOGO2'. Else all the information will be overwritten.

If the logo is not EXACTLY TIFF 6.0 , the same will not be printed.

See OSS notes 5995, 18045, 39031 for some inputs.

Former Member
0 Kudos

Hi,

Check this prog....RSTXSCRP.

This is used to download/upload of forms and standard txt to local/from local.

Thanks.

If this helps you reward with points.

Message was edited by: KDeepak