‎2007 Jul 19 8:56 AM
hello All of U
Can any one give me a sample code on Creation of program for converting the invoices generated in PDF format to Customer Masters e-mail Address along with sending the same in FTP server as a PDF copy
Points for sure
‎2007 Jul 19 8:59 AM
hi
go to WIKI link IN SDN.
CLICK on ABAP GENERAL link in that.
there u will find the link for creating PDF invoices and send it by mail as an attachments
regards
ravish
<b>reward if useful</b>
‎2007 Jul 19 9:04 AM
please use the SAP standard program RSTXPDFT4 give the spool no as input.
OR
*Page : 1 / 2
*File : C DownloadZ_SDN_ADOBE_1.abap. Date: 09.05.2006
&----
*& Report Z_SDN_ADOBE_1
*&
&----
*&
*&
&----
report z_sdn_adobe_1.
parameter: i_carrid type sflight-carrid obligatory.
parameter: i_down type c as checkbox.
type-pools: abap.
start-of-selection.
data: ie_outputparams type sfpoutputparams.
if i_down = abap_true.
ie_outputparams-getpdf = 'X'.
endif.
call function 'FP_JOB_OPEN'
changing
ie_outputparams = ie_outputparams.
try.
data: i_name type fpname,
i_funcname type funcname.
i_name = 'ZZ_SFLIGHT'.
call function 'FP_FUNCTION_MODULE_NAME'
exporting
i_name = i_name
importing
e_funcname = i_funcname.
catch cx_fp_api_repository.
catch cx_fp_api_usage.
catch cx_fp_api_internal.
endtry.
data: isflight type zsflight_with_icon_data_tbl.
isflight = zcl_adobe_fill_sflight=>get_data( i_carrid = i_carrid ).
data: fp_docparams type sfpdocparams.
data: fp_formoutput type fpformoutput.
call function i_funcname
exporting
/1bcdwb/docparams = fp_docparams
sflight = isflight
importing
/1bcdwb/formoutput = fp_formoutput
exceptions
usage_error = 1
system_error = 2
internal_error = 3.
call function 'FP_JOB_CLOSE'
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
if i_down = abap_true.
data: filename type string,
path type string,
fullpath type string,
default_extension type string value 'PDF'.
cl_gui_frontend_services=>file_save_dialog(
exporting
default_extension = default_extension
changing
*Page : 2 / 2
*File : C DownloadZ_SDN_ADOBE_1.abap. Date: 09.05.2006
filename = filename
path = path
fullpath = fullpath ).
check fullpath is not initial.
data: data_tab type table of x255.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = fp_formoutput-pdf
tables
binary_tab = data_tab.
cl_gui_frontend_services=>gui_download(
exporting
filename = filename
filetype = 'BIN'
changing
data_tab = data_tab ).
cl_gui_frontend_services=>execute(
exporting
document = filename ).
endif.
regards,
Prabhu
reward if it is helpful.