‎2010 Sep 06 2:19 AM
Hi Gurus,
I have created a custom smartform and a program to fetch the data and call smartform.
This program will be executed in the background. I want to provide an output device
parameter in the selection screen so that they can provide either spool or printer and can
execute in the background.
For this reason, i have provided the parameter of type 'tsp01-rqdest'. Now i am stuck with
what parameters i have to pass to the FM ?
I have tried the following values, but still dialog box for print parameters is coming with
message as no printer configured in the user master setting. I want to provide the output
device dynamically as per the selection parameter. Could any one plz provide the parameters to
pass to the function module.
DATA : lt_document_output TYPE SSFCRESPD,
lt_job_info TYPE SSFCRESCL,
lt_job_options TYPE SSFCRESOP,
ls_output TYPE SSFCOMPOP,
ls_control TYPE SSFCTRLOP.
ls_control-DEVICE = 'PRINTER'.
ls_control-NO_DIALOG = 'X'.
ls_output-TDNOPREV = 'X'.
ls_output-TDDEST = 'LOCL'.
ls_output-XSFOUTDEV = 'LOCL'.
call the form
IF lv_funcname IS NOT INITIAL.
CALL FUNCTION lv_funcname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = ls_control
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = ls_output
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO = lt_document_output
JOB_OUTPUT_INFO = lt_job_info
JOB_OUTPUT_OPTIONS = lt_job_options
TABLES
i_data = gt_data
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
Thanks in Advance.
‎2010 Sep 06 2:48 AM
... I want to provide the output device dynamically as per the selection parameter ...
If this is the case why are you passing 'LOCL',
ls_output-TDDEST = 'LOCL'.In the code snippet you've posted i don't see any reference to the selection-screen param.
BR,
Suhas
‎2010 Sep 06 2:48 AM
... I want to provide the output device dynamically as per the selection parameter ...
If this is the case why are you passing 'LOCL',
ls_output-TDDEST = 'LOCL'.In the code snippet you've posted i don't see any reference to the selection-screen param.
BR,
Suhas
‎2010 Sep 06 5:57 AM
Hi
Please Pass user setting parameter as Space.
USER_SETTINGS = ' '.
Regards
Sachin