DETAIL.
This key word is the same as the statement
This key word is the same as the statement
FORMAT INTENSIFIED OFF.
The latter is recommended due to better readability.
The latter is recommended due to better readability.
Note
When outputting data to a list, you also use the addition INTENSIFIED OFF of the WRITE statement to change the output format for single fields.
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.
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 POST
DESCRIBE SYNTAX FOR INTERNAL TABLE IN SAP ABAP
SAP web application and business server pages
SAP authorization and client administration in mysap.com
No comments :
Post a Comment