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

exit module error

Former Member
0 Likes
991

Hi guys,

When i was working on DMEE, i came across a scenario, where i needed to write to write a code like this,

o_value = round( fpayhx-ubnky/940 + 1 ).

but when i compile this, i got an error saying:

*The syntax for a method specification is "objref->method" or *

*"class=>method". "class=>method". "class=>method". "class=>method". *

Does anyone know wat am i supposed to do with this

thanks,

trishnau

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
894

Hello,

I understand that you're using DMEE Exit Module to code the logic.

o_value = round( fpayhx-ubnky/940 + 1 ).

Anyway i don't think there is any in-built ABAP function defined as 'ROUND'. You can use use the Function Module 'ROUND' to do the rounding of the values.

BR,

Suhas

6 REPLIES 6
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
895

Hello,

I understand that you're using DMEE Exit Module to code the logic.

o_value = round( fpayhx-ubnky/940 + 1 ).

Anyway i don't think there is any in-built ABAP function defined as 'ROUND'. You can use use the Function Module 'ROUND' to do the rounding of the values.

BR,

Suhas

Read only

Former Member
0 Likes
894

I used the function module "round" as following...

CALL FUNCTION 'ROUND'

EXPORTING

  • DECIMALS = 0

INPUT = fpayhx-ubnky/940+1

  • SIGN = ' '

IMPORTING

OUTPUT =

  • EXCEPTIONS

  • INPUT_INVALID = 1

  • OVERFLOW = 2

  • TYPE_INVALID = 3

  • OTHERS = 4

.

but it gives me an error again,

The data object "FPAYHX" has no component called "UBNKY/940", but there

is a component called "UBNKY".

Since I am a beginner in ABAP, i need your guidance!

Thanks in advance.

Trishna

Read only

0 Likes
894

Ignore !!!

Read only

0 Likes
894

Hi,

You cannot call a function module with an expression.

In this case, you have to compute the result of : fpayhx-ubnky / 940 + 1 in a variable.

Note : notice the spaces between the '/' and the operands

Best regards,

Guillaume

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
894

Hello,

You can't pass a formula directly to a FM interface. You need to take it in a variable & pass to 'ROUND'.

BR,

Suhas

Read only

Former Member
0 Likes
894

Hi ,

Wat u can do is tat, u hav to declare a varable and store the rsult of the calculation there. Then pass that variable as the input to ur function module.

Eg:

Data: Value type f.

value = ( fpayhx-ubnky / 940 ) + 1 ).

call function ........

exporting

input = value

importing

output = result

let me know if it help u