cancel
Showing results for 
Search instead for 
Did you mean: 

Return Warning Message in AIF check

Former Member
0 Kudos

Dear community

We are trying to return a warning message from an AIF check. We want to inform the user that there is an issue, but it should not stop the processing of an IDOC.

Therefore, we are adding the following message to the return_tab.


CALL FUNCTION 'BALW_BAPIRETURN_GET2'

                 EXPORTING

                   type   = 'W'

                   cl     = '/BLUM/COM_INT'

                   number = '009'

                   par1   = lv_error_par1

                   par2   = lv_error_par2

                   par3   = lv_error_par3

                   par4   = lv_error_par4

                 IMPORTING

                   return = ls_bapi_return.

Additionally we do not set the error = abap_true flag.

When debugging the code, we can see that the message is added to the return_tab:

Unfortunately, AIF does not display the message, when it is returned as type W at all:

Although, if I'd return it as type E, it would show and also stop the processing.

Is it possible at all to return any message to AIF to warn/inform the user and continue processing?

Thank you for your help.

Kind regards

Thimo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thimo,

which messages AIF adds to the application log depends on the trace level. Normally trace level 0 is used to process a message. In that case warning messages of a check will not be added to the application log.

You can check the settings of the trace level in Customizing Error Handling->Define Global Features->Define Trace Levels.

You can have two options:

- Change trace level 0 to also added warning messages for checks. This will affact all interfaces

- Enhance the trace level for this interface in transaction /AIF/IF_TRACE to a level that does add the warning messages

Best regards,

Verena

Former Member
0 Kudos

Hi Verena

Thank you for your answer. I changed it in /AIF/IF_TRACE for this specific interface and it worked like a charm.

Does this setting only affect when I add messages myself or also SAP messages?


Are there any disadvantages if I activate trace level 1 globally?

Kind regards

Thimo

Answers (0)