SAP Script Tutorials Page 60

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


64 Assuming KNA1-UMSAT contains the value 0 and the currency is DEM.
&KNA1-UMSAT& -> 0,00
&KNA1-UMSAT(I)& ->
If the field contains an amount other than 0, this value is printed in the normal way.
&KNA1-UMSAT& -> 700,00
&KNA1-UMSAT(I)& -> 700,00 7.6.14 Ignoring Conversion Routines SAPscript conversion routines specified in the Dictionary are automatically recognized and used
when program symbols are formatted. To suppress conversion, use the K option.
Syntax
&symbol (K)& 7.6.15 Changing the Value of a Counter You can increase or decrease the value of a SAPSCRIPT-COUNTER_x (x=0.. 9) counter
variable by 1, before the current counter value is printed.
Syntax:
&SAPSCRIPT-COUNTER_x( +)& Increases by 1 the contents of the counter variable x
(x=0.. 9)
&SAPSCRIPT-COUNTER_x( -)& Decreases by 1 the contents of the counter variable x
(x=0.. 9)
If you want to change the value of a counter variable without actually printing the new value, use
this formatting option together with an additional option to set the output length to 0 (see above).
If you want to set a counter variable to some specific value, use the DEFINE control command.
Assume that &SAPSCRIPT-COUNTER_1& initially has the value 2.
&SAPSCRIPT-COUNTER_1& -> 2
&SAPSCRIPT-COUNTER_1(+)& -> 3
&SAPSCRIPT-COUNTER_1(-)& -> 2
&SAPSCRIPT-COUNTER_1(-)& -> 1
&SAPSCRIPT-COUNTER_1(+0)& ->
&SAPSCRIPT-COUNTER_1(+)& -> 3 7.6.16 Preceding and Subsequent Texts (Pre-Text / Post-Text) In addition to using initial values for symbols, you can specify additional texts that are printed
only when the value of the symbol is no longer the initial value. You can specify a text to be
printed immediately before the symbol value (the pre-text), and a text to be printed immediately
after the symbol value (the post-text). If the symbol contains its initial value, these texts are
suppressed.
Syntax:
& 'pre-text'symbol'post-text'&
Make sure that the symbol, the pre-text, and the post-text all appear on a single line of
the editor. You may have to use a long line (paragraph attribute = or /=) in the editor. The inverted comma ' is used as a delimiter for these texts. If this character is also part of one of
these texts, enter it twice at this point, so that it is not interpreted as a delimiter character. A pre-
text or post-text may itself contain symbols in addition to normal text. However, these symbols
may not have a pre-text or a post-text.
The KNA1-PFACH field contains a customer P.O. Box number. Since the text "P.O.
Box" is not stored in the field along with the value, you would normally write the
following for the P.O. Box line of an address:
P.O. Box &KNA1-PFACH&
Previous Page|Next Page