‎2009 Mar 20 4:19 AM
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
‎2009 Mar 20 4:22 AM
Hi
Remove '.'.
call function 'ZEMPMASTER'
EXPORTING
EMPNO = '22609'. <--- Remove '.'
EMPNAME = 'vishal'. <--- Remove '.'
EMPSAL = 200.
change to:
call function 'ZEMPMASTER'
EXPORTING
EMPNO = '22609'
EMPNAME = 'vishal'
EMPSAL = 200.
Edited by: Sap Fan on Mar 20, 2009 5:24 AM
‎2009 Mar 20 4:23 AM
Hi,
I the short dump you would get the name of the field which is not being passed. Check that.
You can use patern button to get the details of the FM.
Also, activate entire function group & try executing.
Regards,
Kritesh Shah
‎2009 Mar 20 4:24 AM
‎2009 Mar 20 4:24 AM
Hi Vishal,
You are using full stop (.) after each exporting parameter of the FM.
Remove those full stops and call FM as follows:
call function 'ZEMPMASTER'
EXPORTING
EMPNO = '22609'
EMPNAME = 'vishal'
EMPSAL = 200.
Try this.
Regards,
Soumya.
‎2009 Mar 20 4:32 AM
Hi vishal,
call function 'ZEMPMASTER'
EXPORTING
EMPNO = '22609'.<------- Remove this period
EMPNAME = 'vishal'.<------remove this period
EMPSAL = 200.<-----------*retain this period*
We must never change the format in which a FM is displayed once we call the pattern.
The period will be automatically be available at the end of the FM.need not keep it at end of every line.
Hope this helps.If problem still persists post back.
Regards,
K.Sibi