07-22-2005 4:54 PM
Hi,
it would be a neat way of solving a print issue if the output (via sapscripts) could be combined from two print programs.
The two print programs in question are z copies of the delivery note print program and the tranfer order print program. I have taken copies of each and now call the copy of TO print program from the delivery note print program. Can anyone advise what determines when a new spool is created?
The 'newid' param from structure ITCPO which is passed when doing an open-form does not seem to make any difference in this scenario.
thanks
07-22-2005 5:00 PM
I believe that when you do the OPEN_FORM --> CLOSE_FORM is when the spool is determined. I don't that that you can OPEN it in one program and CLOSE it in another. What you are talking about is possible, but it will probably take a large amount of changes. I'm think instead of having two driver programs, you would have one and the same for the sapscript form. You can control what gets printed from an output type or somthing.
For example,
IF the output type is = 'X', then only print the first form. If the output type is 'Y', then print onlny the second form. If the output type is 'Z', then print both forms.
Regards,
Rich Heilman
07-22-2005 5:00 PM
I believe that when you do the OPEN_FORM --> CLOSE_FORM is when the spool is determined. I don't that that you can OPEN it in one program and CLOSE it in another. What you are talking about is possible, but it will probably take a large amount of changes. I'm think instead of having two driver programs, you would have one and the same for the sapscript form. You can control what gets printed from an output type or somthing.
For example,
IF the output type is = 'X', then only print the first form. If the output type is 'Y', then print onlny the second form. If the output type is 'Z', then print both forms.
Regards,
Rich Heilman
07-22-2005 5:10 PM
Thanks for that, unfortunately to throw a spanner in the works we cannot change the output types!
If i repeatedly run, say, the print output function from VL02 with print immediately unflagged it will keep create a spool and then keep adding pages to it. The same works if I keep running the TO program.
So..I wonder what drives this and if it might be manipulated to make the output from two different print programs sit on the same spool?
Im presuming I will have to open and close_form for each ouput in its respective print program?
07-22-2005 5:13 PM
...just seen the 2nd reply - thanks for that. I will try what has been suggested but if anyone can tell me how I can do it without having to copy one program into the other I would be interersted to know...ie avoiding the overhead of having to keep two the print program updated in two places.
07-22-2005 5:16 PM
Vinod - I have tried changing the ITCPO parameters the same but it doesnt seem to make work.
07-22-2005 5:17 PM
In the print dialog box for VL02 and TO can you give the same field values. This may help you to have all the outputs in the same spool.
07-25-2005 9:38 AM
Hi Vinod,
I tried this but unfortunately it didnt work. I will keep working at this.
07-27-2005 2:57 PM
Hi all,
ive still got a probelm with this. Can anyone tell me if it is possible to do this? It one of those problems where it seems to me there should be a way to do this...Im just not sure what?!
08-05-2005 11:42 AM
in the end i managed to do this by bringing data back from the called program and doind a start/end form in the calling program. The problem was due to the two layout sets having different page formats. once they were the same this worked okay.
thanks to all those that helped.
Phil.
07-22-2005 5:04 PM
Put both codes into a single program. Now try calling START_FORM instead of OPEN_FORM for the second form.
~Sivaraj.
07-22-2005 5:11 PM
Hi Phil,
Please try the following option.
Keep all the fields in ITCPO for both the spool requests same and ITCPO-TDNEWID = SPACE.
If this is not working, as others mentioned follow this step.
OPEN_FORM
..START_FORM "First Form
...WRITE_FORM
...
...
..ENDFORM
..START_FORM "Second Form
...WRITE_FORM
...WRITE_FORM
...
..ENDFORM
..
..
CLOSE_FORM
Thanks
Vinod