cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP AIF - Automatic Reprocessing

Former Member
0 Likes
9,856

Hello All,

Does SAP AIF allows automatic reprocessing of Error records (Proxy scenario) ? We have scenarios where Proxy interface failing because of locking error , we would like to reprocess this automatically.

I tried /AIF/REP_AC_DEF and /AIF/REP_AC_ASGN but I can't see any batch job using this to restart the messages.

Can you please provide transaction name and steps to configure this ?

Thanks & Regards,

Dijesh Tanna

Accepted Solutions (1)

Accepted Solutions (1)

nicole_bohrmann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

there are two new Transaction codes (/AIF/REP_AC_DEF and /AIF/REP_AC_ASGN) in the System for the configuration tables of the Automatic Reprocessing.

In the first configuration table /AIF/REP_AC_DEF it is possible to define the Reprocessing Action. One reprocessing action will be delivered for automatically restart the maintained error messages. The function module will be /AIF/RESTART.

You can set up the Runtime Configuration Group via Transaction /AIF/PERS_CGR.

The used Runtime Configuration Group should be active and use Run Scheduled.

Example Configuration Group:

 

In the second configuration table /AIF/REP_AC_ASGN it is possible to register the AIF
Interface and the corresponding single error messages (by message class and
number, e.g. R1/084 = “Business Partner &1 is Currently Being Processed By
&2”) for automatic reprocessing. In this configuration table, it will also
be possible to define a minimum waiting time, maximum waiting time and the
number of restart trials.

I hope this will help you. 

Thanks and regards,

 

Nicole

Former Member
0 Likes

Hello Nicole,

I couldn't found the function module /AIF/RESTART in our system. Instead there are two function modules as below :

/AIF/ERROR_UTIL_PROXY_RESTART

/AIF/IDOC_RESTART

I used /AIF/ERROR_UTIL_PROXY_RESTART in my config. See attached screenshots. However, no jobs were triggered. I am wondering if there is any additional config I need to do for scheduling background jobs.

Let me know if my configuration is wrong.


Thanks & Regards,

Dijesh Tanna

nicole_bohrmann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

there was a little mistake in my answer. Please use the function module /AIF/RESTART_MSG.

You can check the generated job in the transaction sm37. The name of the generated job should be started with /AIF/<Namespace Configuraion Group>_<Configuration ID>.

Maybe you could also check the transaction st22 if there are any errors occur.

Which SP Level is installed on your system?

Thanks and regards,

Nicole

Former Member
0 Likes

Hello Nicole,


Thanks , it is working now.

I was wondering if we want to process all the messages irrespective of error code , which error code we should use in transaction /n/AIF/REP_AC_ASGN.

Thanks & Regards,

Dijesh Tanna

nicole_bohrmann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

the automatic reprocessing is triggered by certain error messages for a registered AIF interface.

So the user has to register the AIF Interface and the corresponding single error messages by message class and number for automatic reprocessing in the transaction /AIF/REP_AC_ASGN.

Best regards,

Nicole

Former Member
0 Likes

Hello Nicole,

We have configured automatic reprocessing for proxy inbound scenario as described by you and set the Intermediate status "In Process" in transaction /AIF/REP_AC_ASGN. However, alerts are being raised even when first time message goes in error.

Automatic reprocessing works well but we don't want alerts to be triggered until all reprocessing attempts fails.

Is there something wrong in my configuration. Please note that message status in Interface monitoring always goes in "Application Error" status & not in "In Process" status when such locking error occurs.

nicole_bohrmann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

please implement note 1998708 to fix the issue.

Thanks and regards,

Nicole

Former Member
0 Likes

Thanks Nicole for providing fix. It is now working as expected after applying the note.


Regards,

Dijesh Tanna

0 Likes

Hi Nicole, I tried the same steps. Still restart job is not getting triggered to reprocess aif messages. Can you please help me?

nicole_bohrmann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

did you check the SAP Help for the Automatic Reprocessing?

Kind regards, Nicole

Answers (1)

Answers (1)

Former Member
0 Likes

Hi, Is there a  way to reprocess old error messages with the FM /AIF/Restart_Msg.

As the action only works on error received form the day its defined, but we do have a backlog which we to reprocess as well.

Appreciate a reply


Anis

robphelan
Participant
0 Likes

Anis,

I had the same requirement last year and didn't find an answer.

So, I wound up debugging. and debugging. and debugging.

I finally found the code and wrote my own method to resume processing. It's pretty simple, but you'll need your Namespace, Message GUID, Interface name and version.


DATA: pers_queue  TYPE REF TO /aif/cl_pers_queue.

   CREATE OBJECT pers_queue

     EXCEPTIONS

       not_exists = 1

       OTHERS     = 2.

   CHECK sy-subrc = 0.

   pers_queue->add_message(

    msgguid         = msg_guid

    ns                  = ns

    ifname            = ifname

    ifversion          = ifversion

    iv_flg_create_run = space

       ).

*

   pers_queue->save_messages( iv_flg_create_run = abap_true ).

Former Member
0 Likes

Thanks Robert for reply,

You said you found the code and wrote your own method

But did u added this method/logic in FM /AIF/Restart_Msg or was it a separate program you created?

Thanks

robphelan
Participant
0 Likes

Anis,

I actually created a processing workbench where my external data comes initially through AIF into my DB.

The user then reviews and approves, then clicks "process". This calls another AIF interface which actually creates my documents.

On the workbench, I give them an option to "resume / restart" a message that has stopped. So, to answer your question, it is a custom method within my workbench accessed by a button on the ALV toolbar.

Former Member
0 Likes

Thanks Robert,

But it means its a manual activity, my ask is to get the messages processed automatically at certain time in background if they are in error.

Just like the AIF action or idoc reprocessing works in background.

The issue I have is the AIF action only processes the messages from the day its defined all old messages are ignored by it.