SAP Script Tutorials Page 61

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

65 However, if no P.O. Box has been specified, the text "P.O. Box" would still appear on its
own in the address. To prevent this, use pre-text or post-text (in this case, pre-text).
P.O. Box &KNA1-PFACH& -> P.O. Box
&'P.O. Box 'KNA1-PFACH& ->
If a P.O. Box has been specified, then this will be displayed together with the
appropriate text in the normal way.
&'P.O. Box 'KNA1-PFACH& -> P.O. Box 123456 7.7 Country-Dependent Formatting Certain fields are formatted specific to a particular country. These include fields for displaying a
date and numeric fields containing either a decimal point or a `thousands' separator character.
The formatting applied is usually determined by the definitions contained in the user master
record. You can use the SET COUNTRY control command to choose a different formatting
operation. The various country-dependent formatting options are stored in table T005X.
Syntax
/: SET COUNTRY country_key
You can specify this country key either by quoting it directly enclosed in inverted commas or by
using a symbol.
/: SET COUNTRY 'CAN'
/: SET COUNTRY &KNA1-LAND1&
You can revert to the settings of the user master record by using the SET COUNTRY
control command again with an empty country name.
/: SET COUNTRY ' '
When SAPscript encounters this command it calls the corresponding ABAP command
internally. The effect of the SAPscript command is thus identical with that of the ABAP
command.

If the formatting turns out other than expected, check the settings in table T005X. 7.7.1 Date Mask To format date fields, use the SAPscript SET DATE MASK command. Executing this command
causes all subsequent date fields to be printed with the specified formatting.
Syntax
/: SET DATE MASK = 'date_mask'
The following templates may be used in the date mask:
DD day (two digits)
DDD name of day (abbreviated)
DDDD name of day (written out in full)
MM month (two digits)
MMM name of month (abbreviated)
MMMM name of month (written out in full)
YY year (two digits)
YYYY year (four digits)
LD day (formatted as for the L option)
LM month (formatted as for the L option)
LY year (formatted as for the L option)
Any other characters occurring in the mask are interpreted as simple text and are copied
directly to the output.
Assuming a current system date of March 1st, 1997.
/: SET DATE MASK = 'Foster City, MM.DD.YY'
&DATE& -> Foster City, 03.01.97
&DATE(Z)& -> Foster City, 3.1.97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997 You can revert to the standard setting by using the SET DATE MASK command again with an
empty string in place of the date mask:
Previous Page|Next Page