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

how to set printer settings

Former Member
0 Likes
313

I have created report for purchase register.

i am taking print this on epson printer.

i have created my own page size as below

width is 40 cms and height is 30 cms.

how can i assign above width and height for my printer.

I have created report for purchase register.

i am taking print this on epson printer.

i have created my own page size as below

width is 40 cms and height is 30 cms.

how can i assign above width and height for my printer.

1 REPLY 1
Read only

anversha_s
Active Contributor
0 Likes
287

Hi,

Please check below strutures, It will help you to solve ur problem.

ssfctrlop

ssfcompop

ssfcompin.

DATA: gt_control TYPE ssfctrlop,
      gt_output  TYPE ssfcompop,
      gs_input TYPE ssfcompin.
 
  gs_input-device = 'PRINTER'.
  gs_input-tdpreview = 'X'.
  gs_input-tddest = 'LP01'.
  gs_input-dialog = ' '.
  CALL FUNCTION 'SSF_OPEN'
       EXPORTING
            input         = gs_input
            user_settings = 'X'
       EXCEPTIONS
            error         = 1
            OTHERS        = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
*  gt_output-tdnewid = 'X'.
*  gt_output-tddest = 'LP01'.
 
  gt_control-preview = 'X'.
  gt_control-no_dialog = 'X'.
  gt_control-no_open   = 'X'.
  gt_control-no_close  = 'X'.
 
  CALL FUNCTION gv_func_name
       EXPORTING
            order              = pa_order
            control_parameters = gt_control
            output_options     = gt_output
            user_settings      = space
       EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
  IF sy-subrc <> 0.
    WRITE: 'Sy-subrc:',sy-subrc,
           'Error occurred while calling smart form FM!'.
  ENDIF.
 
  CALL FUNCTION 'SSF_CLOSE'.

Regards,

Anversha