on 01-24-2011 9:43 PM
Hi,
In my scenario i need to download the smart form data in PDF format while clicking on print button and while print preview, it should show preview of the smart form data. For my case it was downloading into PDF for both Print and print preview,
I make the settings as
w_cparam-no_dialog = space." Suppressing the dialog box
w_cparam-preview = 'X'. " for print preview
w_cparam-DEVICE = space.
w_cparam-getotf = 'X'.
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
CONTROL_PARAMETERS = w_cparam
OUTPUT_OPTIONS = w_outoptions
HEADER = wa_emp
IMPORTING
JOB_OUTPUT_INFO = t_otf_from_fm
TABLES
APPRAISALS = it_emp1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
If I Comment the , CONTROL_PARAMETERS = w_cparam in the above Function Module the Print preview is Working but the Download to PDF is Become 0 bytes i.e No data is download to PDF .
Thanks,
Prakash.K
Check the below code and format accordingly:
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: lf_formname TYPE tdsfname.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_dlv-land LIKE vbrk-land1.
DATA lv_fm_name TYPE rs38l_fnam.
CALL FUNCTION lv_fm_name "'/1BCDWB/SF00000082'
EXPORTING
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' ' "Disable User Printer
IMPORTING
job_output_info = ls_job_info
*&---------------------------------------------------------------------*
*& Form set_print_param
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM set_print_param USING is_addr_key LIKE addr_key
is_dlv-land LIKE vbrk-land1
CHANGING cs_control_param TYPE ssfctrlop
cs_composer_param TYPE ssfcompop
cs_recipient TYPE swotobjid
cs_sender TYPE swotobjid.
DATA: ls_itcpo TYPE itcpo.
DATA: lf_repid TYPE sy-repid.
DATA: lf_device TYPE tddevice.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
lf_repid = sy-repid.
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_country = is_dlv-land
pi_addr_key = is_addr_key
pi_repid = lf_repid
pi_screen = xscreen
IMPORTING
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = cs_recipient
pe_sender = cs_sender.
IF sy-subrc = 0.
MOVE-CORRESPONDING ls_itcpo TO cs_composer_param.
cs_control_param-device = lf_device.
cs_control_param-no_dialog = 'X'.
cs_control_param-preview = xscreen.
cs_control_param-getotf = ls_itcpo-tdgetotf.
cs_control_param-langu = nast-spras.
ENDIF.
ENDFORM. " set_print_param
Edited by: K.Manas on Jan 25, 2011 9:49 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.