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 in Function module

Former Member
0 Likes
450

Hi frnds,

I hav been creating a new function module in ECC 5.0 . These are my following steps. But when i m activating the function module i am getting ERROR.

as "REPORT/PROGRAM statement missing, or program type is I (INCLUDE)".

create a FM with z_name in se37 initial screen

go to Import Parameter tab.

provide details:

parameter type Associated type default

a type i 10

b type i 20

go to export tab.

parameter type Associated type

res type i

go to source code tab.

write res = a + b.

save , activate

Then se38

REPORT ZNEW_EXAMPLE.

DATA : A TYPE I,

B TYPE I,

RES TYPE I.

CALL FUNCTION 'Z_EXAMPLE1'

EXPORTING

A = 10

B = 20

IMPORTING

RES = RES

.

WRITE 😕 RES.

Here its throwing runtime error , its getting activated also in se38 but at the end its giving runtime error as "Syntax error in program "SAPLZNEWFUNCTION12 "

Frnds plz help me in rectifying my issue.

regards,

suraj

3 REPLIES 3
Read only

Former Member
0 Likes
428

Hi,

As far as I can understand there is nothing wrong with the FM.

Try and see the attributes tab and see that in processing tab,normal function module has been selected.

Thanks,

Sandeep.

Read only

0 Likes
428

Hi Sandeep,

Its done with Normal function module only still i m getting error.

Pease guide me .

regards,

suraj

Read only

Former Member
0 Likes
428

Hello,

First activate the function group and then activate the FM.

U can activate the FG from the menu itself.

Environment -> Inactivate Objects-> .

It will list ur FG click and activate. Then activate FM.

Vasanth