on 06-28-2011 5:08 AM
can any one please tell me how to change the output device for gui_download into pdf for a smartform.
(i want the setting to be done in my report -driver program , not in sap application tool bar settings)
kindly please suggest me,
thanks in advance,
koolspy.
I give you an example
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
Parametros por defecto para la generación de la orden de spool.
ls_composer_param-tddataset = 'PDF'.
ls_composer_param-tdsuffix1 = 'FACT.'.
ls_composer_param-tdsuffix2 = nast-OBJKY.
ls_composer_param-TDDEST = 'LP02'.
output_options-tdprinter = 'PRINTER'.
ls_composer_param-tdnewid = 'X'.
ls_composer_param-tddelete = 'X'.
ls_composer_param-tdfinal = ' '.
ls_composer_param-tdlifetime = 8.
ls_control_param-no_dialog = 'X'.
ls_control_param-preview = ' '.
ls_composer_param-tdimmed = ' '.
ls_control_param-getotf = 'X'.
call smartform invoice
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
is_vbdkr = is_vbdkr
IMPORTING
job_output_info = job_output_info
document_output_info = document_output_info
job_output_options = job_output_options
TABLES
gt_vbdpr = gt_vbdpr
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Convertimos el fichero OTF a PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
bin_filesize = file_size
BIN_FILE =
TABLES
otf = job_output_info-otfdata
lines = lt_pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
it is not clear from your question what you want. If what you want is to download an smartform to a pdf, set in the smartform function module call the parameter control_parameters-otf to u2018Xu2019 and the function will give you back the OTF in the structure job_output_info-otfdata. Later on, you could transform this OTF to a pdf by function CONVERT_OTF with the parameter format = 'PDF' and the table OTF = the otf table (job_output_info-otfdata) and the table lines the pdf file.
Then you just have to download the pdf file, in table lines with for example the function gui_download.
hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First of all you need to assign the output type to the Smartform.
then you can change, issuing the output based on the o/p type from the menu header.
If this does not solve your question. Please explain more about your issue/requirement.
Thanks,
Bhargav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.