Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor

As some of you may now it's possible to call transactions and reports with data from the message variables within the AIF Monitor and Error Handling transaction (/AIF/ERR). nicole.bohrmann has also shown a way on how to call AIF value mappings in her recent article but what if we'd like to call a custom mapping table and to check some of the values ? If there a simple way ? It turns out it's not that difficult, you just need to follow the steps shown in my article.

Step 1

At first you need to have a custom mapping table like the one shown below for example.

Step 2

If you open your custom mapping table in SE16 you can get the generated program name - /1BCDWB/DBZAIFDEMO

Step 3

In order to pass the variables from the system message from transaction /AIF/ERR to the selection screen of custom table we need to write a small program which will open the selection screen at a predefined row of the table.


REPORT  Z_KRAWCZYK_AIF_2.

DATA : lt_key TYPE table of RSPARAMS.

DATA : ls_key TYPE RSPARAMS.

*we will take one parameter from the /AIF/ERR as input (and this is the key field in our customizing table)

Parameters: p_key type char10.

ls_key-SELNAME = 'I1'.

ls_key-kind = 'S'.

ls_key-sign = 'I'.

ls_key-option = 'EQ'.

ls_key-low = p_key.

ls_key-high = p_key.

insert ls_key into table lt_key.

*we call the module which will display the table entry for a specific key 

CALL FUNCTION 'RS_TABLE_LIST_CREATE'

  EXPORTING

    TABLE_NAME               = 'ZAIFDEMO'

  TABLES

    SELTAB                   = lt_key

          .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

Step 4

Now we can assign the report to the error message in /AIF/ERR and assign the variable to the input parameters of the report.

Please make sure you also select the checkbox - "Skip first screen"

Step 5

From that time whenever we try to select the function for the error message as shown on the picture below

system will take us automatically to the table display of the custom mapping table where you can check if the value exists.

Note:

You can use this functionality not only to display the whole key of the table but only the part which might be missing as if they key does not exist system will not take you anywhere.

Labels in this area