Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get long text from SLG1

Former Member
0 Kudos

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

7 REPLIES 7

Phillip_Morgan
Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

To read

Regards,

Raymond

Sandra_Rossi
Active Contributor
0 Kudos

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)

0 Kudos

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

0 Kudos

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.

former_member198275
Active Contributor
0 Kudos

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.