2007 Aug 21 7:08 AM
2007 Aug 21 7:11 AM
Hi Shital,
CHAR C array of c_ubyte left-aligned string filled with spaces string
NUMC N array of c_ubyte right-aligned zero-filled string containg digits only integer
INT4 I c_int integer integer
C Character 1 Space
N Numeric text 1 '00...0'
D Date YYYYMMDD 8 '00000000'
T Time HHMMSS 6 '000000'
X Byte (heXadecimal) 1 X'00'
I Integer 4 0
P Packed number 8 0
F Floating point number 8 '0.0'
Sample Code:
DATA: ws_data TYPE char10.
ws_data = 'SAMPLE'.
WRITE:/ ws_data.
DATA: ws_data1 TYPE i.
ws_data1 = 10.
WRITE:/ ws_data1.
DATA: ws_data2 TYPE n LENGTH 2.
ws_data2 = 31.
WRITE:/ ws_data2.
<b>Regards,
Azhar</b>
2007 Aug 21 7:13 AM
hi ,
char type is to store character strings. And
Numeric is to store for numbers.
In SAP Default is CHARACTER.
Cheers,
Rohith.
2007 Aug 21 2:40 PM
Hi,
If a variable is declared of type C(char) it can have all numbers, characters and special characters also.
If it is of type Numc (N) it can take only numbers no alphabet and special chars, but u can't perform any calculations on it.
Reward if useful
Thanks,
Neeraja
2007 Aug 21 2:48 PM
hi
'C' type is used for storing a string of characters.
'n' is used for storing a string of Numbers
Regards
Preeti
2007 Aug 21 3:00 PM
Hi Shital,
CHAR Character String
NUMC Character string with only digits
CHAR
Character string. Fields of type CHAR may only have a maximum length
of 255 in tables. If longer character strings are used in tables,
use data type LCHR. There are no restrictions for the length of such
fields in structures.
NUMC
Character string that may only contain digits. The length of a field
of this type is limited to a maximum of 255 places.
<b>Reward if Helpful,</b>
Regards,
Adithya M