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: 

Smartform and acrobat

Former Member
0 Kudos

Hi All ,

I have developed a report on incometax and using smartforms .The output is coming as required .

Now the new requirement is that I have to get the same output in acrobat format as well at a particular locaiton in system as C drive .

Later I have to send the mails of that acrobat output to the employees .

My TL as asked me to take selection screen with 2 check boxes.1) for dispaly in smart forms and 2) for acrobat form .So which ever the check box user selects the out put shld be displayed in that format .

Thanks

I want to know if there is any function module used to convert the out put to acrobat and later send a mail.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Refer to the program RSTXPDFT4 for some help.

And i do not remember the name, but there is a FM which can solve your purpose.

Regards,

Santosh.

4 REPLIES 4

Former Member
0 Kudos

Refer to the program RSTXPDFT4 for some help.

And i do not remember the name, but there is a FM which can solve your purpose.

Regards,

Santosh.

Former Member
0 Kudos

Acrobat form / adobe forms can be designed using the tcode SFP.

Refer :

Former Member
0 Kudos

Hi Santosh,

You can use the FM 'CONVERT_OTFSPOOLJOB_2_PDF' (OTF format)or 'CONVERT_ABAPSPOOLJOB_2_PDF' (Non OTF) for converting the normal output into acrobat form .

These FM;s will return a table called as PDF which will contain the output in acrobat form.

You can then pass this as an input to Function Module

'SO_NEW_DOCUMENT_ATT_SEND_API1' & the reciever list to send an email.

Regards,

Chetan.

PS: Reward points if you find this helpful.

raguraman_c
Active Contributor
0 Kudos

Hi,

This shuld help you check this out.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

max_linewidth = 132

IMPORTING

bin_filesize = ws_bin_size

TABLES

otf = i_otf

lines = i_lines

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

err_bad_otf = 4

OTHERS = 5.

IF sy-subrc <> 0.

flg_exit = 'X'.

MESSAGE i050 WITH 'Error converting to PDF format'.

EXIT.

ENDIF.

  • Get the download path

PERFORM get_download_path CHANGING ws_filename.

if flg_exit = 'X'.

EXIT.

endif.

  • Download

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

bin_filesize = ws_bin_size

filename = ws_filename

filetype = 'BIN'

TABLES

data_tab = i_lines

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22.

IF sy-subrc <> 0.

MESSAGE i050 WITH 'Error while File download'.

flg_exit = 'X'.

EXIT.

ELSE.

MESSAGE i050 WITH 'File downloaded successfully '.

flg_exit = 'X'.

EXIT.

ENDIF.

or go through this link.

http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f...

or go through this link as well.

http://sap4.com/wiki/index.php?title=Genera_PDF_a_partir_de_Smartforms

Feel free to revert back.

--Ragu