on 02-23-2012 6:04 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes , it is dot matrix printer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Is it a dot matrix printer ?
Thanks,
Madhukar Shetty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.