SAP ABAP Data Element ISMFORMLINE (Line of Formula)
Hierarchy
☛ SAP_FIN (Software Component) SAP_FIN
   ⤷ CO-PC-PCP (Application Component) Product Cost Planning
     ⤷ CK_ECP (Package) Easy Cost Planning
Basic Data
Data Element ISMFORMLINE
Short Description Line of Formula  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type CHAR80    
Data Type CHAR   Character String 
Length 80    
Decimal Places 0    
Output Length 80    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name LINE   
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 0   
Medium 0   
Long 0   
Heading 0   
Documentation

Definition

Allowed entries:

  • Arithmetic formulas (with floating point result of type FLOAT)
  • Logical formulas (with result TRUE or FALSE)
  • Conditions in the form IF <logical expression> THEN <arithmetic formula> ELSE <arithmetic formula>
  • Expressions with fields of structure SY

Example:

FORMULA = COS(A**2+B**2)

FORMULA = IF X>0 THEN SIN(X) ELSE SIN(-X)

FORMULA = SY-TZONE / 2.324

Operands

The following operands are allowed:

  • Number constants, such as -5, 3.1416, 1.3E12
  • Variables
  • TRUE
  • FALSE
  • PI (= 3.14159 ...)
  • SY-UZEIT
  • SY-DATUM
  • Formal parameters such as #1, #2

Functions

The following functions are supported:

ABS    Absolute amount

    Example: FORMULA = ABS(-2)

    Result: 2

NOT    Negation

    Example: FORMULA = IF NOT(2<3) THEN (5*6) ELSE (5-7)

    Result: -2

SIN    Sine

    Example: FORMULA = SIN(PI/2)

    Result: 1

COS    Cosine

    Example: FORMULA = COS(0)

    Result: 1

TAN    Tangent

    Example: FORMULA = TAN(2*PI)

    Result: 0

LOG    Logarithm with base e (natural logarithm)

    Example: FORMULA = LOG(2.7182746352)

    Result: 1

EXP    Exponential function for base e

    Example: FORMULA = EXP(1)

    Result: 2.7182746352

SQRT    Square root

    Example: FORMULA = SQRT(144)

    Result: 12

ROUND    Rounding to whole number

    Example: FORMULA = ROUND(3.14159)

    Result: 3

TRUNC    Truncation

    Example: FORMULA = TRUNC(5/3)

    Result: 1

MOD    Modulo

    Example: FORMULA = 10 MOD 3

    Result: 1

DIV    Integral quotient

    Example: FORMULA = 10 DIV 3

    Result: 3

Operators

The available operators are grouped into 6 levels based on their precedence. The operators at level 0 bind the weakest, while those of level 6 bind the strongest.

The following operators are available:

Level 0:

AND    Logical AND

OR    Logical OR

Level 1:

=    Equals

<>, ><    Does not equal

<    Less than

>    Greater than

<=, =<    Less than or equal to

>    Greater than

=>, >=    Greater than or equal to

Level 2:

+    Plus sign (of an expression)

-    Negative sign (of an expression)

+    Addition

-    Subtraction

Level 3:

*    Multiplication

/    Division

Level 4:

**    Exponentiation

Level 5:

ABS    Absolute amount

NOT    Negation (of a logical statement)

Level 6: all other functions.

Notes

  • In contrast to ABAP, blank spaces are ignored.
  • No additional literals can be used within a formula.
  • Character strings in double quotation marks are interpreted as a comment and are therefore ignored.

History
Last changed by/on SAP  20041006 
SAP Release Created in 464