‎2007 May 17 2:28 AM
hi,
I have a customer number which is 10 digit which accepts both numbers and alphabets as the customer number so wht is the data type i should be declaring so tht both numbers and alphabets can be used ?
‎2007 May 17 2:37 AM
use charcter data type and it allows both number and letters.
‎2007 May 17 2:37 AM
You can declare it as CHAR or NUMC.
If you are declaring it in the program then say:
Data: custno(10) type c.
If it is a field in the table, then declare it as any data element which has the type CHAR 10 or NUMC.
Thanks,
SKJ
‎2007 May 17 2:38 AM
in your program you can also declare NUMC as
data w_numc(10) type n.
~Suresh
‎2007 May 17 2:47 AM
Hi harri kishan,
You should declare with data type "N" (Numeric text) or "C" (Character) or refer to structure, table field of customer number.
For example
DATA kunnr(10) TYPE n.
DATA kunnr(10) TYPE C.
DATA kunnr LIKE RF02D-KUNNR.
Hope this help.
Regards,
Tiwa.
Message was edited by:
Tiwa Noitawee
‎2007 May 17 2:49 AM
‎2007 May 17 4:31 AM
hi
just a query...i don't think a variable declared with data type of numc will accept characters (NUMC - Character string with only digits)....in your case, you have to use only characters...curious to know how come your problem solved
Regards
Sathish. R
‎2007 May 17 4:39 AM
‎2007 May 17 4:57 AM
Hi
You can declare it as CHARACTER or NUMC As per the above suggetions..If you are getting any error in this reply with the correct error message.....
‎2007 May 17 5:00 AM
For Eg:
DATA MATNR(10) type n.
DATA kunnr(10) ." Of it is type C no need to spefy that..Abap default is Type C only
DATA matnr type mara-matnr.
Reward all helpfull answers........