cancel
Showing results for 
Search instead for 
Did you mean: 

continuos printing in smartforms

Former Member
0 Kudos

hi experts,

I am working with smartforms now.i am very comfortable with one page printing,but if it is continuos printing what all are the procedures involved in it.

ie if i want to print invoice from 900001 to 9000010 at a time.

pls give me step by step procedure for it.

regards,

Manik

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

can refer teh following code

FORM sub_report_print .

DATA : lw_output_options TYPE ssfcompop,

lw_control TYPE ssfctrlop,

l_fname TYPE rs38l_fnam,

l_fname1 TYPE tdsfname VALUE c_formname.

  • 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'.

ENDFORM. " sub_report_print

former_member210123
Active Participant
0 Kudos

loop at the invoice.

and call the smartformin that.

end the loop.

The other way is send the internal table which contains all the detials.For the details read from the internal table.

And loop the table on the internal table.

At the end of every invoice trigger a new page.

If you want a sample send me ur email id i will send a sample smartform.