Some information about the ABAP pointer.
1. What is the ABAP pointer:
In ABAP, field symbol is equivalent to the pointer of C language. If you define and assign the corresponding structure or variable to it, it actually points to the address of this structure or variable. If you modify the value of field symbol, the value of the corresponding structure or variable is also changed.
2. How to define pointers:
Basic Format: field-symbols.
Additional information:
1... type: Define a data type, and then define a pointer
2... type ref to: pointer pointing to class or interface
3... type ref to: pointer pointing to Data Structure
4... type line of: Row item of the table in the pointer
5... like: the pointer is of the database table type.
6... like line of: Row item of the database table Type
7... type
3. How to allocate pointers:
(1). Assign F to.: allocate a pointer, which includes the following types:
1 ...... casting...: mainly for Unicode system operations
1A... casting
1B... casting type
1C... casting... decimals Dec
1D... casting like F1
2... type: directly specify the type
3... decimals dec: specifies the number of decimal places
4... Range: specified range
(2) assign a field in the structure to the pointer.
Assign component idx of structure struc.
Assign component name of structure struc.
(3) Assign the class method to the pointer
Assign DREF-> *.
(4) from F, the content after the length of F is assigned to the pointer.
Assign F increment n.
(5) assign a local variable to the pointer.
Assign local copy
3A. Assign local copy of F.
3B. Assign local copy of initial F.
3c. Assign local copy of initial line of itab.
4c. Assign local copy of main table field (f).
(6). Assign dynamicj: dynamically allocates pointers.
4A. Assign (f).
4b. Assign oref-> (f).
4c. Assign (F1) => (F2).
4d. Assign table field (f).
4e. Assign local copy of main table field (f).
4f. Assign local copy of... (f).
4. How to cancel allocation:
Unassign.