cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script PDF Attachment getting disalligned?

Former Member
0 Kudos

Hi All,

I have created a new o/p type for sending sales order as a pdf attachment in an email which sends the SAP Script layout in the pdf format. The issue is it correctly triggers a mail and sends out a pdf attachment, but the problem is with the allignment of text and some fields on the o/p, they are getting left alligned. The print out is coming properly but only the pdf attachment is giving such an error.

I tried changing the font family and font size but dint help.

The page format is landscape, please share your ideas as to what i can do more that would resolve this issue.

Looking forward to your quick response.

Regards,

MD.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I guess PD which you generated having some issues. Probably you can try to convert your output type to PDF format by using following instructions.

SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.

Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.

It look exactly like what you see during a spool display.

Please note that it is not restricted to sapsciprts spool only. Any reports in the spool can be converted using the program 'RSTXPDFT4'.

Then attach this PDF file to email.

Hope this works for you.

Thanks...........

naveen_kumar116
Active Participant
0 Kudos

Hi,

Use this logic it may help you.

It will move your print preview into spool. Based on the spool number it will convert that layout into PDF.

CONSTANTS:c_rq0name LIKE tsp01-rq0name VALUE 'ORD'.

DATA : wa_ssfcompop TYPE ssfcompop,

wa_ssfctrlop TYPE ssfctrlop,

w_rqident TYPE tsp01-rqident.

CONCATENATE p_vbeln sy-datum sy-uzeit INTO g_title SEPARATED BY '_'.

wa_ssfcompop-tddataset = c_rq0name.

wa_ssfcompop-tdcovtitle = g_title.

wa_ssfcompop-tddest = 'LOCL'.

wa_ssfcompop-tdnewid = 'X'.

wa_ssfcompop-tdimmed = ''.

wa_ssfctrlop-no_dialog = 'X'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = formname

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

MOVE p_vbeln TO name_text.

CALL FUNCTION fm_name

EXPORTING

control_parameters = wa_ssfctrlop

output_options = wa_ssfcompop

user_settings = ''

TABLES

it_final = i_tab

.

SELECT SINGLE rqident INTO w_rqident

FROM tsp01

WHERE rq0name = c_rq0name

AND rqowner = sy-uname

AND rqtitle = g_title.

  • IF sy-subrc EQ 0.

IF sy-subrc EQ 0.

SUBMIT rstxpdft4 WITH spoolno = w_rqident

WITH p_file = v_path

AND RETURN.

ENDIF.

Cheers,

Naveen.

rejish_balakrishnan
Contributor
0 Kudos

Hi,

IS there any overlapping technique used by you?

Also , You might have to define the file type according to file

type conversion rules of your exchange connector.

Apparently your exchange connector doesn't encode out going documents. I'd

be very interested in knowing how your system is set up. IS your exchange

connector encodes outgoing emails with UTF ?