cancel
Showing results for 
Search instead for 
Did you mean: 

REQUIRE One spool request for n copies in one print command in smartform

Former Member
0 Kudos

Hii Friends,

I created a smartform..I require 5 copies of that form..There is a text which needs to be changed in evry copies...eg Original in first copy

Duplicate in second copy

Triplicate in third copy....n so on

So i used a loop n i am calling smartform 5 times....The problem is i need one spool request to be created..

Note: By default sometimes it create one spool request and sometimes 3 spool request...

Pls share your inputs ............

Thanks,

Regards,

Sujit.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sujit,

Use window type "Copies" in smartform for printing different text on each copy.

Lets say you need to print the text "Merchant" on one copy, "Customer" on second copy, and "Bill" on third copy. Then you need to create a window of type "Copies" instead of "Secondary". Under this window create three text elements. For the first text element specify the condition in conditions tab as: sfsy-copycount = 1 and print the text as "Merchant" in the text element. Similarly, for the second text element specify the condition as: sfsy-copycount = 2 and print the text as "Customer". Similarly, the third one.

When you execute the program from se38, you get a popup asking for print parameters, here you can specify Number of copies as 3. When first copy triggers, then "Merchant" text would get printed. When second copy triggers, then "Customer" text would get printed on the form. Similarly, for the third copy, it would be printed as "Bill".

You can also pass the print parameters by specifying them in the export parameters of the function module SSF_FUNCTIONAL_MODULE_NAME.

Former Member
0 Kudos

HI,

sujit ,

you check with this data structure "SSFCTRLOP" use full your driver program..

Regards,

Ansari.

Former Member
0 Kudos

Hi,

use the Parameter TDCOPIES for component type TDSFCOPIES it Presets number input field in the Copies box.

also try TDGROUP for TDGROUP

thanks

ravi aswani

Former Member
0 Kudos

hi

there is an option "create new spool request..." (OUTPUT_OPTIONS-TDNEWID)

regards,darek

Former Member
0 Kudos

Hii Darek,,

I already used this....eg..ouput_option-tdnewid = ' '. So that no spool id shud generate...Is there any other option required wid tdnewid..

Former Member
0 Kudos

set newiid = 'X' only in first loop...and then newid = space...

regards,darek

Former Member
0 Kudos

Hey Darek i tried tht too...newid = space...but still many spool request gets generated...

Former Member
0 Kudos

hi,

this is more complicated see below description from help

regards,darek

Printing Several Forms in One Print Request

Use

You want to bundle several forms into one print job.

Print Request vs. Spool Request

SAP Smart Forms allows you to bundle several forms to form one output unit. This output unit is called a print request. A print request is different from a spool request:

Whether a new spool job is created in the spool depends on the settings in the spool dialog.

Whether a new print request starts depends on the standard parameters of the generated function module you set in SAP Smart Forms. For each print request, the spool dialog is called only once. If you suppress the dialog, you can pass parameters for spool processing only at the beginning of the print request.

This means that a print request gathers several forms before submitting them to spool processing. Thus they cannot be spread over several spool requests. Vice versa however, you can include several print requests into one spool request.

Procedure

Use function module SSF_FUNCTION_MODULE_NAME to retrieve the name of the function module generated from the Smart Form (see also: Integrating the Smart Form Into the Application).

Call the Smart Form for the first time and set the NO_CLOSE parameter of the control structure. This prevents the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request as well. Leave the NO_OPEN parameter empty.

Instead of calling the Smart Form for the first time you can also call function module SSF_OPEN .

If you want to start a new spool request for the print request, set the TDNEWID field of the Output Options in this first call.

For all other form output of the application program that you want to include into the print request, use a loop to set both the NO_OPEN field and the NO_CLOSE field of the control structure.

To close the print request, in the call of the last Smart Form set the NO_OPEN parameter and unmark the NO_CLOSE parameter.

Instead of calling the Smart Form for the last time, you can also call function module SSF_CLOSE .

Result

The forms you called in the steps described above are included into one print request. If in the first step you started a new spool request, you can now view its status in the spool request overview (transaction SP01 ).

Former Member
0 Kudos

Hi sujit,

Try to use the

copies window

and use the system fields

copycount copycount1

to identify the whether it is original or 1st copy .

Hope this will surely will help you.

regards,

Sreenivasa Sarma K