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

Create Spool Request Number for Smartform?

Former Member
0 Likes
2,701

Hi Experts,

I designed a smartform to display material details. There are 10 material details and need to display all meterail details in single smatform with 10 pages only. It is displaying 10 pages along with data. fine.

I want to create single spool request number for this.

I searched related querries in this forum and got very few of solutions and they are quite confusion.

Could you please give me sugession to come out from this issue.

1. How to create spool request number for a smartform?

2. How to create single spool request number for a smartform with multiple pages?

Thanks in advance

Sekhar

7 REPLIES 7
Read only

Former Member
0 Likes
1,206

hi sekhar,

try like this.

DATA:w_form_name type tdsfname, "Smartform name

r_options type ssfcompop, "Print option

r_control type ssfctrlop, "Print control

w_function type rs38l_fnam.

r_options-tddest = 'LOCL'. "Spool: Output device

r_options-tdimmed = 'X'. "Print Immediately

r_options-tddelete = space. "Delete After Printing

r_options-tdnewid = 'X'. "New Spool Request

r_control-device = 'PRINTER'.

r_control-no_dialog = 'X'.

r_control-langu = sy-langu.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'smartformname'

importing

fm_name = w_function

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.

call function w_function

exporting

control_parameters = r_control

output_options = r_options

user_settings = ' '

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

Read only

0 Likes
1,206

Hi Raj,

Thank you.

I can able to generate new spool request for my output. But there are multiple spool requests generated.

for example, if my final output table have 10 records, there are 10 spool request numbers generated. It should not generate. It should generate only 1 spool request with all 10 records(10 pages or smartforms).

How to generate a single spoll request for 10 smartforms?

Help me out.

thanks

Sekhar

Read only

0 Likes
1,206

Hi,

Try like this.

1) CALL FUNCTION 'SSFCOMP_OPEN' (open spool)

2) CALL THE LIST OF SMARTFORMS HERE (Call 10SMARTFORMS)

3) CALL FUNCTION 'SSFCOMP_CLOSE' (close spool)

The 10 smartforms will be displayed in a single spool.

Regards,

Suresh.

Read only

0 Likes
1,206

hi,

pass the 10 records at a time, if u want 10 copies use below one.

for number of copies

r_options-tdcopies = 10'.

Read only

Former Member
0 Likes
1,206

export parameters of smartform f.m

JOB_OUTPUT_OPTIONS TYPE SSFCRESOP

use the field

TDNEWID------Print parameters, new spool request

Read only

Former Member
0 Likes
1,206

self resolved

Read only

0 Likes
1,206

Hello Chandra,

I also have the same issue.

Would you mind giving me your solution?

Thank you.

Regards,

Onyx