Application Development 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: 

ABAP - Function Module Error

hailua900
Discoverer
0 Kudos

Hi,

I'm fairly new to ABAP. I'm using ABAP in Eclipse to create a sample Function Module. However, when I'm trying to enter the parameters IMPORTING, EXPORTING, or CHANGE, I get an error. It try searching for an answer but unable to figure it out. Any help is appreciated.

The following code is what I used from the book example.

FUNCTION ZFM_NEW_FUNCTION_MODULE.

IMPORTING

var_import TYPE i.

EXPORTING

var_export TYPE i.

CHANGING

var_change TYPE i.

ENDFUNCTION.

Error: The statement "IMPORTING" is not expected. A correct similar statement is "IMPORT". statement is "IMPORT".

1 ACCEPTED SOLUTION

emanuel_klenner
Active Participant

Hi Hai,

Remove the period after ZFM_NEW_FUNCTION_MODULE.
The importing statement is part of the function declaration.

I hope this helps.
Emanuel

2 REPLIES 2

emanuel_klenner
Active Participant

Hi Hai,

Remove the period after ZFM_NEW_FUNCTION_MODULE.
The importing statement is part of the function declaration.

I hope this helps.
Emanuel

0 Kudos

THANK YOU, Emanuel. I look silly now that you've shown me the issue. Thank you again friend.