ABAP Message Call Contains the Wrong Number of WITH Parameters
To resolve ABAP Extended Program Check (SLIN) warnings for MESSAGE call contains the wrong number of WITH parameters, SAP programmer can check the message class for the parameters that the message short text contains and then provide empty string input values for missing parameters or use the MG_MISSING pseudo comment to prevent this code line listed in ATC checks in future.
When I executed an ABAP Test Cockpit aka ATC check on one of my ABAP programs, I see following item listed in the ATC results with a priority 3
Extended Program Check (SLIN) MESSAGE call contains the wrong number of WITH parameters
I jumped into the ABAP code line by clicking on the link displayed on Object Name column and see the ABAP code which is causing this ATC check message
I clicked on "i001(00)" to see the content of the message class short text.
Message text was formed of only dynamic values of "&1&2&3&4&5&6&7&8" which is accepting more parameters than I provided in my ABAP program and it returns the concatenated form of all input string values.
But I was providing only 2 input string values.
Although I could suppress the ATC message using MG_MISSING pseudo comment, I decided to provide missing input parameters as empty string values.
I should replace the message text with a better one which is accepting two input string values, but I added the missing empty string parameters and corrected the ATC check as follows.