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 function module in ABAP program

prathik
Participant
0 Likes
2,404

Hi ,

     I'm new to ABAP and was trying out some stuff, I came across this issue while calling the function module from the ABAP program.

I tried to create a function module which is Remote enabled and  called the function from an ABAP program

The error screen is in the last screenshot in the ABAP editor.

Could you please help me resolve this issue

Regards,

Prathik

1 ACCEPTED SOLUTION
Read only

venkateswaran_k
Active Contributor
0 Likes
1,746

Remove Dots. (.) from A1 and B1.

Declasre another variable c1 as I and put import also. 
Put . after C1.

CALL FUNCTION 'ZF_DEMO'
EXPORTING
  A = A1
  B = B1
IMPORTING
  SUM = C1. 

You need to put Import also because the function has to return value.

7 REPLIES 7
Read only

Former Member
0 Likes
1,746

Hi Prathik,

Please remove the '.' after 'A1' at Line #16.

As you have ended the line by putting a DOT the system is unable recognize variable B.

Regards,

Santanu.

Read only

venkateswaran_k
Active Contributor
0 Likes
1,747

Remove Dots. (.) from A1 and B1.

Declasre another variable c1 as I and put import also. 
Put . after C1.

CALL FUNCTION 'ZF_DEMO'
EXPORTING
  A = A1
  B = B1
IMPORTING
  SUM = C1. 

You need to put Import also because the function has to return value.

Read only

0 Likes
1,746

Hello Prathik

Also make sure that the Function Module has been activated.

Best regards,

Peter

Read only

Former Member
0 Likes
1,746

Hi Prathik,

You are getting this error because you have ended the statement after A1 with the period(.).

Just remove that period and activate it.

Read only

bastinvinoth
Contributor
0 Likes
1,746

Hi Prathik Nagaraj

In exporting , You have ended with statement DOT . Can you remove it

There's no Import Add Import then only you will get addition of those A + B

Regards,

Bastin.G

Read only

Former Member
0 Likes
1,746

Hi Prathik,

Please learn the syntax of abap.

Read only

prathik
Participant
0 Likes
1,746

Got it ! Thank you