02-23-2007 12:46 PM
hi, all
can any body tell me how can i call a smartform in my prog. without printview / print selection screen option
e.g
i made a prog and call a smart form in that .
when i run this prog after putting data in selection screen, it ask for printer device selection screen then i clik on print preview or print butoon then it show report.
so my prob. is i dont want that window come, i take default printer and show report directly.
Thanks,
mukesh
02-23-2007 1:40 PM
Set the following parameters of the FM interface:
CONTROL_PARAMETERS-DEVICE = <printer_name>.
CONTROL_PARAMETERS-NO_DIALOG = 'X'.
CONTROL_PARAMETERS-PREVIEW = space.
OUTPUT_OPTIONS-TDDEST = <printer_name>.
Not sure about the parameters for the printer name (whether you have to set the first one and/or the second one); I also don't remember whether this represents the printer short or long name; just play with it.
Guenther
I just double-checked, you'll need to set (at least)
OUTPUT_OPTIONS-TDDEST = <printer_name> to pass the printer name.
Message was edited by:
Guenther Schober
02-23-2007 1:51 PM
Hi,
If the printer is only one u can add this it to Parameters ans set as Default like below.
PARAMETERS: V_PRINTER LIKE TSP03D-NAME default 'Printer Name'.
And then u pass the parameters to following conditions
OUTPUT_OPTIONS-TDDEST = V_PRINTER.
OUTPUT_OPTIONS-TDNOPREV = K_X.
OUTPUT_OPTIONS-TDIMMED = K_X.
CONTROL_PARAMETERS-PREVIEW = ' '.
CONTROL_PARAMETERS-NO_DIALOG = K_X.
If helps please award points.
02-26-2007 6:16 AM
02-26-2007 1:51 PM
Are you sure that the printer name you are passing is correct?
Did you try short and long name? Try to set a default printer in your user profile (SU01).
Guenther
02-27-2007 7:51 AM
IN MY LOGIN ZDMP IS DEFAULT
my code is for calling smart form is
CALL FUNCTION fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
*OUTPUT_OPTIONS-TDDEST = 'ZDMP'
*OUTPUT_OPTIONS-TDNOPREV = 'K_X'
*OUTPUT_OPTIONS-TDIMMED = 'K_X'
CONTROL_PARAMETERS-PREVIEW = ' '
CONTROL_PARAMETERS-DEVICE = 'ZDMP'
CONTROL_PARAMETERS-NO_DIALOG = ' X'
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
wa_vbak = vbak
tot_15 = tot_15
tot_31 = tot_31
tot_46 = tot_46
tot_61 = tot_61
tot_noterm = tot_noterm
tot_overdue = tot_overdue
tot_1 = tot_1
vskfor = vskfor
totrcpt = totrcpt
totnotdue = totnotdue
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
02-27-2007 8:18 AM
Hi Mukesh,
in CONTROL_PARAMETERS-DEVICE you can only set
PRINTER, SCREEN, TELEFY, EMAIL, not a speacial printer.
If you want to set another printer as default use the
strukture: OUTPUT_OPTIONS.
Regards, Dieter