07-22-2015 10:46 AM
Hi.
I had seen a while ago an abap source code for a report that displays nicely the SLG1 logs.
Does this ring a bell to anyone ?
I am unable to find it, so if anyone has something of that sort and can share it, that would be great.
Regards,
Helder
07-22-2015 12:36 PM
Hi Helder,
The application log will be deleted automatically if entry itself over expired time. To check expired time in DB 'balhdr'.
And If you do not make any entries in the date and time fields, all records that are older than one week are automatically deleted.
And the 3rd possibility is application log be archived by archive object 'BC_SBAL'.
regards,
Archer
07-22-2015 1:06 PM
Hello Helder,
was the report mentioned on help.sap.com?
Because there are some example programs mentioned here:
Function Module Overview - Application Log (BC-SRV-BAL) - SAP Library
Log display and display profiles = SBAL_DEMO_04
Display log insubscreen = SBAL_DEMO_04_SUBSCREEN
Log display in Control Container = SBAL_DEMO_04_CONTROL .
Best regards,
Laszlo
07-22-2015 1:40 PM
Hi Laszlo.
Thanks. Although it's not what I was looking for, it is quite helpful.
I had found a Z report, that was displaying the selected BAL log, in a very fancy.
The standard report is kind of close to that. I will just copy and adapt it.
Cheers,
Helder
07-22-2015 1:50 PM
Hi Helder,
Firstly, you must create the object and subobject in transaction SLG0.
Then you can use this function:
CALL FUNCTION 'APPL_LOG_DISPLAY'
EXPORTING
object = uv_appl_log_obj "Object
subobject = uv_appl_log_subobj "SubObject
external_number = uv_appl_log_extnumber "External ID (not important)
suppress_selection_dialog = 'X'
EXCEPTIONS
no_authority = 1
OTHERS = 2.
Regards.
David Cárceles.
07-22-2015 2:16 PM
07-23-2015 7:53 PM
Hi
it is really a nice transaction from SAP, but youcan program your own as you wish, so any message, you can save it in log file, and you can check it in SLG1,
or you can avoid writing statement in ABAP, write : /................................ , instead of this, you can just display all informaions as SLG1 with nice table and colors, as well as you can monitor every body what he does in SAP system
so look to this demo SBAL_DEMO_02
and these FMs,
'BAL_DB_SEARCH'
'BAL_DB_LOAD'
'BAL_LOG_MSG_READ'
so if you would like to build your own SLOG, and maybe you can face any problem, just let us to know.
Regards
Ibrahim