38
PUBLIC
© 2019 SAP SE or an SAP affiliate company. All rights reserved.
How to Customize Printing Layouts with the Print Layout Designer
Creating New Fields
Operation Description
Displays the number of characters in the selected field (a space is regarded as
a character). For example, using this operation on a Remarks field that
contains a value with 100 characters, results in the value 100 being printed.
· Sentence (Text as String, SentenceIndex as Number)
Cuts an entire sentence from the selected field (up to the next Enter mark). In
Field 2 select a number to indicate the required sentence number to cut.
· Substring (Text as String, SubStringLength as Number)
Cuts a selected number of characters from the left of a selected field (a text
field containing a number should be linked). For example, selecting Substring
(Unique_ID, 2) using the unique ID of a field containing the string ‘SAP
Business One’ prints ‘P Business One’.
· Substring (Text as String, SubStringStartIndex as Number)
Cuts a selected number of characters from the left of a selected substring of a
field. For example, selecting Substring (Unique_ID, 0, 5) using the unique ID of
a field containing the string ‘SAP Business One’ prints ‘SAP B’ (it takes the first
5 characters and cuts 0), and selecting (Unique_ID, 2, 5) prints ‘P B’.
Date Operations · Day (Date as String)
Returns the day part of a date.
· Month (Date as String)
Returns the month part of a date.
· MonthName (Month as Number)
Returns the name of the month. You enter the number (for example, 6) and it
prints June.
· Year (Date as String)
Returns the year part of a date.
Condition Operations To use condition operations:
· The condition must be IF and must consist of 2 fields.
· The calculation field displaying the result must be located in an area below its
calculated fields.
To use conditions on fields, follow these steps:
1. Create a text field of formula source type for displaying the result. The
result is 1 if the condition is met and NULL if the condition is not met.
2. In the Formula field, select Formula Editor.
3. Select the fields for the condition by searching for them in the field index
or entering them manually. You can also select hidden fields.
4. In the Operation field, select the condition to apply to the selected fields.
(Not equal !=, Less than <, Greater than >, and so on)
The main use of conditions involves the Link to option. If the condition is not met
and the field is NULL, then none of the fields linked to it are printed.
Cast Operations · ToNumber (String)
Explicit cast from string to number.