Interface Creation for Logging Synchronous Service Calls
SAP Application Interface Framework provides an API that can be used by applications to log synchronous service calls.
To log synchronous service calls, you must create an ABAP Dictionary structure, define a new interface, and specify the engine settings, as described in the following steps.
Creating an ABAP Dictionary Structure for the Interface
Use transaction SE11 to create a new ABAP Dictionary structure. The structure must represent the input and output of your service call.
Developing the Interface
Go to transaction /AIF/CUST and perform the following configuration steps.
-
Navigate to .
-
Enter the name of the namespace.
-
Create a new entry. Specify the following parameters for interface development:
Parameter
Description
Interface Name
Enter the name of the interface to be monitored.
Interface Version
Enter the interface version.
Description
Enter a meaningful description.
Lifetime of Application Log
Enter the number of days messages are stored in the application log (for example, 90d).
SAP Data Structure
Select the ABAP Dictionary structure created before.
Raw Data Structure
Select the ABAP Dictionary structure created before.
Direction
Choose Inbound.
-
Save the interface.
After defining your interface, specify the engine settings for it in the following way:
-
Go to transaction /AIF/CUST.
-
Navigate to .
-
Select your interface.
-
Change Application Engine to Sync log application engine.
-
Change Persistence Engine to Sync log persistency engine.
-
Save your settings.
Implementation
The following coding example shows the basic implementation steps.
If you can't specify the interface, it's determined at runtime using the data type of the raw data structure. If multiple interfaces are defined for the same raw data structure and the sync log application engine, you must implement BAdI /AIF/SELECT_IF_SYNC_LOG of enhancement spot /AIF/ENHS_SYNC_LOG_API. This step is required to uniquely determine the interface to be used.
Since restart isn't defined for synchronous calls, no restart feature is available by default. If you want to implement a restart feature, implement BAdI /AIF/RESTART_SYNC_MSG of enhancement spot /AIF/ENHS_SYNC_LOG_API.
When you cancel your message in the monitoring application, the status of the message is set to Cancelled. You can implement additional application features in BAdI /AIF/CANCEL_SYNC_MSG of enhancement spot /AIF/ENHS_SYNC_LOG_API.

