CALL FUNCTION gdf_fm_name1
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = gds_ctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = gds_outopt
USER_SETTINGS = ' ' "important
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = gdt_otfdata
* JOB_OUTPUT_OPTIONS =
TABLES
gdt_form_data = gdt_form_data_fax
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
DATA: gds_docdata TYPE sodocchgi1,"Data of an object which can changed
gds_ctrlop TYPE ssfctrlop, " Smart Forms: Control structure
gds_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer options
gds_otfdata TYPE ssfcrescl, " sF: Return value at end of formprinting
gds_reclist TYPE somlreci1, "SAPoffice: Structure of the API Recip List
gds_pdf_tab TYPE tline. " Workarea for SAP Script Text Lines
gds_ctrlop-preview = ''."Print preview
***gds_ctrlop-no_open = ''.
***gds_ctrlop-no_close = 'X'.
*gds_ctrlop-no_dialog = 'X'.
gds_ctrlop-NO_DIALOG ='X'.
gds_ctrlop-device = 'PRINTER'."ESKERPRDGDR'.
***control_parameters-no_dialog = 'X'.
***control_parameters-no_open = 'X'.
***control_parameters-no_close = 'X'.
*gds_outopt-TDDEST = 'ESKP'."'PRINTER NAME'.
gds_outopt-TDPRINTER = 'HPLJ4'."Spool: Device type name
gds_outopt-TDNOPRINT = ''. "NO PRINT
gds_outopt-tdnewid = 'X'. "New Spool Request
gds_outopt-TDIMMED = 'X'. "Print Immediately
gds_outopt-TDNOPREV = ' '. "No print preview
gds_outopt-TDDATASET = 'FAX'. " Spool request: Name
*gds_outopt-RQPOSNAME = 'ESKERPRDGDR'. "Spool: Long name of printers for host spooler
*gds_outopt-TDCOVTITLE = 'SPOOL FOR FAX'."SPOOL NAME.
to select the printer name in 4 letters
CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
EXPORTING
input = 'eskerprdgdr'
IMPORTING
OUTPUT = gds_outopt-TDDEST
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = gds_ctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = gds_outopt
USER_SETTINGS = ' ' "important
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = gdt_otfdata
* JOB_OUTPUT_OPTIONS =
TABLES
gdt_form_data = gdt_form_data_fax
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
DATA: gds_docdata TYPE sodocchgi1,"Data of an object which can changed
gds_ctrlop TYPE ssfctrlop, " Smart Forms: Control structure
gds_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer options
gds_otfdata TYPE ssfcrescl, " sF: Return value at end of formprinting
gds_reclist TYPE somlreci1, "SAPoffice: Structure of the API Recip List
gds_pdf_tab TYPE tline. " Workarea for SAP Script Text Lines
gds_ctrlop-preview = ''."Print preview
***gds_ctrlop-no_open = ''.
***gds_ctrlop-no_close = 'X'.
*gds_ctrlop-no_dialog = 'X'.
gds_ctrlop-NO_DIALOG ='X'.
gds_ctrlop-device = 'PRINTER'."ESKERPRDGDR'.
***control_parameters-no_dialog = 'X'.
***control_parameters-no_open = 'X'.
***control_parameters-no_close = 'X'.
*gds_outopt-TDDEST = 'ESKP'."'PRINTER NAME'.
gds_outopt-TDPRINTER = 'HPLJ4'."Spool: Device type name
gds_outopt-TDNOPRINT = ''. "NO PRINT
gds_outopt-tdnewid = 'X'. "New Spool Request
gds_outopt-TDIMMED = 'X'. "Print Immediately
gds_outopt-TDNOPREV = ' '. "No print preview
gds_outopt-TDDATASET = 'FAX'. " Spool request: Name
*gds_outopt-RQPOSNAME = 'ESKERPRDGDR'. "Spool: Long name of printers for host spooler
*gds_outopt-TDCOVTITLE = 'SPOOL FOR FAX'."SPOOL NAME.
to select the printer name in 4 letters
CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
EXPORTING
input = 'eskerprdgdr'
IMPORTING
OUTPUT = gds_outopt-TDDEST