Copyright 2024 - BV TallVision IT

If your interface produces files (whether it's inbound or outbound) - are the files removed ? Are you stumbling across old log files that have no use other than occupy space ? This article describes how a turn-key utility report can be used to schedule cleaning your (server) directories. 

The utility report can be scheduled to check up to 8 directories on your server, with a single file name mask (e.g. *.txt or *.log). The minimum age of the files can be specified as number of days, so nothing new will be removed. The selection screen: 

The pattern (*) is used to select your files. If it is only 1 file you want to delete, the actual pattern field is much longer than shown on the selection screen, so simply copy your filename in to the pattern field in full. You can also specify {S} - SAP system, {C} - SAP client or {Y} - current year in the pattern filename OR directory names somewhere. If you need a system parameter field, like INSTANCE_NAME, the {P=...} can be used. Run RSPARAM for a complete list of system parameter fields. Try this out in test mode first, as the next screen of the report will display a Business Application Log with all selected files per folder. An example: 

Note that not all files can be deleted from an Abap report. Authorization is required from the SAP system and more authorization is required through the Sap network user. The general rule is: any file created by (from) SAP can also be deleted. Also note that the actual log can also be stored for future reference, as a Business Application Log (transaction SLG1).

If this report is scheduled to run on e.g. a daily or weekly bases, some of the messages are not only displayed in the Application Log, but also in the classic Batch Job log, as shown here: