The preface
We can focus on my public number, the number public in the layout better, read more comfortable.
Body part
There have put income, in turn explain, for example behind for beginners (because there are a lot of people asked me this)
Some information about abap pointer.
1. What is abap pointer:
in abap inside, fieldsymbol equivalent pointer c language. If you define and assign the appropriate structures or variables to it, in fact, it points to the address of the structure or variable, if you modify the value fieldsymbol, the corresponding value of the structure or variable also will change.
2. How to define a pointer:
the basic form: field-symbols.
Additional information:
. 1 .... type: define a data type, and then define the pointer
2 .... typerefto: a pointer to the class or interface
3 .... typerefto: pointers to data structures
4 .... typelineof: line items within the pointer table
5 .... like: type database table pointer
6 .... likelineof: pointer type line item database table
7 .... type <>: pointer in the table
3. how allocation pointer:
(. 1) .assignfto .: assigned a pointer, including the following types
1 .... casting ...: operating system mainly unicode
. 1A .... Casting
1B .... castingtypetype
1C .... Casting ... decimalsdec
1D castinglikef1 ....
2 .... TypeType: directly specify the type
3 .... decimalsdec: Specifies the number of decimal places
4 .... rangerange: specified range
. (2) assigned to a field structure pointer
assigncomponentidxofstructurestructo.
Assigncomponentnameofstructurestructo.
(. 3) a method of allocating a pointer to the class.
Assigndref-> to *.
(. 4). from the beginning f, f is the content of n times after a long pointer assigned to
assignfincrementnto.
(. 5). pointer to the local variables assigned
assignlocalcopy
3a.assignlocalcopyoffto.
3b.assignlocalcopyofinitialfto.
3c.assignlocalcopyofinitiallineofitabto.
4c.assignlocalcopyofmaintablefield (F) to.
(. 6) .assigndynamicj: dynamic allocation pointer
. 4a.assign (F) to
. 4b.assignoref -> (F) to
. 4c.assign (F1) => (F2) to
4d.assigntablefield (F ) to.
4e.assignlocalcopyofmaintablefield (f) to.
4f.assignlocalcopyof ... (f) to.
4. How unassigned:
Unassign.
Example 1:
Example 2: