Показаны сообщения с ярлыком LOG. Показать все сообщения
Показаны сообщения с ярлыком LOG. Показать все сообщения

воскресенье, 14 июля 2013 г.

Application Logging

SAP provides a method to use a standard logging facility for all of your custom ABAP programs. It consists of several transaction codes, tables, and function modules. By using the SAP functionality, it is possible to have a standard way to store error messages, making the handling of errors much simpler, and increasing the maintainablity of code.
Transaction Codes: SLG0 is used to configure categories for the error messages, and SLG1 is used to view the messages.
Tables: BALHDR is the main (header table), and BALM contains all of the detailed messages.
Function Modules: Much like the SAP function modules used to send email, these function modules would benefit from having a simpler interface wrapped around them. The function modules can be found in Function Group SLG0. Look for the INIT, HEADER, and MESSAGE function modules, as well as the WRITE_DB (I think that is the name...). If you want examples of how these function modules are used, please do a where used on them. I am unable to post the SAP examples here.
All APPL_LOG function modules are from 3.0. Starting at 4.6, see function groups that start with SBAL.