Formatting Date Fields: SET DATE MASK
The formatting for date fields can be defined with the SET DATE MASK control command. Executing this command causes all subsequent date fields to be output using the specified format.
Syntax:
/: SET DATE MASK = 'date_mask'
The following codes can be used in the date mask:
• DD: day (two digits)
• DDD: day name - abbreviated
• DDDD: day name - written out in full
• MM: month (two digits)
• MMM: month name - abbreviated
• MMMM: month name - 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)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
Assuming the current system date is March 1st, 1994.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/94
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1994
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
Formatting Time Fields: SET TIME MASK
You can use the SET TIME MASK control command to format time fields as you require. Executing this command causes all subsequent time fields to be output using the specified format.
Syntax:
/: SET TIME MASK = 'time_mask'
The following codes can be used in the time mask:
• 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 = ' '
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. The SET COUNTRY control command can be used to select a formatting option other than that specified in the user master record. The country-dependent formatting options are stored in the T005X table.
Syntax:
/: SET COUNTRY country_key
The country key can be specified either as a literal value enclosed in quotes or as a symbol.
/: SET COUNTRY 'CAN'
/: SET COUNTRY &country_key&
A blank country name can be used to revert to the setting found in the user master record:
/: SET COUNTRY ' '
This SAPscript command actually calls the corresponding ABAP command internally. Therefore the effect of the SAPscript command is guaranteed 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 the T005X table.
PAGE 10
Position of the Leading Sign: SET SIGN
The usual convention in business applications is to show the leading sign to the right of the figure to which it applies. However, it is sometimes necessary to show the leading sign to the left of the figure.
The SET SIGN control command can be used to specify this globally. Executing this command affects the formatting of all subsequent program symbols that possess a leading sign.
Syntax:
/: SET SIGN LEFT
The leading sign is output to the left of the number.
/: SET SIGN RIGHT
The leading sign is output to the right of the number.
PAGE 11.
Initializing Numbered Paragraphs: RESET
The RESET control command is used to reset the numbering of an outline paragraph to its initial value. If the RESET command is not used, then the numbering of all outline paragraphs in a text will be continuous. If the name of an outline paragraph is specified in the RESET command, then its paragraph numbering and that of subordinate paragraphs will be reinitialized.
Syntax:
/: RESET paragraph_format
The paragraph format specifies the outline paragraph to be reset.
Assume that the paragraph N1 is defined in the style you are using. This kind of paragraph is intended for enumerated lists and causes a sequential number to be output.
* Proceed as follows if you want to work with the SAP R/3
system:
N1 Ensure that you have a PC
N1 Switch the PC on
N1 Click on the SAP icon using the mouse.
* You will then enter the SAP logon screen. In order to log
on here, you must carry out the following actions:
/: RESET N1
N1 Enter your user name
N1 Enter your password
N1 Select the application you want to use
This text specification would be output as follows:
Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.
You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:
1. Enter your user name
2. Enter your password
3. Select the application you want to use
If there were no RESET command between the two sections, then the two lists would be numbered in a single sequence:
Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.
You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:
4. Enter your user name
5. Enter your password
6. Select the application you want to use
RELATED POSTS
SAP SCRIPT CONTROLS 6
SAP SCRIPT CONTROLS 5
SAP SCRIPT CONTROLS 4
SAP SCRIPT CONTROLS 3
SAP SCRIPT CONTROLS 1
The formatting for date fields can be defined with the SET DATE MASK control command. Executing this command causes all subsequent date fields to be output using the specified format.
Syntax:
/: SET DATE MASK = 'date_mask'
The following codes can be used in the date mask:
• DD: day (two digits)
• DDD: day name - abbreviated
• DDDD: day name - written out in full
• MM: month (two digits)
• MMM: month name - abbreviated
• MMMM: month name - 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)
All other characters found in a date mask are interpreted as simple text and are copied straight into the output.
Assuming the current system date is March 1st, 1994.
/: SET DATE MASK = 'Foster City, MM/DD/YY'
&DATE& -> Foster City, 03/01/94
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1994
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
Formatting Time Fields: SET TIME MASK
You can use the SET TIME MASK control command to format time fields as you require. Executing this command causes all subsequent time fields to be output using the specified format.
Syntax:
/: SET TIME MASK = 'time_mask'
The following codes can be used in the time mask:
• 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 = ' '
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. The SET COUNTRY control command can be used to select a formatting option other than that specified in the user master record. The country-dependent formatting options are stored in the T005X table.
Syntax:
/: SET COUNTRY country_key
The country key can be specified either as a literal value enclosed in quotes or as a symbol.
/: SET COUNTRY 'CAN'
/: SET COUNTRY &country_key&
A blank country name can be used to revert to the setting found in the user master record:
/: SET COUNTRY ' '
This SAPscript command actually calls the corresponding ABAP command internally. Therefore the effect of the SAPscript command is guaranteed 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 the T005X table.
PAGE 10
Position of the Leading Sign: SET SIGN
The usual convention in business applications is to show the leading sign to the right of the figure to which it applies. However, it is sometimes necessary to show the leading sign to the left of the figure.
The SET SIGN control command can be used to specify this globally. Executing this command affects the formatting of all subsequent program symbols that possess a leading sign.
Syntax:
/: SET SIGN LEFT
The leading sign is output to the left of the number.
/: SET SIGN RIGHT
The leading sign is output to the right of the number.
PAGE 11.
Initializing Numbered Paragraphs: RESET
The RESET control command is used to reset the numbering of an outline paragraph to its initial value. If the RESET command is not used, then the numbering of all outline paragraphs in a text will be continuous. If the name of an outline paragraph is specified in the RESET command, then its paragraph numbering and that of subordinate paragraphs will be reinitialized.
Syntax:
/: RESET paragraph_format
The paragraph format specifies the outline paragraph to be reset.
Assume that the paragraph N1 is defined in the style you are using. This kind of paragraph is intended for enumerated lists and causes a sequential number to be output.
* Proceed as follows if you want to work with the SAP R/3
system:
N1 Ensure that you have a PC
N1 Switch the PC on
N1 Click on the SAP icon using the mouse.
* You will then enter the SAP logon screen. In order to log
on here, you must carry out the following actions:
/: RESET N1
N1 Enter your user name
N1 Enter your password
N1 Select the application you want to use
This text specification would be output as follows:
Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.
You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:
1. Enter your user name
2. Enter your password
3. Select the application you want to use
If there were no RESET command between the two sections, then the two lists would be numbered in a single sequence:
Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.
You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:
4. Enter your user name
5. Enter your password
6. Select the application you want to use
RELATED POSTS
SAP SCRIPT CONTROLS 6
SAP SCRIPT CONTROLS 5
SAP SCRIPT CONTROLS 4
SAP SCRIPT CONTROLS 3
SAP SCRIPT CONTROLS 1
No comments :
Post a Comment