Application interface framework (AIF) AIF Documentation is an framework which is widely used in S/4 HANA, Central finance for rationalization of different kind of interfaces with universal monitoring and error handling capabilities, underlying interface technology e.g. IDOC, XML etc remains abstract to the end user (Technical / Business).
With growing use-cases of AIF in large enterprise setting, there comes different challenges and one of them is understanding of automatic reprocessing capabilities.
In this blog, we would deep dive into details of technical know-how of automatic reprocessing.
Use case – We have set up XML/Structured persistence interface in AIF and based on a specific message number, AIF should do the automatic processing in certain interval for certain times.
First Tcode which is used in this process is /n/AIF/REP_AC_DEF where reprocessing action is defined. SAP has delivered standard function module ‘/AIF/RESTART_MSG’ for this purpose which is sufficient in almost all the cases however if you have a custom requirement then custom FM based on template FM ‘/AIF/TEMPL_RESTART_AUTO_REPR’ can be created and assigned in this Tcode.
Assigned FM would be used during reprocessing job, it will pick the properties/action/logic from original interface configuration for which GUID is being reprocessed.
Assigned runtime config Id(Tcode - /n/AIF/PERS_CGR) determines how the reprocessing should occur, e.g. packet size, server group etc.
The automatic reprocessing is triggered by specific error messages for a registered AIF interface.
So the user has to register the AIF Interface and the corresponding error messages by message class and number for automatic reprocessing in the transaction /n/AIF/REP_AC_ASGN.
Conclusion –
Below FM / class method are called during original AIF message processing if the AIF error message meets the reprocessing criteria and it schedules the job based on defined reprocessing config.
Once above is executed, a job is created in ‘Scheduled’ status and can be checked in SM37. Planned start date for these jobs are defined based on Min and Max time defined in AIF reprocessing config.
Job name - /AIF/Namespace_RuntimeConfigID*
Reprocessing data is captured in table /AIF/REP_MSG_CNT which provides valuable information like how many retry attempts are made , timestamp etc.
Working example – Lets check how this config works with a working example-
We have set the config as below where maximum retries are 2, Minimum waiting time is 1 Minute and Maximum waiting time is 10 Mis.
Chain of events-
AIF Message job log with timings.
While AIF message is waiting to be reprocessed, the status becomes ‘In Progress’ and sub status would be ‘Automatic reprocessing’ which can be checked in corresponding index table.
Tips –
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 37 | |
| 32 | |
| 29 | |
| 28 | |
| 25 | |
| 24 | |
| 20 | |
| 14 | |
| 12 | |
| 11 |