Skip to Content

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 Goeddelmann 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.

/wp-content/uploads/2013/04/pic1_209709.png

Step 2

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

/wp-content/uploads/2013/04/pic2_209710.png

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”

/wp-content/uploads/2013/04/pic3_209712.png

Step 5

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

/wp-content/uploads/2013/04/pic4_209713.png

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

/wp-content/uploads/2013/04/pic5_209715.png

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.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply