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: 

Conversion of Layout to PDF

former_member191111
Participant
0 Kudos

Hi !

How can i convert the Layout of a form to PDF format

than send it by mail ?

Is it possible with OPEN_FORM Function Module ?

Regards

Sachin S Murab

1 ACCEPTED SOLUTION

former_member214131
Active Contributor
0 Kudos

Hello,

Please follow the steps:

1. Mark 'X' in the field TDGETOTF of the structure ITCPO of the FM: OPEN_FORM.

2. You will get the OTF data of the form in tables parameter of the FM: CLOSE_FORM.

3. The OTF data may be converted to PDF data by FM: CONVERT_OTF_2_PDF.

4. This PDF data may be downloaded by FM: WS_DOWNLOAD or GUI_DOWNLOAD.

5. You can send this as attachment as a mail by FM: SO_NEW_DOCUMENT_ATT_SEND_API1. Detailed documentation is available for this FM.

I hope this helps you.

Regards, Murugesh AS

Message was edited by: Murugesh Arcot

6 REPLIES 6

Former Member
0 Kudos

Hello Sachin,

Part of your problem can be solved using

FM:CONVERT_OTF_2_PDF

to convert the sapscript into PDF.

Samir

former_member214131
Active Contributor
0 Kudos

Hello,

Please follow the steps:

1. Mark 'X' in the field TDGETOTF of the structure ITCPO of the FM: OPEN_FORM.

2. You will get the OTF data of the form in tables parameter of the FM: CLOSE_FORM.

3. The OTF data may be converted to PDF data by FM: CONVERT_OTF_2_PDF.

4. This PDF data may be downloaded by FM: WS_DOWNLOAD or GUI_DOWNLOAD.

5. You can send this as attachment as a mail by FM: SO_NEW_DOCUMENT_ATT_SEND_API1. Detailed documentation is available for this FM.

I hope this helps you.

Regards, Murugesh AS

Message was edited by: Murugesh Arcot

0 Kudos

Hi friends

their is very simplest way to convert and document in to PDF file .

step 1. Goto ur printer settings in ur computer and install a printer with the name generic/textonly <-no space in this name . and choose port print to file .

step 2. Then goto tcode SPAD in ur SAP system and define a printer with name PDF AND GIVE DEVICE TYPE AS PDF1 : PDF ISO Latin-1 .

ACCESS METHOD -> PRINTING ON FRONT END COMPUTER .

HOST PRINTER -> GENERIC/TEXTONLY .

NOW U CAN USE DEVICE NAME PDF TO PRINT ANY FILE IN PDF FORMATE .

REGARDS

SIDDHARTH

0 Kudos

Hi Murugesh !

I am unable to get OTFDATA from Close_form FM .

In Open_Form I am supplying ITCPO Through Options Parameter .

In ITCPO-TDGETOTF = 'X' only .

Rest of Parameters are Form Name,Langu .

Looking forward your response

Regards

sachin S M

0 Kudos

Hi Murugesh Arcot !

With the Help of FM SX_OBJECT_CONVERT_OTF_PDF

Its Successfully Converted into PDF .

Thanks a lot .

Regards

Sachin S M

Message was edited by: Sachin S M

0 Kudos

Hi Sachin,

Can you give an example as how to use that FM, please. Because I don't have the documentation.

Thanks