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

smartform - continuous printing

vallamuthu_madheswaran2
Active Contributor
0 Likes
2,797

Hi Friends,

Kindly find the below code.

loop at Itab.

call smartform FM

endloop.

Here when I press the back button then second form will be printing. my requirement is to print the data continuously.

the first record should be the first page and the second record should be second page like that.

Thanks with Regards,

Vallamuthu M.

11 REPLIES 11
Read only

venkateswaran_k
Active Contributor
0 Likes
2,651

Dear Vallamuthu

For is you need to set the internal loop at the smart form in your your main table (just before the contents you want to repeat ) as shown below

Regards,

Venkat

Read only

0 Likes
2,651

Hi Venkat,

Thanks for your update.

it's a pre-printed sheet. no line item values all are tesxt values. so I am not using main window.

Thanks with Regards,

Vallamuthu

Read only

0 Likes
2,651

Okay, kindly update your screen shot of the smartform desing (Left panel). I hope at least you have one window.

Read only

0 Likes
2,651

Hi Venkat,

Kindly find the attached image.

Thanks ith Regards,

Vallamuthu M.

Read only

0 Likes
2,651

vallamuthu.madheswaran2 you should try to use template, it should be a nightmare to align all these fields

Read only

0 Likes
2,651

Thanks,

In your driver program where you call the smartform - set the control parameter for showing the printer popup - set to No

Example : ls_composer_param-tdnoprint.

Read only

0 Likes
2,651

Hi Venkat,

Kindly find the code below.

ls_out_opt-tddest = 'LP01'.
* ls_out_opt-tdnoprint = 'X'.
ls_cntrl-no_dialog = 'X'.
ls_cntrl-preview = 'X'.

IF gt_main[] IS NOT INITIAL.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSCM3262_TNT_CONSIGNMENT_NOTE'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.


LOOP AT gt_main INTO gs_main.

CALL FUNCTION lv_fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = ls_cntrl
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = ls_out_opt
user_settings = ''
gs_data = gs_main
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.

Thanks with Regards,

Vallamuthu M.

Read only

0 Likes
2,651

uncomment on the statement

* ls_out_opt-tdnoprint = 'X'.

comment - ls_cntrl-preview = 'X'.

Read only

0 Likes
2,651

Dear Vallamuthu

Is this resolved ?

Read only

venkateswaran_k
Active Contributor
0 Likes
2,651

Hi

Is this issue resolved?

Kindly update the solution

Read only

venkateswaran_k
Active Contributor
2,651

Hi

Is this issue resolved

If so kindly mark the solution so that it will be helpful for others who face similar requiremetn

Thanks