‎2006 Feb 08 6:09 PM
i have a function module , its returning some codes and I am showing some error messages on the bases of codes ....
EXCEPTIONS
ID_NOT_FOUND = 1
R_NOT_FOUND = 2
NOT_ACTIVE = 3
OTHERS = 4.
case Error.
When '0'
When 'others'...
endcase.
but i am getting short dump when it execute others why is that ?
I re-write the code in this way .. and its working fine...
EXCEPTIONS
ID_NOT_FOUND = 1
R_NOT_FOUND = 2
NOT_ACTIVE = 3
OTHERS = 4.
case Error.
When '0'
When '1' or '2' or '3' or '4' ...
endcase.
‎2006 Feb 08 6:13 PM
Hi ,
it should be when others ie without the quotes..
regards,
Suresh Datti
‎2006 Feb 08 6:13 PM
Hi ,
it should be when others ie without the quotes..
regards,
Suresh Datti
‎2006 Feb 08 6:14 PM
‎2006 Feb 08 6:15 PM
It should be
CASE SY-SUBRC.
WHEN 0.
.....
WHEN 1
.....
WHEN 2.
....
WHEN 3.
....
WHEN 4.
....
WHEN OTHERS.
ENDCASE.
‎2006 Feb 08 6:16 PM
Why OTHERS dont work like 'OTHERS' ..SAP syntax? right ...
Complier doesnt understand ...
‎2006 Feb 08 6:16 PM
dont write OTHERS in codes
here OTHERS works like a variable but not a constant , so it is not written in quotes
Message was edited by: chandrasekhar jagarlamudi