Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with Print parameters in program for smartform

Former Member
0 Likes
1,309

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.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
637

... 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

2 REPLIES 2
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
638

... 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

Read only

Former Member
0 Likes
637

Hi

Please Pass user setting parameter as Space.

USER_SETTINGS = ' '.

Regards

Sachin