Application Development and Automation 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: 
Read only

function module to deliver svript output to PDF format

Former Member
0 Likes
1,045

hi all,

1) please tell me if ther is any FM to output sciprt

into a PDF format (user wants script o/p in PDF file format) .

2) is there any FM to convert date field to an integer

thanks in advance,

dharma

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
893

FM

Convert_OTF

<b>also check sample programs

RSTXPDF4/5.

in case of Scripts :

1.u have to get scripts data which in OTF format, then u have to call CONVERT_OTF into PDF format.

by passing this variable u can catch up OTF data of the script.

ITCPO-TDGETOTF = 'X'.

Return of OTF table.

No printing, display, or faxing</b>

2.

CONVERT_DATE_TO_INTERN_FORMAT

regards

Prabhu

FM

Convert_OTF

<b>also check sample programs

RSTXPDF4/5.

in case of Scripts :

1.u have to get scripts data which in OTF format, then u have to call CONVERT_OTF into PDF format.

by passing this variable u can catch up OTF data of the script.

ITCPO-TDGETOTF = 'X'.

Return of OTF table.

No printing, display, or faxing</b>

2.

CONVERT_DATE_TO_INTERN_FORMAT

regards

Prabhu

6 REPLIES 6
Read only

Former Member
0 Likes
894

FM

Convert_OTF

<b>also check sample programs

RSTXPDF4/5.

in case of Scripts :

1.u have to get scripts data which in OTF format, then u have to call CONVERT_OTF into PDF format.

by passing this variable u can catch up OTF data of the script.

ITCPO-TDGETOTF = 'X'.

Return of OTF table.

No printing, display, or faxing</b>

2.

CONVERT_DATE_TO_INTERN_FORMAT

regards

Prabhu

Read only

anversha_s
Active Contributor
0 Likes
893

hi,

FM is CONVERT_OTF.

CALL FUNCTION "CONVERT_OTF"

EXPORTING FORMAT = "PDF"

IMPORTING BIN_FILESIZE = FILE_LEN

TABLES OTF = OTFDATA

LINES = PDFDATA

EXCEPTIONS ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

OTHERS = 4.

for any clarifiaction pls mail me.

pls reward points, if this helped u.

regards,

anversha.

[email protected]

Read only

0 Likes
893

hi,

if u try to attempt to convert a DATE value into an ABAP variable with type I, the system will be unable to perform the conversion.

regards,

anver

Read only

Former Member
0 Likes
893

Hi,

After sending SAP Scripts to the spool request (SP01), you can use the SAP standard spool PDF conversion program.

<b>RSTXPDFT4 - Convert SAP Script to PDF files</b>

See the below thread, it will explain how to convert Script output to PDF format

for your Second Question, see the below link, and see the <b>DATES</b> heading for all dates function module

http://www.sap-img.com/abap-function.htm

See the below link also for date conversion

http://www.sap-basis-abap.com/sapab015.htm

Regards

Sudheer

Read only

Former Member
0 Likes
893

Hi,

in close_form fill otf structure

use FM convert_otf_pdf and send imported table

to Fm SX_OBJECT_CONVERT_OTF_PDF

refer below link

REgards

Amole

Read only

Former Member
0 Likes
893

Hi Dharma,

In the Function Module <b>CLOSE_FORM</b>, there is a TABLES parameter called OTFDATA. Give a variable to store the SAPScript output in OTF format. Now you can use CONVERT_OTF Function Module to convert the OTF data to PDF format.If you want to store it in your desktop you can use the Function Module GUI_DOWNLOAD.

Just go through this link for the entire source code.

Regards,

SP.