Application Development 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: 

Smartform spool appending for Pay1/Pay2

vijay_kumar134
Participant
0 Kudos

Hi Experts,

My development of Payslips smartform is done, its all working fine and form has been generated.

Here is some issues for spool generation:

First time I run the program (batchjob) for 2 employees, I get 2 pages one for each employee, as expected.

.

When I again run the same program for 3 employees, 3 pages are added (appending) to the same spool request.

My requirement is to create a new spool when the program is executed for the next time.

I have tried setting NO_OPEN and NO_CLOSE in control parameters and also

I have tried with several output option settings. I have also tried using FMs SSF_OPEN and SSF_CLOSE. But no luck so far.

Please guide me any experts how to avoid appending the spool files thru program or any standard settings.

I found some references also:

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/4e/a6d1cb507e25cfe10000000a421937/content.htm

Thanks in advance.

Viji.

1 ACCEPTED SOLUTION

vijay_kumar134
Participant
0 Kudos

Hi Freinds.

I have resolved the issue myself.

Solution:

I have assigned the Unique Title for Pay1 and Pay2 in the tdcovtitle like below.

    IF rb_pays EQ c_chk.
    l_output_options-tdcovtitle = 'PAY1'.
  ELSE.
    l_output_options-tdcovtitle = 'PAY2'.
  ENDIF.

Thanks for everyone.

Viji.


3 REPLIES 3

Former Member
0 Kudos

Have you set the output_options field tdnewid for the function module in which you are calling for the smartform?  It should create a new spool request if you have tdnewid = 'X'.

0 Kudos

Hi Tamara,

Thanks for your reply.

Yes. i have set the o/p options. In this case it will create the new spoll file for each and every forms for single run.

If i have 2 Pay it will create 2 spools for each run.

My req is : 1 st run  - if 2 form is one spool.

                 2 nd run - if 3 forms for seperate spool.

Thanks.

Viji.


vijay_kumar134
Participant
0 Kudos

Hi Freinds.

I have resolved the issue myself.

Solution:

I have assigned the Unique Title for Pay1 and Pay2 in the tdcovtitle like below.

    IF rb_pays EQ c_chk.
    l_output_options-tdcovtitle = 'PAY1'.
  ELSE.
    l_output_options-tdcovtitle = 'PAY2'.
  ENDIF.

Thanks for everyone.

Viji.