cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Multiple Pages

former_member355168
Participant
0 Kudos

Dear Experts,

I hv requirement to print multiple pages using smartforms.

I m calling smartforms like below :


FORM call_form  USING    p_lv_formname.
  DATA : lv_lines(2).

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = lv_formname
    IMPORTING
      fm_name            = lv_fm_name
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  i_control_parameters-no_dialog = 'X'.
  i_control_parameters-preview = 'X'.
*
  wa_output_options-tddest = 'EPSN'.
  wa_output_options-tdimmed = 'X'.

  DESCRIBE TABLE i_final_temp LINES lv_lines.
  CHECK lv_lines > 0.

  LOOP AT i_final_temp INTO w_final_temp.
    IF lv_lines GT 1.
      AT FIRST.
        i_control_parameters-no_open = space.
        i_control_parameters-no_close = 'X'.

      ENDAT.

      AT LAST.

        i_control_parameters-no_open = 'X'.
        i_control_parameters-no_close = space.

      ENDAT.
    ENDIF.
    ON CHANGE OF w_final_temp-mblnr.

      CALL FUNCTION lv_fm_name
        EXPORTING
          control_parameters = i_control_parameters
          output_options     = wa_output_options
          user_settings      = ' '
          p_werk             = p_werk
          lv_mblnr           = w_final_temp-mblnr
        TABLES
          i_final            = i_final
        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.
      IF lv_lines GT 1.
        i_control_parameters-no_open = 'X'.
        i_control_parameters-no_close = 'X'.
      ENDIF.
    ENDON.

  ENDLOOP.

ENDFORM.                    " CALL_FORM

InFORM call_form USING p_lv_formname.

DATA : lv_lines(2).

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = lv_formname

IMPORTING

fm_name = lv_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

i_control_parameters-no_dialog = 'X'.

i_control_parameters-preview = 'X'.

*

wa_output_options-tddest = 'EPSN'.

wa_output_options-tdimmed = 'X'.

DESCRIBE TABLE i_final_temp LINES lv_lines.

CHECK lv_lines > 0.

LOOP AT i_final_temp INTO w_final_temp.

IF lv_lines GT 1.

AT FIRST.

i_control_parameters-no_open = space.

i_control_parameters-no_close = 'X'.

ENDAT.

AT LAST.

i_control_parameters-no_open = 'X'.

i_control_parameters-no_close = space.

ENDAT.

ENDIF.

ON CHANGE OF w_final_temp-mblnr.

CALL FUNCTION lv_fm_name

EXPORTING

control_parameters = i_control_parameters

output_options = wa_output_options

user_settings = ' '

p_werk = p_werk

lv_mblnr = w_final_temp-mblnr

TABLES

i_final = i_final

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.

IF lv_lines GT 1.

i_control_parameters-no_open = 'X'.

i_control_parameters-no_close = 'X'.

ENDIF.

ENDON.

ENDLOOP.

ENDFORM. " CALL_FORE

In Preview, everyting is fine. When i take print, the space at the top of page is getting reduced in subsequent pages.

And after third page got printed, the header part of 5th page is getting printed at the bottom of 4th page.

Not getting, is it a issue of print (EPSON) or program.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jaspalkumar,

Can you please check if the paper size you are using is same as the paper size mentioned in the smartform e .g. A4 size.

If both are same and still you face the problem the it is a problem with the printer because you Print program doesn't seem to have any problems.

Regards,

Praveenkumar T.

former_member355168
Participant
0 Kudos

yes , it is dot matrix printer.

Former Member
0 Kudos

Hi,

I dont think it is problem of ur SF.

Do ur SF data is till end of the page ?

Check by changing the upper & lower margin of the page not sure

Thanks,

Madhukar Shetty

Former Member
0 Kudos

Hi ,

Is it a dot matrix printer ?

Thanks,

Madhukar Shetty

former_member355168
Participant
0 Kudos

yes, it is dot matrix printer.