cancel
Showing results for 
Search instead for 
Did you mean: 

Content of the Audit Log

peter_strauss
Participant
0 Kudos

Hello,

It seems that the text of the audit log is contained in table xi_af_msg_audit ins the J2EE schema under field text_key.

If I access this key directly from the database it seems to be unnecessarily long, with a lot of blank space padding.

Is it possible to control what is recorded in this field and hence what is displayed in the Audit Log?

Kind regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

You can simply use the AuditMessageKey class to write your own audit log entries. A similar code would be

AuditMessageKey auditMKey = new AuditMessageKey(message.getMessageId(), AuditDirection.INBOUND);
		Audit.addAuditLogEntry(
			auditMKey,
			AuditLogStatus.SUCCESS,
			"Custom Message");

Regards,

Prateek

peter_strauss
Participant
0 Kudos

Hi Prateek,

Full marks.

I think that some of the audit information written by SAP is unnecessarily long, with a lot of padding with space characters.

Thanks for your help.

Peter

peter_strauss
Participant
0 Kudos

Hello Prateek,

Is addAuditLogEntry applied as a prepared statement?

(I don't know very much about J2EE so I apologise if my question doesn't make sense)

Peter

prateek
Active Contributor
0 Kudos

It is a predefined function. This may help.

http://help.sap.com/saphelp_nw04/helpdata/en/3b/6fe540b1278631e10000000a1550b0/frameset.htm

The blog below will show you sample usage

/people/ganesh.karicharla2/blog/2008/02/20/adapter-module-development-module-configuration

Regards,

Prateek

peter_strauss
Participant
0 Kudos

Hi Prateek,

Thanks again for your answer. This should be enough for my purposes.

Kind regards,

Peter

Answers (0)