How to Use the AIF Change Log Functionality
During my work in AIF development I sometimes get questions from customers asking how different functionalities are working or what the best way is to solve a specific requirement with SAP Application Interface Framework. From time to time I like to describe the solutions to the most common problems or new features in How-To-Guides. If you have a specific topic where it would be nice to have a How-To-Guide drop me a message with the topic request.
Within AIF Monitoring and Error Handling it is possible to change values of messages. Sometimes it is necessary to know who and when changed the message content. AIF provides a Change Log functionality that can provide this information.
How does it work?
The functionality can be used for new and existing interfaces. The following steps must be executed.
- Create a changeable field
To be able to change data in the Monitoring and Error Handling transaction a changeable field must be specified.
- Change data in Monitoring and Error Handling
After defining a field as changeable in the AIF customizing it is possible to change the value of that field in the Monitoring and Error Handling. Change the value of the field in an erroneous message.
- Display the Change Log Entries for the Relevant Fields
As soon as the value of a field is changed which was marked as read access log relevant the data access is logged and can be seen in the corresponding transaction (/AIF/CHANGE_LOG).
The field Modify By is hidden in transaction /AIF/CHANGE_LOG. Special authorization /AIF/CDLOG with activity 70 is required to display this field.
This example uses the SAP flight booking example.
To execute this example, you require an AIF interface. In this example I’m using the file interface build in this example.
1. Create changeable field
To enable the change functionality for a field in the Monitoring and Error Handling the specific field must be marked as changeable field in the customizing activity Define Interface-Specific Features.
In this example I re-use the changeable field (CUSTOMER_COUNTRY) which was defined in this blog. The blog contains a detailed explanation on how to create and use a changeable field.
2. Change data in Monitoring and Error Handling
If you do not have an erroneous message create a new message containing a wrong value for the CUSTOMER_COUNTRY field that can be changed.
Open the message and navigate to the field which was defined as changeable – in this case field CUSTOMER_COUNTRY. A pop-up displaying the content of the field is displayed.
Change the value of the field and confirm the change. The value of the changed field is updated in the table. In this example I changed CUSTOMER_COUNTRY from XE to DE. After the field was changed it is necessary to save the change. Press the save button in the menu bar of the data structure view.
Restart the message.
3. Display the Change Log Entries for the Relevant Fields
Open transaction /AIF/CHANGE_LOG. Select Message Content, the time range for which you want to check the change log entries and select your interface.
In the following screen. Select your interface in the left-hand side of the screen. On the right-hand side of the screen select your message.
Beside the general information of Message ID, the change log displays the old and the new value with the change date and time. With the correct authorizations it would be possible to display also the field Changed By in this table.
This blog post gave an introduction on how to display the AIF Change Log for message content. The AIF Change Log can also display changes which have been logged for a Value Mapping or an External Contact.