cancel
Showing results for 
Search instead for 
Did you mean: 

Contineus printing of smartforms for invoice

Former Member
0 Kudos

Hi friends,

i need to print all the invoices & cheques contineously. We have used smartforms.Its not printing contineously.For cheques we have used customised page format, still it is taking four cheques (dina4) while printing where in cheque is printing properly but again taking 3 blank cheques with that. So every time need to load the page for printer.

Please guide.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, I have not got the problem clearly, can u explain more on the same.

Using Open_form and Close_form , you can proceed for the code as follows

****************

DATA : lw_output_options TYPE ssfcompop,

lw_control TYPE ssfctrlop,

l_fname TYPE rs38l_fnam,

l_fname1 TYPE tdsfname VALUE c_formname.

c_checked = 'X'.

  • Open Smartform

CALL FUNCTION 'SSF_OPEN'

EXPORTING

output_options = lw_output_options

control_parameters = lw_control

user_settings = space.

IF sy-subrc <> 0. "#EC *

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

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

ENDIF.

  • Pass Parameter to Control-Parameter

MOVE :

c_checked TO lw_control-preview,

c_checked TO lw_control-no_open,

c_checked TO lw_control-no_close.

LOOP AT i_zgotc_custretac_h INTO w_zgotc_custretac_h.

  • Call smartform

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = l_fname1

IMPORTING

fm_name = l_fname.

IF sy-subrc <> 0. "#EC *

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

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

ENDIF.

CALL FUNCTION l_fname

EXPORTING

control_parameters = lw_control

output_options = lw_output_options

w_zgotc_custretac_h = w_zgotc_custretac_h

l_adrnr = g_adrnr

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.

ENDLOOP.

  • Close Smartform

CALL FUNCTION 'SSF_CLOSE'.