Skip to Content
0
Former Member
Nov 09, 2008 at 12:45 PM

General activation error.

23 Views

Hi all,

This should be very easy. But somehow, I just do not know what is not right.

I have created a function group and function module.

Please help as I always getting the same error message "Statement VALUE_A is not defined. Check your spelling".

For your information, I have defined

VALUE_A as TYPE I,

VALUE_B as TYPE I,

OPERAND as TYPE C

in Import tab. And defined RESULT as TYPE I in Export tab.

Thanks in advance.

FUNCTION Z_BC_CALCULATOR.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(VALUE_A) TYPE  I
*"     VALUE(VALUE_B) TYPE  I
*"     VALUE(OPERAND) TYPE  C
*"  EXPORTING
*"     VALUE(RESULT) TYPE  I
*"----------------------------------------------------------------------

  IF OPERAND = '+'.
    VALUE_A + VALUE_B = RESULT.
  ELSEIF OPERAND = '-'.
    VALUE_A - VALUE_B = RESULT.
  ELSEIF OPERAND = '*'.
    VALUE_A * VALUE_B = RESULT.
  ELSEIF OPERAND = '/'.
    VALUE_A / VALUE_B = RESULT.
  ENDIF.
ENDFUNCTION.