05-11-2016 2:12 PM
Hello everyone,
For a customer I have to read the long texts from SLG1 in a new XML file.
This is the SLG1 now:
I want to read the long text from 'Selected Broker Contracts 1' and 'Exceptions 1'.
This is the long text for the exception:
Does anyone know how this is possible?
Thanks in advance.
Kind regards,
Pieter
05-11-2016 2:33 PM
This should be done by function modules. SLG1 is a transaction for the application logs.
Look at function groups SBAL, SBAL_DB, SBAL* .
Look at BAL_DB_LOAD to start.
Many of the functions have documentation.
05-11-2016 2:33 PM
I guess you have to access to the application log data. Take a look into package SZAL, especially the function groups starting with SBAL. There is e.g. the function module BAL_LOG_READ, which returns amongst others a list of messages. There you should find a possibility to get the long text.
05-11-2016 2:56 PM
To read
Regards,
Raymond
05-11-2016 10:48 PM
the BAL_* function modules are to be used to read the log (APPL_* function modules are valid but deprecated when SAP released the BAL_* ones).
BAL_DB_LOAD to read the whole log, but it's just stored in memory, and you need to use BAL_GLB_SEARCH_MSG to filter the messages you want (based on the message class and ID for instance) and get the message IDs, then you read each message using BAL_LOG_MSG_READ to get the number after the message.
PS: I didn't understand why you need to extract the long text from the message, what is the interest as it will never change, could you explain? (only the message variables do change, they are not part of the long text itself as it only contains the placeholders)
05-12-2016 8:52 AM
Hello Sandra,
This must be done, because the customer wants to export the logs to an XML file. Which inludes the long text of the exceptions etc.
Kind regards,
Pieter
05-12-2016 9:31 AM
I meant : if you only want the texts from these 2 exact messages you mentioned, then you may simply hardcode them. That was what I meant. If you now say you want to export the whole log (that was not said in your first post), then okay for function module mentioned by Raymond.
05-12-2016 5:46 AM
hi,
Refer "APPL_LOG_DISPLAY" to get these details. The header details are read from BAL_DB_LOAD. then you can debug one to get how the data are getting populated.