Programming in the Implementation Program (BOR)
Use
The information specified about the BOR object type components is only of a descriptive nature. Attribute accesses and method calls are programmed in the implementation program of the object type. This program is called and executed by the system at runtime.
Process
ABAP Editor
During object type definition you select Program to go to the ABAP Editor. You go directly to the lines in the implementation program that contain the relevant source text for the selected method or attribute.
Automatic generation of source text
Parts of the source text can be generated automatically to help implementation. The source text is generated based on the specifications you made when defining the object type and the object type components, and inserted into the implementation program.
Manual postprocessing
When you have completed the automatic part of program generation, you need to check that the program is correct since automatic program generation can only provide templates.
Changes after program generation
Changes made to object type components do not automatically change the program. This means that you must incorporate all subsequent changes made to attributes and methods manually into the implementation program.
Only in the following operations is the source text changed automatically in the implementation program:
-
Deletion of methods
The associated source text is deleted.
-
Deletion of virtual attributes
The associated source text is deleted.
-
Renaming of methods
The method ID in the source text is changed.
-
Renaming of virtual attributes
The attribute ID in the source text is changed. However, the use of the OBJECT-<ATTRIBUTE> variables must be adapted manually.
Including macro instructions
Macro instructions for processing containers and accessing objects are used in the implementation program. The macro instructions are available if the macro <OBJECT> has been included into the implementation program with the INCLUDE command:
* Include macro instructions ************************************************************ INCLUDE <OBJECT>.
The source text above is incorporated already with automatic program generation.
You can use the macro instructions for processing the container outside the implementation program as well. You can also process the container of the implementation program. This is always called CONTAINER and has the following container elements:
-
The method parameters and result for all methods
-
All virtual attributes
The IDs of the container elements are the same as those of the parameters and attributes. The result is stored in the container element _RESULT. You must access the container with these macro instructions under the following circumstances:
-
To read the import parameters of a method
-
To write the export parameters and the result of a synchronous method
-
To read and write the virtual attributes
The macro instructions for accessing objects, attributes, and methods can only be used within the implementation program.