cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to print the script form from print preview

Former Member
0 Kudos

Hi Experts,

I need to print one of the script form from print preview. As per the req. first i need to generate a print preview of this form and if required should be able to print it from this preview.

i am able to generate print preview and also able to see the print option but when i try to print it is going to the spool (which i dont want). I want it to be printed directly to the printer instead of sending it to the spool.

Please suggest me

The way i coded it is

DATA: arcpar TYPE arc_params,

pripar TYPE pri_params.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

layout = 'X_65_132'

line_count = 65

line_size = 132

IMPORTING

out_parameters = pripar

out_archive_parameters = arcpar

valid = val

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

pr_options-tddest = ''.

pr_options-tdpreview = 'X'.

pr_options-tdnoprint = ''.

pr_options-tdsuffix1 = 'STUFF'.

pr_options-tdsuffix2 = matnr.

pr_options-tdimmed = ''.

pr_options-tdlifetime = '2'.

pr_options-tdprogram = Form-name.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

device = 'PRINTER'

dialog = space

form = "purchase or"

language = sy-langu

OPTIONS = pr_options

EXCEPTIONS

canceled = 01

device = 02

form = 03

OPTIONS = 04

unclosed = 05.

CALL FUNCTION 'START_FORM'.

ENDFORM. " open_and_start_form

Thank you.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Just pass the value 'X' to "pr_options-tdimmed" field.Try this.

I hope,it help you

<=<< Sharing Knowledge is a way to Innovative >=>>

By,

Yoga

Former Member
0 Kudos

Hi,

Give TDDEST as your printer name like LOCL etc.

Thanks,

Nethaji.

Former Member
0 Kudos

In user setting (SU 01)------ > default tab -


> Spool Control -


> give option print immediatly and assigne the default printer name

Former Member
0 Kudos

In user setting (SU 01)------ > default tab -


> Spool Control -


> give option print immediatly and assign the default printer name.