‎2007 Jul 27 6:36 AM
hi,
please explain what is print control ? what is the use of that?
if u r using only one layout in sapscript what is the use of using start_form?
in my sapscript i need according to p doc no . i need total weight,also
output should look like:
each of the weight and the total
-
eg : first item 1200
second item 5000
total 6200.
how to that pls explain
‎2007 Jul 27 6:40 AM
Hi
Start_Form: In-between the function modules OPEN_FORM and CLOSE_FORM, we can use different layout sets. This allows us to combine several different layout sets into one print output. However, we can combine only those layout sets that have the same page format. To switch layout sets, use the function module START_FORM. If another layout set is still open, we must close it first using END_FORM. If we specify no layout set name when calling START_FORM, the system restarts the last open layout set. If after OPEN_FORM no layout set was activated yet, the system leaves the function module with the exception UNUSED. Some of the important export parameters for this function module are
Form: The parameter contains the name of the layout set you want to use for printing. If you specify no layout set here, the system restarts the last active layout set.
Language: Layout sets are language-dependent. Enter the desired language here. If the layout set does not exist in this language, the system tries to call the layout set in its original language. If the parameter LANGUAGE is empty, the system uses the language of the last active layout set.
Startpage: Usually, SAP script starts with the page specified as start page in the layout set definition. If we want to start output with another layout set page, enter the name of the desired layout set page here. If the desired page is not defined, the system uses the start page defined in the layout set.
Program: To replace program symbols, SAP script must know which active program contains the work areas for the values to be passed. If we omit the parameter, the system searches for the field values in the program that was specified in the parameter OPTIONS (field TDPROGRAM) of OPEN_FORM. If we enter a program name, the system replaces the program symbols with the values from this program up to the next END_FORM.
Exceptions and other Export, Import parameters are self-explanatory.
Print control means maintaining the parameters related to that output type to print the script printout.
SAPScripts
<b>Link for SAP Scripts (step by step procedure)
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 27 6:44 AM
<b>Use of PRINT-CONTROL in SAPscript</b>
SAP Note No. 66478
Symptom
What do I have to bear in mind when using the PRINT-CONTROL command in SAPscript texts or forms?
Additional key words
SAPscript, PRINT-CONTROL, printer control, bar code
Cause and preconditions
Information requirement in addition to the documentation
Solution
The PRINT-CONTROL command in SAPscript (see note 5196 or ABAP/4 syntax
documentation for the command PRINT-CONTROL) was implemented so that it
is possible to include printer-specific commands in SAPscript texts and
forms.These commands are used to call special functions on the printer
or output device that are not supported by the existing SAPscript
printer drivers. PRINT-CONTROL enables you to modify the print data
stream created by the SAPscript printer drivers within certain limits or
to send additional commands.
The SAP standard (or standard forms of the SAP applications) does not
use any print CONTROL commands in SAPscript, because these are always
printer-specific and may lead to unforseeable consequences as well as
problems during the upgrade.
Information on using the command PRINT-CONTROL in SAPscript texts or
forms.
The print control, which is issued via the PRINT-CONTROL command, should
always be a print control created in the customer namespace (Zxxxx) for
the device type used. You should not use any Sxxxx print controls as
their contents may change at any time due to SAP release and driver
updates. Refer to note 3166 for information on how to modify SAP device
types.
The printer commands contained in the print control should not affect
the current printer settings because the SAPscript printer driver does
not have any information regarding the changes that may be triggered by
a print control and that would, therefore, have to be reset by
printer-specific commands. The printer driver assumes that the print
control does not affect the texts/graphics issued subsequently.
You should never use PRINT-CONTROL for controlling print attributes
already contained in the SAPscript driver. You must change these
attributes in the normal way via the form or style definitions and the
definition of device types.
In particular, you should never use PRINT-CONTROL to change the current
font, font attributes (such as Unterline, Bold, and Italics), paper
tray, print mode (one-sided/double-sided), current character set, print
position, text color, coordinate system, page orientation, and so on as
this may affect the print output of any subsequent regular text. In each
case, the particular text/form author using PRINT-CONTROL is responsible
for the consequences of using the function.
SAP cannot provide any support for print output errors caused by
PRINT-CONTROL commands or implement program modifications in the SAP
standard due to these errors.
The recommendations of this note are equally valid for ABAP lists (and
the use of the ABAP PRINT-CONTROL command).
The following example makes clear why using PRINT-CONTROL is "dangerous"
in SAPscript:
In the window of an SAPscript form the following text is entered:
/: PRINT-CONTROL ZPRCT
= command
In this case you expect that the contents of the print control ZPRCT
will appear and directly afterwards the text "command" (at least for
device types operated with HPL2 (PCL-5) or STN2 (line printer) during
the print output of the form window. However, this does not have to be
the case!For the SAPscript printer drivers, the first text to be printed
in this form window is the string "command" since the driver does not
know what is triggered by the data contained in the Printcontrol ZPRCT
at the printer.For this reason the printer driver may first send the
contents of the print control ZPRCT, then execute a character set
selection and/or the font selection (to choose the current font) and
after this, send the string "command".In this case, print commands are
sent by the driver to the printer between the print control and the
string "command"!
You basically cannot rely on the printer driver not to insert print
commands between PRINT-CONTROL xxxxx commands and "normal" text in a
SAPscript text.
Regards,
Pavan