Skip to Content
0
Former Member
Mar 20, 2009 at 04:19 AM

error while calling FM from report program

102 Views

i am calling a FM using the follwoing program

*************************************

REPORT ZTEST3.

DATA : EMPNO TYPE zempdata-EMPLOYEE_NUMBER,

EMPNAME TYPE zempdata-EMPLOYEE_NAME,

EMPSAL TYPE zempdata-EMPLOYEE_SALARY.

call function 'ZEMPMASTER'

EXPORTING

EMPNO = '22609'.

EMPNAME = 'vishal'.

EMPSAL = 200.

*************************************

but when i execute this program i am getting the following error

**********************************

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was

not caught and

therefore caused a runtime error.

The reason for the exception is:

When calling the function module "ZEMPMASTER", one of the parameters

needed according to the interface description was not specified.

This parameter was "EMPNAME".

****************************

i don't know why i am geteing this error where as in my FM ZEMPMASTER i have given only three input parameters

EMPNO, EMPNAME AND EMPSAL.

my FM code is like as follows

*************************

FUNCTION ZEMPMASTER.

*"----


""Local Interface:

*" IMPORTING

*" REFERENCE(EMPNO) TYPE ZEMPDATA-EMPLOYEE_NUMBER

*" REFERENCE(EMPNAME) TYPE ZEMPDATA-EMPLOYEE_NAME

*" REFERENCE(EMPSAL) TYPE ZEMPDATA-EMPLOYEE_SALARY

*"----


TABLES ZEMPDATA.

BREAK-POINT.

data WA_zempdata type zempdata.

WA_zempdata-EMPLOYEE_NUMBER = EMPNO.

WA_zempdata-EMPLOYEE_NAME = EMPNAME.

WA_zempdata-EMPLOYEE_SALARY = EMPSAL.

BREAK-POINT.

  • insert into zempdata values wa_zempdata.

WRITE :/ wa_zempdata-employee_number, wa_zempdata-employee_name.

commit work.

ENDFUNCTION.

**********************************************

pls let me know why i am getting this error