Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap 4 data type

Former Member
0 Likes
690

Hye Friends,

Can u tell me when to use C data type and when to use N datatype??

apart from character and numeric character what are the more differences between these two??

Thnks in advance.

Sunny

5 REPLIES 5
Read only

Former Member
0 Likes
650

Data consists of strings of bytes in the memory area of the program. A string of related bytes is called a field. Each field has an identity (a name) and a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.

In the ABAP type concept, fields are called data objects. Each data object is an instance of an abstract data type. Data types in ABAP are not just attributes of fields, but can be defined in their own right. There are separate name spaces for data objects and data types. This means that a name can at the same time be the name of a data object as well as the name of a data type.

Data Types:

As well as occurring as attributes of a data object, data types can also be defined independently. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program (using the TYPES statement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.

Data types can be divided into elementary, reference, and complex types

Kishi.

Read only

Former Member
0 Likes
650

hi,

when u have to use alphanumeric in ur variable use N data type,

and when u have to use only character in ur variable use C data type.

Regards

Santosh

Read only

Former Member
0 Likes
650

one more difference is initial value of C is space and for N is 0

Read only

Former Member
0 Likes
650

Hi,

Data type C can b used for bothe character and numeric values. it Accepts both. But when its specifically numeric values only, u can use data type N.

some of the links below for data types may b useful for u:

1.http://help.sap.com/saphelp_nw04/helpdata/en/79/c5545eb3dc11d5993800508b6b8b11/frameset.htm

2.http://help.sap.com/saphelp_nw04s/helpdata/en/43/5d2ea0e84b3e2be10000000a1553f6/frameset.htm

>>>Reward points if useful<<<

All the best.

Read only

Former Member
0 Likes
650

thanks