SAP Script Tutorials Page 33

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

37 6.5 Assigning a Value to a Text Symbol: DEFINE Text symbols acquire their values as a result of explicit assignment. To interactively assign text
symbols, in the text editor choose Include Symbols Text. This method is available for all
text symbols belonging to a text module as well as those of the associated form.
Values defined in this way are lost when the transaction is left. If you want to print the text
module again, then you must enter the symbol values again. The purpose of the DEFINE
command is to provide a means of making this value assignment a permanent part of the text,
so that the values are available again when the text module is called again. This command can
also be used to re-assign a new value to a text symbol half-way through the text.
Syntax:
/: DEFINE &symbol_name& = 'value'
/: DEFINE &subject& = 'Your letter of 7/3/95'
The value assigned can have a maximal length of 60 characters. It may itself contain
other symbols. A symbol contained within the value assigned to another symbol is not
replaced with its own value at the point at which the DEFINE command is executed.
Rather, this replacement is made when the symbol defined in the DEFINE command is
called in the text.

/: DEFINE &symbol1& = 'mail'
/: DEFINE &symbol2& = 'SAP&symbol1&'
/: DEFINE &symbol1& = 'script'
&symbol2& -> SAPscript
If, however, the DEFINE command is written using the ':=' character rather than the '='
character, then any symbol contained within the value being assigned is replaced
immediately with its current value. The assignment to the target symbol is made only
after all symbols in the value string are replaced with their values. The total length of the
value string may not exceed 80 characters. The target symbol must be a text symbol,
as before.

/: DEFINE &symbol1& = 'mail'
/: DEFINE &symbol2& := 'SAP&symbol1&'
/: DEFINE &symbol1& = 'script'
&symbol2& -> SAPmail 6.6 Formatting Date Fields: SET DATE MASK To define the formatting of date fields, use the SET DATE MASK control command. Executing
this command causes all subsequent date fields to be printed using the specified format.
Syntax:
/: SET DATE MASK = 'date_mask'
In the date mask, you can use the following codes: · 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, 1997.
Previous Page|Next Page