We are writing a tool in Java that parses and transforms ABAP code. We therefore have no intention to write new ABAP code but our tool has to handle all of ABAP, even obsolete statements. Furthermore, I'm not an ABAP expert.
One object we see uses a macro begin_of_block
that is defined in object RFDBRMAC
. That include is loaded in case the logical database BRF
is used; using another logical database as well as no logical database at all will not load it. But neither its corresponding object SAPDBBRF
nor its includes mention RFDBRMAC
. In particular, none of the former include the latter.
How does assigning the logical database BRF
to a program makes it include RFDBRMAC
?
Demo program using logical database BRF. The macro is known
Demo program using a different logical database. The macro is unknown
Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables and associate them with executable ABAP programs while defining the program contents.
The structure editor of the Logical Database Builder appears. On the left is the name of the root node, followed by a code for the node type: T for a database table, S for a ABAP Dictionary type, and C for a type from a type group. The new logical database now has a structure with a single node.
Double click the SAP logical database name to open the Display Logical Database SAP screen. ABAP developers can also use transaction code SE36 (tcode SE36) to display logical databases. Double click on the logical database name. Or you the transaction code SE36 for displaying logical database on the SAP editor.
A macro is a summary of a statement list for internal reuse within a program between DEFINE and END-OF-DEFINITION. The statement list is included in another position in the program by specifying the macro name.
In transaction SE36
display the logical DB BRF
. Then click the pushbutton 'Selections' (or Menu: Goto / Selections or Shift + F1). This will display the include DBBRFSEL
, where the selection screen is defined for the logical DB. On the bottom of this include you'll find what you are looking for.
To generalize this for all logical DBs, the selection screen is named DBxxxSEL
where xxx
is the name of the logical database, and is automatically included in all programs which use this logical database.
In addition to Jozsef's perfect answer I can add that you can utilize table D010INC
which holds all include relations between programs and includes.
Thus it's very easy to find such includes programmatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With