DIVIDE : ABAP Keyword a day
DIVIDE
Basic form
DIVIDE n1 BY n2.
Effect
Divides the contents of n1 by n2 and places the result in n1 .
This is equivalent to: n1 = n1 / n2.
Example
DATA: SUM TYPE P, NUMBER TYPE P.
DIVIDE SUM BY NUMBER.
Note
The details regarding conversions and performance given under COMPUTE apply equally to DIVIDE . Furthermore: Division by 0 is not allowed, except where 0 / 0 results in 0.
Note
Runtime errors
* BCD_BADDATA : P field contains no correct BCD format
* BCD_FIELD_OVERFLOW : Result field is too small (type P )
* BCD_OVERFLOW : Overflow during arithmetic operation (type P )
* BCD_ZERODIVIDE : Division by 0 (type P )
* COMPUTE_FLOAT_ZERODIVIDE : Division by 0 (type F )
* COMPUTE_INT_DIV_OVERFLOW : Whole number overflow with division
* COMPUTE_INT_ZERODIVIDE : Division by 0 (type I )
Related COMPUTE , DIVIDE-CORRESPONDING
If you like this post, you may as well like these too:
- DIVIDE-CORRESPONDING: ABAP Keyword a day DIVIDE-CORRESPONDING Basic form DIVIDE-CORRESPONDING rec1 BY rec2. Effect Interprets rec1 and rec2 as field strings, i.e. if rec1 and rec2 are tables with header lines, the statement is executed...
- ABAP Keyword a day : ADD ADD Variants: 1. ADD n TO m. 2. ADD n1 THEN n2 UNTIL nz GIVING m. 3. ADD n1 THEN n2 UNTIL nz TO m. 4. ADD n1 THEN...
- COMPUTE: ABAP Keyword a day COMPUTEBasic formCOMPUTE n = arithexp.EffectEvaluates the arithmetic expression arithexp and places the result in the field n .Allows use of the four basic calculation types + , - ,...
- CONVERT: ABAP Keyword a day CONVERT Variants1. CONVERT DATE f1 INTO INVERTED-DATE f2.2. CONVERT INVERTED-DATE f1 INTO DATE f2.EffectAllows conversion between different formats which do not have their own type (see also MOVE ).The...
- ADD-CORRESPONDING : ABAP Keyword a day ADD-CORRESPONDING Basic form ADD-CORRESPONDING rec1 TO rec2. Effect Interprets rec1 and rec2 as field strings. If, for example, rec1 and rec2 are tables, executes the statement for their header...
















Leave a Reply