Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error while calling FM from report program

Former Member
0 Likes
658

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

5 REPLIES 5
Read only

awin_prabhu
Active Contributor
0 Likes
555

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

Read only

Former Member
0 Likes
555

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

Read only

Former Member
0 Likes
555

thanks sap fan resolved

Read only

soumya_jose3
Active Contributor
0 Likes
555

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.

Read only

Former Member
0 Likes
555

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