6

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 logical database BRF. The macro is known

Demo program using a different logical database. The macro is unknown Demo program using a different logical database. The macro is unknown

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Ulrich Scholz
  • 2,039
  • 4
  • 30
  • 51

2 Answers2

6

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.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
József Szikszai
  • 4,791
  • 3
  • 14
  • 24
  • 1
    I edited your answer about how to generalize the solution for all programs, I see no reason why it wouldn't work. – Sandra Rossi Jun 15 '19 at 18:11
4

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.

enter image description here

Thus it's very easy to find such includes programmatically.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
  • 1
    Well, table D010INC does not help us much because we need to know the exact mechanism/path which which one object includes another. This table only states that the fact that it is included – Ulrich Scholz Nov 22 '17 at 08:30
  • 1
    The exact path is showed in this table, or you probably just misuse word *path*. For your tool this tabular way of include formalization is more useful than digging through SE36/SLDB which you even weren't aware of until now. – Suncatcher Nov 22 '17 at 10:15