sexta-feira, 14 de fevereiro de 2020

How to Enable Editing of a Specific Field in AIF Monitoring and Error Handling

Introduction

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 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.

Problem Description

A specific field in the payload of a message contains faulty data and should be corrected. In AIF Monitoring and Error Handling changes to the payload of a message are not possible per default.

Changeable fields allow the specification of fields that should be changeable in the Monitoring and Error Handling.

How does it work?

You need to perform the following steps to create and use a changeable field.
  1. Enable interface specific features for the interface
  2. Define changeable field
  3. Change value in Monitoring and Error Handling

Example

This example uses the SAP flight booking example.

Preparation

In order to execute this example, you require an AIF interface. In this example I’m using the interface created in this example.

1. Enable interface specific features for the interface

Go to AIF customizing and navigate to Error Handling –> Define Namespace-Specific Features. Select your namespace. In this example I am using namespace ZBM_03. Create a new entry in the Define Interface-Specific Features section. Enter your interface name and version.
Save.

2. Define Changeable Field

Go to AIF customizing and navigate to Error Handling –> Define Interface-Specific Features. Select your namespace and interface.
Note: You can only select interfaces which have an interface specific entry defined in the namespace specific features.
Navigate to Define Changeable Fields in the left-hand side menu.
Create a new entry.  Enter an index number and select the field you want to be able to change in the monitoring and error handling. The field can be comfortably selected via F4 help of field field path. In this example we select CUSTOMER_COUNTRY as the field we like to be able to change.
The complete entry looks like shown below.
Save.

3. Change Value in Error Handling

If you do not have an erroneous message create a new message containing a wrong value for the COUNTRY field that can be changed.
Switch to Monitoring and Error Handling transaction (possible via Interface Monitor or directly via transaction /AIF/ERR). In the structure view navigate to the structure part that contains the field you have defined as changeable. In the Data Content view, you can now see the fields of the selected structure.
Note: there is a slight color difference how changeable and non-changeable fields are displayed in Monitoring and Error Handling. Changeable fields are written in black – check out the red box in the screenshot below. Non- changeable fields are written in grey – check out the blue box in the screenshot below.
Double click the field you have 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 value was changed it is necessary to save the change. Press the save button in the menu bar of the data structure view.
After saving the changes the message will be displayed as changed in the data message view.
If the message is restarted the message will be processed with the changed value. As the message in this example is still in error after the restart we should check the error messages. The original error message ISO country code XE unknown is gone after the restart. Also, the edit icon in the data message view has changed again. The icon marking a changed message is no longer displayed.

Summary

This blog post gave an introduction on how to allow users to change values of specific fields in AIFs Monitoring and Error Handling transaction.

Nenhum comentário:

Postar um comentário