cancel
Showing results for 
Search instead for 
Did you mean: 

Spool - restrict multiple sap script layouts into a single spool

Former Member
0 Kudos

Hi Experts,

I am writing a Sap SCRIPT print program for multiple number of customers with different layouts. But i am getting seperate spools for different customers. There fore i need to print out all customers in a single spool.

Can some one help me how to do this?

Thanks

Dany

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Dany,

To get a single spool request for multiple customers, Loop the customers inside the OPEN_FORM and CLOSE_FORM and give different form layout for each customer in START_FORM.

The Flow should be

Call Function 'OPEN_FORM'.

loop for different customers.

Call Function 'START_FORM'.

Call Function 'WRITE_FORM'.

Call Function 'END_FORM'.

Endloop.

Call FUnction 'CLOSE_FORM'.

This will create only one spool request for different customers.

Thanks.

Bye,

Rajesh.

former_member196280
Active Contributor
0 Kudos

Try to do like this, it may help to solve your issue.

Ex. FM

START_FORM

OPEN_FORM

WRITE_FORM

CLOSE_FORM

OPEN_FORM

WRITE_FORM

WRITE_FORM

CLOSE_FORM

ENDFORM.

Using the above there may be possibility of bring all under one spool.

Regards,

SaiRam

Pawan_Kesari
Active Contributor
0 Kudos

OPEN_FORM and CLOSE_FORM function module are used to open and close spool. When you have single form to create document then we specify form_name in OPEN_FORM function module itself. However when we have multiple forms or same form needs to be called multiple times and all document needed in same spool then we use START_FORM and END_FORM to explicitly open and close form.

Call function module in this sequence


OPEN_FORM "without specifying any form name, this will open spool

START_FORM " with form name
END_FORM

START_FORM "with (some other) form name
END_FORM

..
..


CLOSE_FORM "close spool request

Former Member
0 Kudos

Check with below links and it may help you

I have done same kind of req in smartform,you need to fill all print parameters,use print parameters at last event,so that it will create one spool for all .

Thanks

Seshu

Former Member
0 Kudos

Hi,

I could not get the appropriate solution for your reply. But i think i can get more idea from you.

well let me tell you more clearly -

I am using open_form f& close form for every loop pass i.e for every customer who may or may call a different layout set. I am getting new spool for every new customer.

could you help me now?

Thanks

Dany

Former Member
0 Kudos

Hello Dan,

I done in smartform ,but i have idea about script.

You can fill print parameters in open_form ,and use close_form at last so that you will get single spool for all .

fill the ITCPP in close_form..

Thanks

Seshu