SAP Script Tutorials Page 44

myitcareer.org-Your IT Career Partner For Life. Please Bookmark It.
Software Engineering Tools | Buy Book | Buy Phone | Top Web Hosts | Rules Engines
Yoga Meditation | Invention Ideas | Wireless Health, mHealth | Manage Project
Knowledge Management
Plan Wedding | Online Tuition | Top Domain Registrars
Hire Freelancer | Hosting Charges | Android Application Design and Development

48 READ TABLE IN_PAR WITH KEY `NEXTPAGE'.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY `BARCODE'.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = `|'.
"First page ELSE.
OUT_PAR-VALUE = `||'.
"Next page ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = `L'.
"Flag: last page ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
6.18 Inserting Print Controls: PRINT-CONTROL You can use this command to call certain printer functions from a SAPscript text. Although you
cannot enter control characters for the printer directly in your text, you can define a print control
via the spool maintenance transaction SPAD that contains the printer commands you want. You
can then call a print control using the PRINT-CONTROL SAPscript command.
Syntax:
/: PRINT-CONTROL name
Specify the name of the print control either with or without inverted commas.
The print control printed via PRINT-CONTROL should always be a print control created in the
customer name area (Zxxx) for the device type used. Use no Sxxx print controls, since their
contents may be changed by SAP at any time with a release or driver modification. To modify
SAP device types, refer to Note 3166.
The printer commands in the print control must never effect the current printer settings, since
the SAPscript printer driver has no information on any changes triggered by a print control,
which would have to be undone by commands of the driver itself. The printer driver assumes
that the print control has no effect on any texts or graphics printed afterwards.
Never use PRINT-CONTROL to control print attributes covered by the SAPscript driver.
To change such print attributes, use the usual method of defining form and style and the
device type accordingly.
· The contents of the print control called are transparent to SAPscript.
SAPscript cannot check whether the printer commands contained in the
control are correct. Therefore, if you experience problems when printing a
text containing these commands, you should first try to print the text without
the print controls. Then, reintroduce the PRINT-CONTROL commands one
by one until the command causing the problem is identified. · You should ensure that the printer control sequences you define leave the
printer afterwards in a well-defined state. SAPscript assumes that after
completing each text output certain settings (for example, font, current
page) are still valid for subsequent printing. If your printer commands
change these settings without resetting them again afterwards, the results
may be unpredictable. After executing a PRINT-CONTROL command, SAPscript inserts a space character at the start
of the next text line. If you do not want this, you should give this text line the '=' paragraph
format.
6.19 Boxes, Lines, Shading: BOX, POSITION, SIZE Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print
particular windows within a form or passages of text within a window in a frame or with shading.
Previous Page|Next Page