cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking a single Spool request into Multiple spool requests

0 Kudos

Hi All,

I have a single spool request which contains sap-script output of 100 invoices (One Invoice on one page , therefore, total 100 pages). I need to create 100 spools (One spool for each invoice). Can u please advise how can I read the sap-script output of the spool request which contains 100 invoices into an internal table and then loop at that internal table to create separate spool for each invoice .

Please help me out .

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Manish,

You can make use of these FMs RSPO_RETURN_ABAP_SPOOLJOB or RSPO_RETURN_ABAP_SPOOLJOB_RW .

They are helpful in splitting the spools. It splits the spool document wise.

Hope it helps.

Thanks,

Daya

Former Member
0 Kudos

Hi Manish,

Can you let me know like how the spool request containing 100 invoices is created? Is it through output type creation or are you executing any report program (print program) giving inputs like invoice date or invoice number to generate a spool request with multiple invoices?

The solution can be in the print program you can loop through the internal table containing invoice numbers , calling OPEN_FORM, WRITE_FORM etc for sap script inside the loop for each invoice, creating separate spool request for each invoice. Hope this would help you.

Regards,

Sujatha

Sandra_Rossi
Active Contributor
0 Kudos

Why don't you change the driver program, so that it opens a new spool at each invoice?