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: 

Application log

konstantinos_vassiliadis
Active Participant
0 Kudos

Hello experts,

I am having a requirement to run an online transaction that will create application log entries. The transaction processed one input XML file and at the end writes some messages in the application log displayed via slg1. The customer's requirement, if possible, is to create an application log on a daily basis for all XML files processed on the day. Technically speaking, as I understand it, there should be one Log number and one Log handle per day. I made some tests and I cannot find a way to somehow append messages to a log when the log has already been saved (BAL_DB_SAVE). I was thinking of using a Z table with all messages to be added to the log at the end of the day.

Thank you in advance,

Konstantinos

1 ACCEPTED SOLUTION

konstantinos_vassiliadis
Active Participant
0 Kudos

In other words...is it possible to add messages to a log (that has been created via BAL_LOG_CREATE) from different transaction instances when in each instance the log was saved (via BAL_DB_SAVE)?

My impression is NO, it is not possible. If a log is displayed via SLG1 it means it was saved in the database and another transaction cannot update its contents.

5 REPLIES 5

konstantinos_vassiliadis
Active Participant
0 Kudos

In other words...is it possible to add messages to a log (that has been created via BAL_LOG_CREATE) from different transaction instances when in each instance the log was saved (via BAL_DB_SAVE)?

My impression is NO, it is not possible. If a log is displayed via SLG1 it means it was saved in the database and another transaction cannot update its contents.

0 Kudos

Hello  Konstantinos,

In this link have all the information to create and use logs.

http://scn.sap.com/docs/DOC-27066

I hope you help.

0 Kudos

Hello Pau,

thanks a lot, however what I am asking is specific and deals with if it is possible to add messages to a log not within the same transaction - this is straightforward - but from a number of instances of a transaction that will run on a day. My impression is that once BAL_DB_SAVE is issued it is not possible to somehow "open" the log and add more messages to it...

0 Kudos

Hello Konstantinos,

you can not add more logs for the same log_handle            

but you can create new logs for your OBJECT and SUBOBJECT for the same External Id.

thus each execution of the transaction generates a new log.

0 Kudos

Ok Pau, thanks a lot! This is what I thought and you confirm it, too.