Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

perform error

Hi, i get the error "Different number of parameters in FORM and PERFORM (routine: GET_TARCOST, number of formal parameters: 8, number of actual parameters: 3)."

when i do a perform like this:

TYPES: BEGIN OF ty_refer,

dec TYPE p DECIMALS 5,

END OF ty_refer.

DATA: v_vallit TYPE STANDARD TABLE OF ty_refer WITH HEADER LINE.

<b>PERFORM get_tarcost USING ti_mast-matnr ti_mast-werks CHANGING v_vallit.</b>

the definition of the form get_tarcost is:

FORM get_tarcost USING p_matnr LIKE mkal-matnr

p_werks LIKE mkal-werks

CHANGING p_vallit TYPE STANDARD TABLE OF ty_refer WITH HEADER LINE.

Tags:
Former Member
replied

Try like this:

REPORT  ZTEST_NP.

TYPES: BEGIN OF TY_REFER,
DEC TYPE P DECIMALS 5,
END OF TY_REFER.

TYPES: T_REFER TYPE STANDARD TABLE OF TY_REFER.  " << table type.

DATA: L_MATNR TYPE MARA-MATNR,
      L_WERKS TYPE MARC-WERKS.
DATA: V_VALLIT TYPE STANDARD TABLE OF TY_REFER WITH HEADER LINE.

PERFORM GET_TARCOST 
USING L_MATNR L_WERKS CHANGING V_VALLIT[].  " << table with header line


FORM GET_TARCOST USING P_MATNR LIKE MKAL-MATNR
P_WERKS LIKE MKAL-WERKS
CHANGING P_VALLIT TYPE T_REFER.  "< << refer to T_REFER

ENDFORM.                    "get_tarcost

Regards,

Naimesh Patel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question