Silly question: Negative object keys...

Sheldon Oxenberg soxenber at scsnet.csc.com
Mon Sep 27 15:38:24 EDT 2004


Hello Mike,
 
Academic Monday/Tuesday trivia:
 
ABAP data types c, n, d, t are permitted as key fields and are all of
type Character. ABAP data type NUMC is equivalent to type n.
 
Type n contains text characters that can only be numbers. Type n is not
a numeric data type. Type n cannot contain other characters such as the
dash character (i.e. type n does not allowed a mathematical negative
sign).
 
When assigning numeric data to type n (or type NUMC), the number is
converted into a string of characters 0-9, WITHOUT sign or decimal
point.
 
When assigning numeric data to type c (or type CHAR), the number is
converted into a string of characters 0-9, WITH sign or decimal point.
 
Regards,
Sheldon
 
-----Original Message-----
From: Michael Pokraka [mailto:workflow at quirky.me.uk]=20
Sent: Monday, September 27, 2004 1:45 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Silly question: Negative object keys...
 
Hi all,
A workaround is easy enough, so this is purely academic Monday/Tuesday
trivia:
 
I have an object with a numeric key and wanted to use a negative number.
No
can do says this 620 system, a NUMC doesn't permit a minus sign.
 
Trying to give an INT-type field as a reference results in:
"Only ABAP data types C, N, D and T are permitted as key fields"
 
OK, ... type N obviously refers to NUMC as I couldn't fit any other
suitable
field types in there. Type N should allow negatives... or maybe not. The
simple workaround is obviously to use a CHAR and fill it with
whatever...
but doing that is a bit ... well, not 'proper'.
 
Anyway, not important... just curious.
 
Cheers
Mike
 


More information about the SAP-WUG mailing list