title: Different number of parameters in FORM and PERFORM
body: <p>I want to avoid copy+paste in my function and want to create a subroutine.</p>
  
  <p>But this fails.</p>
  
  <p>Here is the function (I removed unimportant parts):</p>
  
  <pre><code>FUNCTION /foo/bar .
  *"----------------------------------------------------------------------
  *"  IMPORTING
  *"     VALUE(IV_STATIC_PARAMETER_LIST) TYPE  WDY_KEY_VALUE_LIST
  *"----------------------------------------------------------------------
  
  data selection_table TYPE TABLE OF RSPARAMS.
  
  PERFORM GET_REPORT_READ_PARAMETER
      USING IV_DYNAMIC_PARAMETER_LIST
     CHANGING selection_table.
  </code></pre>
  
  <p>I get this error message:</p>
  
  <blockquote>
    <p>Different number of parameters in FORM and PERFORM (routine:
    GET_REPORT_READ_PARAMETER, number of formal parameters: 4, number of
    actual parameters: 2)</p>
  </blockquote>
  
  <p>The subroutine looks like this:</p>
  
  <pre><code>FORM GET_REPORT_READ_PARAMETER
    USING parameter_list TYPE  WDY_KEY_VALUE_LIST
    CHANGING sel_table TYPE TABLE OF RSPARAMS.
  
  ....
  
  ENDFORM
  </code></pre>
  
  <p>Any idea why ABAP thinks that there are 4 and not 2 parameters?</p>