DIVIDE-CORRESPONDING (ABAP Keyword) introduction & syntax details
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 for their header lines.
Searches for all sub-fields
that occur both in rec1 and rec2 and then generates, for all field pairs
corresponding to the sub-fields ni , statements similar in the following
form:
DIVIDE rec1-ni BY rec2-ni.
The other fields remain
unchanged.
With more complex structures, the complete names of the field
pairs must be identical.
Example
DATA: BEGIN OF
MONEY,
VALUE_IN(20) VALUE 'German marks'.
USA TYPE I VALUE 100,
FRG
TYPE I VALUE 200,
AUT TYPE I VALUE 300,
END OF MONEY,
BEGIN OF
CHANGE,
DESCRIPTION(30)
VALUE 'DM to national currency'.
USA TYPE F
VALUE '1.5',
FRG TYPE F VALUE '1.0',
AUT TYPE F VALUE '0.14286',
END OF
CHANGE.
DIVIDE-CORRESPONDING MONEY BY CHANGE.
MONEY-VALUE_IN = 'National
currency'.
The above DIVIDE-CORRESPONDING statement is equivalent to
the following three statements:
DIVIDE MONEY-USA BY
CHANGE-USA.
DIVIDE MONEY-FRG BY CHANGE-FRG.
DIVIDE MONEY-AUT BY
CHANGE-AUT.
Note
All fields of the same name are divided,
whether numeric or not. The conversions performed are the same as those for
DIVIDE and similar runtime errors can occur.
Related DIVIDE ,
MOVE-CORRESPONDING , ADD-CORRESPONDING , SUBTRACT-CORRESPONDING ,
MULTIPLY-CORRESPONDING
Related 10 ABAP Syntax Tutorials
Most readed SAP Tutorials
- WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module. - List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes - SELECT-OPTIONS ( SAP ABAP Keyword)
SELECT-OPTIONS is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components. - SAP MM Process Flow
The typical procurement cycle for a service or material consists of the following phases: - SELECT clause ( SAP ABAP Keyword)
SELECT clause is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details.
Latest Added SAP documents
- 9KE9 Transaction code
Details about SAP transaction code 9KE9 - 9KE8 Transaction code
Details about SAP transaction code 9KE8 - 9KE7 Transaction code
Details about SAP transaction code 9KE7 - 9KE6 Transaction code
Details about SAP transaction code 9KE6 - 9KE5 Transaction code
Details about SAP transaction code 9KE5 - 9KE4 Transaction code
Details about SAP transaction code 9KE4 - 9KE3 Transaction code
Details about SAP transaction code 9KE3 - 9KE2 Transaction code
Details about SAP transaction code 9KE2 - 9KE1 Transaction code
Details about SAP transaction code 9KE1 - 9KE0 Transaction code
Details about SAP transaction code 9KE0