Make your own free website on Tripod.com

SAP Script Tutorials Page 57

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

61 7.6.2 Output Length If you need only a part of the symbol value, or the output has to fit into a box or a field on the
screen without overlapping the edges of this area, then you can use an output length
specification to define how many bytes of the value should be copied.
Syntax
&symbol( length)&
If < symbol> has the value 123456789.
&symbol(3)& -> 123
&symbol(7)& -> 1234567
You can combine an output length specification with an offset specification. The
specified length is then counted from the specified offset position.
&symbol+4(3)& -> 567 If a length specified is greater than the current length of the value, then spaces are appended to
the symbol value.
You can use the character * to specify the length of a program symbol. The value of the symbol
is then printed using the output length defined in the ABAP Dictionary.
Syntax
&symbol (*)&
The SYST-UNAME field contains the logon name of a user called Einstein . The
Dictionary entry for this field contains an output length of 12.
&SYST-UNAME&... -> Einstein...
&SYST-UNAME(9)&... -> Einstein...
&SYST-UNAME(*)&... -> Einstein ... 7.6.3 Omitting the Leading Sign Program symbols with numeric values can have a leading sign. This sign usually appears to the
right of the numeric value, either as a space for positive numbers, or as a minus sign for
negative numbers . You can use t he S option to ensure that the value is formatted without
the sign .
Syntax
&symbol (S)&
The ITCDP-TDULPOS field contains the value -100.00. The ABAP Dictionary definition
for this field includes a leading sign.
&ITCDP-TDULPOS& -> 100.00-
&ITCDP-TDULPOS(S)& -> 100.00
7.6.4 Leading Sign to the Left The leading sign is normally displayed to the right of a numeric value, except in the case of a
floating point number. This option enables you to specify that the leading sign should be placed
to the left of the number.
Syntax
&symbol (<)&
&ITCDP-TDULPOS& -> 100.00-
&ITCDP-TDULPOS(<)& -> -100.00

The SET SIGN LEFT control command specifies that all subsequent symbols with a
numeric value should have a left-justified leading sign. If you use this control command,
you must no longer repeat the < option for each individual symbol.