on 12-13-2011 11:28 AM
Hi
We have 2 printer types with 8 and 10 output trays. We have for this defined print-controls TRO10-TRO19 for one device type and ZTRY1-ZTRY8 for an other device type.
We use this in Sapscripts to control output tray per user. In a simple Z-table we have defined what print control to use if user xxx prints on printer yyyy.
This is used for users in the shipping department printing tons of documents like delivery notes, customs declarations etc. and the user is really saving a lot of time because of this solution.
Now we also want to implement the solution in smartforms, but what was very smart in sapscript seems to be not so smart i smartforms.
In sapscript we could simply use the print-control command with a variable like this:
PRINT-CONTROL &GW_PRCTL&
But in smartforms it seems we have to hard code 18 command elements - one for each Printer Control - and then by conditions on each command element control, that only one of them is used. And if we get an ekstra tray on one of the printers or a new printer type with other print controls for tray selection, then we have to change the hard coded elements.
Please tell me the is a smarter solution for smartforms.
Hi,
I would suggest you try to add at the begining of your smartform a Node of type "Program Lines" and call the function Module "SSFCOMP_PRINT_CONTROL". Pass the to it the value TRY01, TRY02...or TRY10, etc.
hope this will help!
Bahjat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOL
By debugging I just found that even though the print control field is not designed for a variable, it still works with a variable.
The print control field is only 5 chars. long.
So my solution is
1) crate a global variable with the name PC
2) Crate a window as 1. window in page 1
3) in this window create a coding block that sets the variable PC with the correct printer control
4) create the command element and fill the Print Control field with &PC&
Thats it.
LOL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Thomas,
Could you please elaborate this situation of which I have faced a little bit in different way. We print every papers one day after they published, so I need to dynamically manage the rotation of them whether they should be printed landscape or portrait in a specific dot matrix printer that the default setting of rotation is set to 'portrait'.
I think, it could be easily handled by using PRINT-CONTROL, but, in fact I don't know how to use it.
Regards.
Eray
Hi Eray
I don't understand "We print every papers one day after they published..." but I understand that you for some reason need dynamic page format / orientation in smartforms.
The page format and orientation is a fundamental setting in smartforms on header level, that can not be set dynamic. You may be able (not sure) to change the orientation by creating a command element in a smartforms window with a orientation printer control, but will that make sense?
If the output is build for landscape, and you then by some dynamic code tells the printer, that it should make a portrait output, then the result will be rubbish.
Hi,
Indirectly, it would be posible at smartfrom runtime (by defining all the necessary portrait/landscape pages with their respective layouts and output sequences and setting the start page in INITIALIZATION). I would go as far as saying that it is impossible (and senseless) to try to re-format anything once the output (the spool request) is "published" to SAP Spool, and the output request is created one day later - if that's the scenario.
cheers,
Janis
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.