cancel
Showing results for 
Search instead for 
Did you mean: 

Printer info in SAP Script

sastry_gunturi
Active Participant
0 Kudos

Where do we pass printer information in the SAP Scritps.. can we hardcode the printer name...

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

You can pass the printer name in the OPTIONS parameter of the OPEN_FORM.

Here you have to pass the TDDEST for the Printer name

Like:


LA_OPTIONS-TDDEST = 'LOCL'.

CALL FUNCTION 'OPEN_FORM'
 EXPORTING
   OPTIONS                            = LA_OPTIONS
...

Regards,

Naimesh Patel

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

OPEN_FORM function module should be called first before any printing can take place, here we specify the name of the form and the print language.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DIALOG = 'X'

DEVICE = 'PRINTER'

FORM = form name

LANGUAGE = SY-LANGU

  • OPTIONS =

EXCEPTIONS

CANCELLED = 1

DEVICE = 2

FORM = 3

OTHERS = 11

.

IF SY-SUBRC NE 0.

MESSAGE ...

ENDIF.

In the above function module the parameter

FORM = Name of form

DEVICE = PRINTER (print using spool),TELEFAX (fax output)

SCREEN (output to screen)

OPTIONS = It is a structure of type ITCPO and it controls the various

attributes like number of copies , print preview etc.

Regards,

Logan