Dear community, I recently found an unpublished repository called “BAPI_protocol” in my GitHub account (apparently it’s time to clean up again).
The name says it all: it’s about the protocol that BAPIs generate (if they follow the conventions). The protocol is usually found in a structure (EXPORTING parameter) or table (TABLES parameter) called RETURN. The data type is typically BAPIRET2 or a variation thereof.
I set up the repository at the time because the following circumstance bothers me: many developments pass the internal table into the modules of their respective application, for example to display the protocol or write it to the database. In my opinion, however, the protocol itself is already an object and not an internal table to be passed around.
The relevant information can then be extracted from the object using methods such as CONTAINS_ERRORS. Apart from that, the BAPIRET2 structure also lacks additional information that is typical for a protocol, such as a timestamp. This can then be solved using attributes of the object.
So, the repository is now published and is available to you. If you are interested, you can build on my proof of concept and make more of it.
Have fun developing
Michael