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

Do not append to Spool File

Former Member
0 Likes
3,202

What we are trying to do is stop spool file from appending to the last spool request when the user generates a spool file, we want a different spool file for each customer sales invoice that the user generates.

Spool files are printed individually at the moment because we have the print immed turned on - the spool file is generated by the user creating individual sales invoices and when they save the document the system (with config setting VV32) will automatically generate an invoice. The problem with this is that they are printed in the sequence that there are created in and not in page number sequence - we want them in page number sequence because we have a machine that breaks the perforation on the pre-printed invoice paper and then the machine will accept all the one page invoices into the one page slot and all the two page invoices into the two page slot etc - it will then fold the invoice and place it in an envelope.

So this is not an batch job so changing the user setting with SM36 wont work - what we need to do is turn off the print Immed flag but some how then turn on the 'Do not append' flag or the 'Completed - no longer possible to add to' flag - if we can generate the spool files this way we can then sort by page number and do a mass print at the end of the day.

Were on 4.6b - any suggestions - I'm really stuck on this one.

Thanks

Conor.

What we are trying to do is stop spool file from appending to the last spool request when the user generates a spool file, we want a different spool file for each customer sales invoice that the user generates.

Spool files are printed individually at the moment because we have the print immed turned on - the spool file is generated by the user creating individual sales invoices and when they save the document the system (with config setting VV32) will automatically generate an invoice. The problem with this is that they are printed in the sequence that there are created in and not in page number sequence - we want them in page number sequence because we have a machine that breaks the perforation on the pre-printed invoice paper and then the machine will accept all the one page invoices into the one page slot and all the two page invoices into the two page slot etc - it will then fold the invoice and place it in an envelope.

So this is not an batch job so changing the user setting with SM36 wont work - what we need to do is turn off the print Immed flag but some how then turn on the 'Do not append' flag or the 'Completed - no longer possible to add to' flag - if we can generate the spool files this way we can then sort by page number and do a mass print at the end of the day.

Were on 4.6b - any suggestions - I'm really stuck on this one.

Thanks

Conor.

9 REPLIES 9
Read only

FredericGirod
Active Contributor
0 Likes
1,875

Hi,

Why don't you modify the print parameter at the call of the forms ? (for sapscript or smartforms)

use the fm set_print_parameter ...

(take the parameter first with the get print parameter).

Rgd

Frédéric

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,875

There should be a "New Spool Requet" flag that you can set. This can be set at the user profile level. I think there are other levels that you can switch this on.

F1 help on this field.

<i>

Print parameters, new spool request

This field determines whether to append the current spool request to an existing request with similar attributes or whether to generate a new spool request.

To append the current spool request to an existing spool request, the specifications for Name, Output device, Number of copies and Format must be the same and the existing spool request should not have been completed. This applies particularly when a spool request is released for output. If no suitable spool request is found, a new one is generated. The two permitted values are:

'X' : Generate a new spool request

' ' : Find and append to an existing spool request (if any)

The runtime environment passes the parameters to the spool system in a structure with the ABAP Dictionary type PRI_PARAMS. Before this structure, system fields were used. Even now, when you print, some fields of the structure PRI_PARAMS are copied into system fields with the same names. However, this information is redundant, and you should not use it.

</i>

You should be able to default this setting in your sapscript program. The print parameters should be being sent thru the OPEN_FORM function module.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,875

Sorry - I forgot to mention that we are are using the SAP standard program RVADIN01 and this ffeds into a bespoke SAPscript, so changing the parameters on the OPEN_FORM Function module are not possible - we need to do this somewhere in config or with differnt spool parameters etc.

Read only

0 Likes
1,875

And it's not possible to imagine to copy this RVADIN01 to a ZRVADIN01 just to add this little code that will solve your big problem ?

Read only

0 Likes
1,875

I'm not sure if you can set this in config or not. But if you can't you really don't have a choice but to copy the program and make a "Z" version of it and then set the flag in the program.

Regards,

Rich Heilman

Read only

0 Likes
1,875

And what about future SAP standard code updates to RVADIN01 I certainly wont get then if I created a ZRVADIN01 will I .....

I'm well aware that I can create a Z RVADIN01 , if I copy the program and create a Z version I am basically standing still and probably creating more problems for myself and my employers, - Surly some one of you vast experience can see that.

Regards

Conor.

Read only

0 Likes
1,875

Thanks Rich, I Thought that it would come to that, Most places that I look basically come up with the same answer. I'll just have to keep digging before I go down the Z route - I'll keep you posted if I come up with anything.

Regards,

Conor.

Read only

0 Likes
1,875

I think you will have no problem.

You will have to check the program betweet the standard and your Z* when you will made upgrade (SE39) but, it's nothing. And this sapscript will going to die, there is already a smartforms to remplace this one.

So ... lets go !

Rgd

Frédéric

Read only

0 Likes
1,875

Conor, I was under the impression, that the standard SAPscript print programs are just baseline documents delivery by SAP. I believe that coping and modifing these programs to your specific needs is suggested. Also, I don't see any reason why SAP would need to patch the standard sapscript program. It is very common practice to copy and modify sapscript print programs and forms.

Welcome to SDN! Please remember to award points of answers that may have been helpful.

Good Luck.

Regards,

Rich Heilman