‎2008 Aug 11 6:46 AM
hi SDNers,
I have to develop one module pool programming.In that, i have 2 input fields and one push button for print.
One is for giving (or selecting using f4) invoice no and another one is for giving (or selecting using f4) printer name.After entered the values in the input fields, if i press print button it should print in the specified location.
I dont know the tables and fields used for printer.
How to do?
Senthil kumar.
‎2008 Aug 11 7:03 AM
Hi ,
check out these tables
TSP03 Spool: Printer declaration
TSP03A Spool: Device description (new format)
TSP03C Spool: Device Description Extension
TSP03D Spool: Device Description (New Format)
TSP03L Spool: Long device names
TSP03T Paper format in the device paper tray
‎2008 Aug 11 7:14 AM
Hi
Use the following tables and try the following code.
TSP03: Printer declaration
TSP03L: Device names
DATA: print_parameters TYPE pri_params,
archi_parameters TYPE arc_params,
valid_flag(1) TYPE c.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
archive_mode = '3'
IMPORTING
out_parameters = print_parameters
out_archive_parameters = archi_parameters
valid = valid_flag
EXCEPTIONS
invalid_print_params = 2
OTHERS = 4.
IF valid_flag = 'X' AND sy-subrc = 0.
SUBMIT <report> TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
ARCHIVE PARAMETERS archi_parameters
WITHOUT SPOOL DYNPRO.
ENDIF.
Hope it helps.
Murthy