Find more freelance jobs
|
38
/: SET DATE MASK = 'Foster City, MM/DD/YY' &DATE& -> Foster City, 03/01/97 /: SET DATE MASK = 'MMMM DD, YYYY' &DATE& -> March 01, 1997 The date mask may be reset to the default setting by using an empty string: /: SET DATE MASK = ' ' The abbreviated and full forms of the names of the days and months are stored in the language dependent TTDTG table under the following keys: · %%SAPSCRIPT_DDD_dd: abbreviated day name · %%SAPSCRIPT_DDDD_dd: full form of day name · %%SAPSCRIPT_MMM_mm: abbreviated month name · %%SAPSCRIPT_MMMM_mm: full form of month name dd: day number 01 = Monday,..., 07 = Sunday mm: month number 01 = January,..., 12 = December 6.7 Formatting Time Fields: SET TIME MASK To format time fields to your needs, use the SET TIME MASK control command. Executing this command causes all subsequent time fields to be printed using the specified format. Syntax: /: SET TIME MASK = 'time_mask' In the time mask, you can use the following codes: · HH hours (two digits) · MM minutes (two digits) · SS seconds (two digits) All other characters found in a time mask are interpreted as simple text and are copied straight into the output. Assuming the current time is 10:08:12, /: SET TIME MASK = 'HH:MM' &TIME& -> 10:08 /: SET TIME MASK = 'HH hours MM minutes' &TIME& -> 10 hours 08 minutes The time mask may be reset to the default setting by using an empty string: /: SET TIME MASK = ' ' 6.8 Country-Dependent Formatting: SET COUNTRY The formatting for certain field types depends on the country settings. These field types include, for example, date fields and number fields that include either a decimal point or the `thousands' separator character. The formatting options defined in the user master record are usually the ones used here. To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command. The country-dependent formatting options are stored in the T005X table. Syntax: /: SET COUNTRY country_key You can enter the country key either as a literal value enclosed in quotes or as a symbol. /: SET COUNTRY 'CAN' /: SET COUNTRY &country_key& Use a blank country name to revert to the setting found in the user master record: /: SET COUNTRY ' ' This SAPscript command actually calls the corresponding ABAP command internally. This guarantees the effect of the SAPscript command to be identical with that of the ABAP command. If the formatting turns out not to be as required, then you should check the settings in table T005X. Previous Page|Next Page |