SAP Script Tutorials Page 62

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

66 /: SET DATE MASK = ' ' 7.7.2 Time Mask You can use the SAPscript SET TIME MASK command to format time fields in a way that differs
from the standard setting. Executing this command causes all subsequent time fields to be
printed with the specified formatting.
Syntax:
/: SET TIME MASK = 'time_mask'
The following templates may be used in the time mask:
HH hours (two digits)
MM minutes (two digits)
SS seconds (two digits)
Any other characters occurring in the mask are interpreted as simple text and are copied
directly to the output.
Assuming the current time is 10:08:12.
&TIME& -> 10:08:12
/: SET TIME MASK = 'HH:MM'
&TIME& -> 10:08
/: SET TIME MASK = 'HH hours MM minutes'
&TIME& -> 10 hours 08 minutes
&TIME(Z)& -> 10 hours 8 minutes You can revert to the standard setting by using the SET TIME MASK command again with an
empty string in place of the time mask: /: SET TIME MASK = ' '
7.8 Formatting Conventions Many allowed combinations of option and symbol type either make no sense or have no effect
at all. The formatting process is divided into two stages: primary formatting and end formatting.
The purpose of primary formatting is to convert the internal form of a symbol value to a
character-based form. The end formatting is then applied to this intermediate form. The
following sections describe the formatting process for each kind of symbol and in which of the
two stages of conversion the various options are applied.
7.8.1 Primary Formatting of System Symbols Certain system symbols must first be converted from their internal representation into a
character representation before the end formatting can be applied to them. The following
system symbols require a primary conversion: · &DAY&, &MONTH&, &YEAR&, &HOURS&, &MINUTES&, &SECONDS& The relevant components are extracted from the system date or system time. Leading zeros
are eliminated if the Z formatting option is specified.
· &DATE& The default behavior is that the system date is printed according to the setting in the user
master record or according to the country-dependent formatting specified in a SET
COUNTRY command.
If a date mask has been defined (using SET DATE MASK), then the formatting specified
there is used for the output.
· &TIME& The default behavior is that the current system time is printed in the form
hours:minutes:seconds
If an alternative time mask is specified (using SET TIME MASK) then this mask overrides
the default setting.
· &PAGE&, &NEXTPAGE& This symbols are initially converted using the options specified in the form of the page
definition.
· &LDATE&
Previous Page|Next Page