With SAP CRM and BOL (Business Object Layer) / GenIL (Generic Interaction Layer), SAP introduced an object-oriented modeling and programming framework. It takes some time to get used to this approach – and knowing OO techniques is most certainly very helpful there – but once you know how to work with BOL/GenIL some development tasks become very easy and straightforward.
With the GenIL BOL and – even more – with the GenIL model browser, SAP delivers tools to analyze and work with BOL objects without requiring custom development. Using these tools, you can browse your BOL model and determine the attributes and relations per object.
However, sometimes you do want to check you objects’ structure directly at run-time, thus in the ABAP debugger. This short post will show you, where to find the appropriate information using the data browser in the debugger. In detail, I will explain how to
- Access the attributes of a BOL object
- Find all related objects
- Find all entities belonging to a BOL collection
To start browsing your BOL object, double-click on a BOL entity or collection. You will see something like this:
What you see here is the structure (classes, attributes) of a BOL entity of type BTAdminH. To navigate to the (plain) attributes, you must open (double-click) CONTAINER_PROXY -> DATA_REF, then doube-click the object type in the view below.
You will see your actually BOL type now (BTAdminH in our example) and be able to navigate one step down via ATTRIBUTE_REF.
Once again, you will have to double-click on the object type, then you will see the BOL attributes as you would for any other ABAP run-time or dictionary structure:
To find about the object related to the current BOL object, go back one step and click on the RELATIONS attribute.
Double-clicking this entry will display a table with all relations (relation types) as well as a list of related entries per type.
You can use the OBJECTS field to navigate to the related objects.
In most cases, you will start with a collection of BOL objects. Moving from a collection to the objects is possible via the ENTITY_LIST attribute. It is a table with all entities belonging to the current collection.
From there, you can use the navigational paths described above. Have fun exploring your BOL objects and collections using the ABAP debugger.