Reputation: 27825
I would like to log each call of my RFC function module. What is the current state of the art in SAP/ABAP to do this?
Where do these logs get stored and how to see them? Or is it better to create a custom table and write the calls into this table?
ABAP version is 7.4
Upvotes: 1
Views: 3529
Reputation: 10621
SAP has a special framework for enabling the RFC logging, it is called LOWGWIN (LOGCOM 200).
Feature set:
The logging of RFCs allows you to establish which users had access to which data at what point in time. You can log data on RFC Function Module (FM) level, for example:
Type of parameters
Name and corresponding values of parameters
In order to minimize the amount of logged data, you can do the following:
Restrict logging to certain users
Filter the parameters that need to be logged before they are included in the log records
Enable logging on client level only for the RFC Function Modules that you want to log
You can fine-tune wich RFC calls (modules) will be logged including successful or failed ones by BAdI /LOGWIN/BADI_RFC_LOG_FILTER
.
Initially the log is stored temporarily in SAP and can be viewed via transaction /LOGWIN/SHOW_LOG
, after that you can transfer necessary log records to external repository (which you should set up in advance) by transaction /LOGWIN/TSF_TO_EXT
.
Architecture overview:
More documentation is here:
> Software Downloads > Installations and Upgrades > A–Z Index > L > LOGGING OF RFC AND WEB SVCS 2.0
Upvotes: 3
Reputation: 4337
There is a set of log transactions, notably SLG0 (to create transaction category) and SLG1 (to look at logs). A search on sap blogs about SLG1 will return useful links
To resume those :
Upvotes: 4