Predefined data types

Hi,
Can somebody give me details regarding predefined data types in ABAP and equivalent Character types ?
For example :
F2 type p  can be equivalent to F2(20) type c
F2 CURR17 = F2(?)  TYPE c
Thanks

Hi,
Predefined : it is used to specify the types of individual field whose lenghts are fixed.
numeric(I,F,P)
Charcter(C,D,N,T)
Hexadecimal type(X)
Predefined Elementary type with variable length (String for char String,XString for byte String)
ACCP Posting period YYYYMM
CHAR Character string
CLNT Client
CUKY Currency key, referenced by CURR fields
CURR Currency field, stored as DEC
DATS Date field (YYYYMMDD) stored as char(8)
DEC Counter or amount field with comma and sign
FLTP Floating point number, accurate to 8 bytes
INT1 1-byte integer, integer number <= 255
INT2 2-byte integer, only for length field before LCHR or LRAW
INT4 4-byte integer, integer number with sign
LANG Language key
LCHR Long character string, requires preceding INT2 field
LRAW Long byte string, requires preceding INT2 field
NUMC Character string with only digits
PREC Precision of a QUAN field
QUAN Quantity field, points to a unit field with format UNIT
RAW Uninterpreted sequence of bytes
RAWSTRING Byte String of Variable Length
SSTRING Short Character String of Variable Length
STRING Character String of Variable Length
TIMS Time field (hhmmss), stored as char(6)
VARC Long character string, no longer supported from Rel. 3.0
UNIT Unit key for QUAN fields
Pls chk this links;
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/content.htm
Hope this helps,
Regards
CSM Reddy

Similar Messages

  • Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE

    hai
    can any one say the differences between Data type and Data Object.
    And also differences between TYPE and LIKE
    thanks
    Gani

    hi,
    _Data Types and Data Objects_
          Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by 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 thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
       As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. 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 TYPESstatement) 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.
         All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b.  Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
          Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
           Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
            A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
          Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
         The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a.  Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b.  Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c.  Anonymous Data  Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d.  System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e.  Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    What is the difference between Type and Like?
    Answer1:
    TYPE, you assign datatype directly to the data object while declaring.
    LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    Answer2:
    Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Answer3:
    type refers the existing data type
    like refers the existing data object
    reward if useful
    thanks and regards
    suma sailaja pvn

  • Convert an U8 array to a LabView data type

    In my code the input is an fixed length of U8 array reflecting data in memory, I need to convert it to a predefined data type. For example, the first 2 U8 elements in the arrary need to comvert to an U16 data, next 4 U8 elements to U32 data. I am just wondering if there is any easy way to do that kind of conversion. 
    Solved!
    Go to Solution.

    In the first case use the Join Numbers function to join the bytes. In the second case, use the Join Numbers function three times: twice to join the consecutive bytes and once more to join the words into a single long word.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Data types and data objects

    diff b/w data types and data objects

    hi prasanth,
    Data Types and Data Objects
    Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by 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 thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
    Data types are templates for creating data objects. Data types can be defined independently in the ABAP program or in the ABAP Dictionary. As attributes of a data object, data types can also exist in a non-independent state. Data types do not use any memory space for work data, but may require memory for administration information.
    As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. 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 TYPESstatement) 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.
    All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b. Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
    A data object is an instance of a data type and occupies as much memory space as its type specifies. An ABAP program only works with data that is available as content of data objects. Data objects are either created implicitly as named data objects, or exanonymous data objects using CREATEDATA.
    Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
    Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
    A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
    Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
    The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a. Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b. Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c. Anonymous Data Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d. System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e. Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    regards,
    sravanthi

  • Data types pls..

    Hi All,
    What are all the data types we have, let me know each data type purpose pls....
    Akshitha.

    Data types describe the technical attributes of data objects. They are purely descriptive and do not take up any memory space
    Data Types in the ABAP Dictionary
    The ABAP Dictionary allows you to define global data types. You can use the TYPE addition of an appropriate ABAP statement to refer to these data types in any ABAP program in the system.
    There are three groups on the initial screen:
    Database Tables and Views
    One of the most important tasks of the ABAP Dictionary is to administer database tables in the R/3 database. The Dictionary contains metadescriptions of the database tables, and uses these to create the physical tables in the database. A view is a "virtual table" containing fields from one or more tables.
    In the description of a database table, the table lines consist of single fields or columns. An elementary data type must be assigned to each column. The elementary types in the ABAP Dictionary are data elements. Like data objects in ABAP programs, database tables and views have data types as attributes. A line of a database table or view has the data type of a flat structure, which consists of individual data elements.
    In ABAP programs, you can use the TYPE addition with the data type of a database table or view. You may refer to the whole structure or to individual components:
    ... TYPE <dbtab> ...
    refers to the complex data type of the structure,
    ... TYPE <dbtab>-<ci> ...
    refers to the elementary data type of component <ci>.
    If you define a complex data type <t> as a structure using
    TYPES <t> TYPE <dbtab>.
    the components of the data type <t> inherit the names of the components of the database table or view, and can be addressed in the program using <t>-<ci>.
    To ensure compatibility with previous releases, you can still use the LIKE addition to refer to database tables or views, except within classes. The reason for this is that in earlier releases, the physical presence of the database tables as objects was emphasized, even though the Dictionary only contains metadescriptions and data types.
    Defining program-local data types by referring to database tables and views is one of the essential techniques for processing data from database tables in ABAP. Data objects that you define in this way always have the right type to contain data from the corresponding database table. ABAP Open SQL allows you to read a single field, a range of fields, or an entire database table or view into an internal table.
    TYPES: city type spfli-cityfrom,
           spfli_type TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.
    DATA: wa_city  TYPE city,
          wa_spfli TYPE spfli_type.
    SELECT SINGLE cityfrom FROM spfli
                           INTO wa_city
                           WHERE carrid = 'LH' AND connid = '400'.
    SELECT * FROM spfli INTO TABLE wa_spfli.
    This example defines an elementary data type CITY that refers to a single field of the database table SPFLI and an internal table SPFLI_TYPE, whose line type is the same as the structure of the database table. The SELECT statement reads data from the database into the corresponding data objects.
    Data types
    Data types are the actual type definitions in the ABAP Dictionary. They allow you to define elementary types, reference types, and complex types that are visible globally in the system. The data types of database tables are a subset of all possible types, namely flat structures. Global object types (classes and interfaces) are not stored in the ABAP Dictionary, but in the class library. You create them using the Class Builder.
    For a detailed description of data types and their definitions, refer to the Types section of the ABAP Dictionary documentation. The following descriptions mention the types only briefly, along with how you can refer to them from ABAP programs.
    Data Elements
    Data elements in the ABAP Dictionary describe individual fields. They are the smallest indivisible units of the complex types described below, and are used to specify the types of columns in the database. Data elements can be elementary types or reference types.
    Elementary Types
    Elementary types are part of the dual-level domain concept for fields in the ABAP Dictionary. The elementary type has semantic attributes, such as texts, value tables, and documentation, and has a data type. There are two different ways to specify a data type:
    By directly assigning an ABAP Dictionary type.
    You can assign a predefined ABAP Dictionary type and a number of characters to an elementary type. The ABAP Dictionary has considerably more predefined types than the ABAP programming language. The number of characters here is not the field length in bytes, but the number of valid characters excluding formatting characters. The data types are different because the predefined data types in the ABAP Dictionary have to be compatible with the external data types of the database tables supported by the R/3 System.
    When you refer to data types from the ABAP Dictionary in an ABAP program, the predefined Dictionary types are converted to ABAP types as follows:
    Dictionary type
    Meaning
    Maximum length n
    ABAP type
    DEC
    Calculation/amount field
    1-31, 1-17 in tables
    P((n+1)/2)
    INT1
    Single-byte integer
    3
    Internal only
    INT2
    Two-byte integer
    5
    Internal only
    INT4
    Four-byte integer
    10
    I
    CURR
    Currency field
    1-17
    P((n+1)/2)
    CUKY
    Currency key
    5
    C(5)
    QUAN
    Amount
    1-17
    P((n+1)/2)
    UNIT
    Unit
    2-3
    C(n)
    PREC
    Accuracy
    2
    X(2)
    FLTP
    Floating point number
    16
    F(8)
    NUMC
    Numeric text
    1-255
    N(n)
    CHAR
    Character
    1-255
    C(n)
    LCHR
    Long character
    256-max
    C(n)
    STRING.
    String of variable length
    1-max
    STRING.
    RAWSTRING
    Byte sequence of variable length
    1-max
    XSTRING
    DATS
    Date
    8
    D
    ACCP
    Accounting period YYYYMM
    6
    N(6)
    TIMS
    Time HHMMSS
    6
    T
    RAW
    Byte sequence
    1-255
    X(n)
    LRAW
    Long byte sequence
    256-max
    X(n)
    CLNT
    Client
    3
    C(3)
    LANG
    Language
    internal 1, external 2
    C(1)
    ("max" in LCHR and LRAW is the value of a preceding INT2 field. The "internal" length of a LANG field is in the Dictionary, the "external" length refers to the display on the screen.
    Assigning a domain
    The technical attributes are inherited from a domain. Domains are standalone Repository objects in the ABAP Dictionary. They can specify the technical attributes of a data element. One domain can be used by any number of data elements. When you create a domain, you must specify a Dictionary data type (see above table) and the number of characters.
    Reference Types
    Reference types describe single fields that can contain references to global classes and interfaces from the ABAP class library.
    In an ABAP program, you can use the TYPE addition to refer directly to a data element. The predefined Dictionary data types of the domain are then converted into the corresponding ABAP types.
    If you define a local data type in a program by referring to a data element as follows:
    TYPES <t> TYPE <data element>.
    the semantic attributes of the data element are inherited and will be used, for example, when you display a data object with type <t> on the screen. Since all data types in the ABAP Dictionary are based on data elements, they all contain the corresponding semantic attributes.
    TYPES company TYPE s_carr_id.
    DATA wa_company TYPE company.
    wa_company = 'UA '.
    WRITE: 'Company:', wa_company.
    This example defines a local type COMPANY that refers to the data element S_CARR_ID. The data element is linked to the identically-named domain S_CARR_ID. The domain defines the technical attributes as data type CHAR with length 3. The local data type COMPANY in the program therefore has the ABAP type C(3). COMPANY also adopts the semantic attributes of the data element. In the above example, we declare a data object WA_COMPANY with this type and display it on a list. If the user chooses F1 help for the output field, the help text stored in the ABAP Dictionary will appear in a dialog box.
    Structures
    A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types, or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.
    In an ABAP program, you can use the TYPE addition to refer directly to a structure.
    If you define a local data type in a program by referring to a structure as follows:
    TYPES <t> TYPE <structure>.
    the construction blueprint of the structure is used to create a local structure <t> in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the structure in the program. The components of the local structure <t> have the same names as those of the structure in the ABAP Dictionary.
    To ensure compatibility with previous releases, it is still possible to use the LIKE addition in an ABAP program to refer to a structure in the ABAP Dictionary (except in classes).
    Suppose the structure STRUCT is defined as follows in the ABAP Dictionary:
    Field name
    Type name
    Description
    COL1
    CHAR01
    Character field with length 1
    COL2
    CHAR08
    Character field with length 8
    COL3
    CHAR10
    Character field with length 10
    The types CHAR01 to CHAR10 are data elements with corresponding domains. We can refer to this structure in ABAP:
    TYPES struct_type TYPE struct.
    DATA wa TYPE struct_type.
    wa-col1 = '1'.
    wa-col2 = '12345678'.
    wa-col3 = '1234567890'.
    This program creates a local structure in the program - STRUCT_TYPE - and a corresponding data object WA. We can address the components using the component names from the original structure.
    Table Types
    Table types are construction blueprints for internal tables that are stored in the ABAP Dictionary. When you create a table type in the ABAP Dictionary, you specify the line type, access type, and key. The line type can be any data type from the ABAP Dictionary, that is, a data element, a structure, a table type, or the type of a database table. You can also enter a predefined Dictionary type directly as the line type, in the same way that you can with a domain.
    In an ABAP program, you can use the TYPE addition to refer directly to a table type.
    If you define a local data type in a program by referring to a table type as follows:
    TYPES <t> TYPE <table>.
    the construction blueprint of the table type is used to create a local internal table <t> in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the internal table in the program.
    Suppose the table type STRUCT_TABLE is defined in the Dictionary with the line type STRUCT from the previous example. We can refer to this in ABAP:
    TYPES table_type TYPE struct_table.
    DATA: table_wa TYPE table_type,
          line_wa  LIKE LINE OF table_wa.
    LOOP AT table_wa INTO line_wa.
      WRITE: line_wa-col1, line_wa-col1, line_wa-col1.
    ENDLOOP.
    This program defines an internal table type TABLE_TYPE. From it, we define data objects TABLE_WA and LINE_WA. LINE_WA corresponds to the line type of the table type in the Dictionary, and is therefore compatible with the structure STRUCT.
    Type Groups
    Before Release 4.5A, it was not possible to define standalone types in the ABAP Dictionary to which you could refer using a TYPE addition in an ABAP program. It was only possible to refer to flat structures. Structures in programs corresponded to the structures of database tables or structures in the ABAP Dictionary. In ABAP programs, you could only refer to database tables and structures in the ABAP Dictionary using LIKE. It was, however, possible to refer to individual components of the Dictionary type. Complex local data types such as internal tables or deep structures had no equivalent in the ABAP Dictionary. The solution to this from Release 3.0 onwards was to use type groups. Type groups were based on the include technique, and allowed you to store any type definitions globally in the Dictionary by defining them using TYPES statements.
    The definition of a type group is a fragment of ABAP code which you enter in the ABAP Editor. The first statement for the type group <pool> is always:
    TYPE-POOL <pool>.
    After this came the definitions of data types using the TYPES statement, as described in Local Data Types in Programs. It was also possible to define global constants using the CONSTANTS statement. All the names of these data types and constants must begin with the name of the type group and an underscore:
    In an ABAP program, you must declare a type group as follows before you can use it:
    TYPE-POOLS <pool>.
    This statement allows you to use all the data types and constants defined in the type group <pool> in your program. You can use several type groups in the same program.
    Let the type group HKTST be created as follows in the ABAP Dictionary:
    TYPE-POOL hktst.
    TYPES: BEGIN OF hktst_typ1,
                    col1(10) TYPE c,
                    col2 TYPE i,
           END OF hktst_typ1.
    TYPES hktst_typ2 TYPE p DECIMALS 2.
    CONSTANTS hktst_eleven TYPE i VALUE 11.
    This type group defines two data types HKTST_TYP1 and HKTST_TYP2, as well as a constant HKTST_ELEVEN with the value 11.
    Any ABAP program can use these definition by including a TYPE-POOLS statement:
    TYPE-POOLS hktst.
    DATA: dat1 TYPE hktst_typ1,
          dat2 TYPE hktst_typ2 VALUE '1.23'.
    WRITE: dat2, / hktst_eleven.
    The output is:
    1,23
    11
    The data types defined in the type group are used to declare data objects with the DATA statement and the value of the constant is, as the output shows, known in the program.

  • Problem in F data type

    Hi experts...
    I am using F data type and it gets value 5.50000000000E+10.
    but I want value like 5.500.
    I don't want to use P data type.
    Please Help me.
    thanks in advance.

    Ankita,
    Try declaring it as type quann and check.
    Some additional info:-
    Type F values range from /- 2.2250738585072014E-308 to 1.7976931348623157E308, as well as the number 0, with an accuracy of at least 15 decimal places.
    You cannot enter floating point numbers directly in your programs. Instead, you must use text literals that can be interpreted as floating point numbers. You may use the following formats:
    Decimal numbers with or without sign, with or without decimal point. The form <mantissa> E<exponent>, where the mantissa is a decimal. The exponent may be specified either with or without sign. You may also use spaces before or after the number. Examples of text literals with "floating point numbers":
    '1', '-12.34567', '-765E-04', '1234E5', '12E34', '+12.3E-4', '1E160'.
    Use floating point arithmetic if you need a very large value range or you are making decimal calculations, but be aware of the following features of floating point arithmetic.
    Internally, the exponent and the mantissa of floating point numbers are stored separately, each in two parts. This can lead to unexpected results, despite the high degree of intrinsic accuracy. These occur mainly when performing conversions from and to type F.
    For example, the number 1.5 can be represented exactly in this notation, since 1.5 = 120 + 12**(-1), but the number 0.15 can only be represented approximately by the number 0,14999999999999999. If you round 0.15 up to 1 valid digit, the result is 0.1 rather than 0.2 as you would expect. On the other hand, the number 1.5E-12 is represented by the number 1.5000000000000001E-12, which would be rounded to 2E-12.
    Another example which actually occurred is the calculation of 7.27% of 73050 to an accuracy of 2 decimal places. The intermediate result 5.3107349999999997E+03, since the correct result, 5310.735, cannot be represented exactly in two parts with 53 bits. (If the hardware cannot represent a real number exactly, it uses the next representable floating point number. After rounding, you therefore get 5310.73 rather than 5310.74 as you would expect.
    The ABAP runtime system calculates commercially and not "numerically" like the underlying machine arithmetic. According to the rounding algorithm of the latter, the end digit 5 must always be rounded to the nearest even number (not the next largest number), i.e. from 2.5 to 2, 3.5 to 4.
    You should also note that multiplication using powers of 10 (positive or negative), is not an exact operation. For example, although 100.5 can be represented exactly in two parts, after the operation
    F = F / 100 * 100
    F has the value 100.49999999999999.
    As well as rounding errors, the restricted number of decimal places for the mantissa can lead to the loss of trailing digits. For example, 1 - 1.0000000000000001 results in zero.
    This means that you cannot rely on the last digits in floating point arithmetic. In particular, you should not usually test two floating point numbers for equality; instead, you should check whether the relative difference abs((a - b)/a) is less than a predefined limit, e.g. 10**(-7).
    K.Kiran.

  • Value in data type p field not displayed properly when download to UNIX

    Hi,
    One of my programs downloads a file to UNIX server,
    here the data which i am downloading, one of the fields is of type P (it is of domain type DEC).
    The field displays very strangecharactershen i view it in UNIX server.
    I am using OPEN DATASET in binary mode statement.
    my system is unicode enabled ECC6.0 version
    Please help

    That is normal, type "P" packed fields with two decimal digits packed into each byte Use another type of field, if you want the field to be readable..
    Look at [Predefined ABAP Types|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fc/eb2fd9358411d1829f0000e829fbfe/frameset.htm]
    Regards

  • Binary Data type in Logical - Is it a bug?

    Binary Data type in Logical - Is it a bug?
    Hi ,
    I am using SQL DM 3.0.0.665. I need your thoughs on following.
    I have an attribute in logical model with binary datatype. As I generate physical, SQL DM putting the column in BLOB data type. I thought binary means 1 bit ON/OFF type.
    What is the interpretation?
    Thanks in helping us out.

    I thought binary means 1 bit ON/OFF typeYou can check mapping of logical type to native database types in "Tools>Types administration". Data Modeler comes with set of predefined logical type and their purpose is to cover all native types in supported databases.
    Nothing can stop you to change predefined types if you don't like them or/and to create your own types.
    In the case of "Binary" - it's introduced to cover "binary" type in MS SQL Server - it's sequence of bytes not bits or bit.
    Philip

  • Display data type

    hi,
    how to display oralce's data type from system table is there any system table to fetch the data types for that version i'm using Oracle 11g.
    in sql server we fetch the details by using
    select * from sys.types
    this will return what the data types supported by that version
    Thanks!

    There is a package called STANDARD in the SYS schema that defines many of the standard datatypes and functions.
    e.g.
    CREATE OR REPLACE package SYS.STANDARD AUTHID CURRENT_USER is              -- careful on this line; SED edit occurs!
      /********** Types and subtypes, do not reorder **********/
      type BOOLEAN is (FALSE, TRUE);
      type DATE is DATE_BASE;
      type NUMBER is NUMBER_BASE;
      subtype FLOAT is NUMBER; -- NUMBER(126)
      subtype REAL is FLOAT; -- FLOAT(63)
      subtype "DOUBLE PRECISION" is FLOAT;
      subtype INTEGER is NUMBER(38,0);
      subtype INT is INTEGER;
      subtype SMALLINT is NUMBER(38,0);
      subtype DECIMAL is NUMBER(38,0);
      subtype NUMERIC is DECIMAL;
      subtype DEC is DECIMAL;
      subtype BINARY_INTEGER is INTEGER range '-2147483647'..2147483647;
      subtype NATURAL is BINARY_INTEGER range 0..2147483647;
      subtype NATURALN is NATURAL not null;
      subtype POSITIVE is BINARY_INTEGER range 1..2147483647;
      subtype POSITIVEN is POSITIVE not null;
      subtype SIGNTYPE is BINARY_INTEGER range '-1'..1;  -- for SIGN functions
      type VARCHAR2 is NEW CHAR_BASE;
      subtype VARCHAR is VARCHAR2;
      subtype STRING is VARCHAR2;
      subtype LONG is VARCHAR2(32760);
      subtype RAW is VARCHAR2;
      subtype "LONG RAW" is RAW(32760);
      subtype ROWID is VARCHAR2(256);
      -- Ansi fixed-length char
      -- Define synonyms for CHAR and CHARN.
      subtype CHAR is VARCHAR2;
      subtype CHARACTER is CHAR;
      type MLSLABEL is new CHAR_BASE;
      -- Large object data types.
      --  binary, character, binary file.
      type  BLOB is BLOB_BASE;
      type  CLOB is CLOB_BASE;
      type  BFILE is BFILE_BASE;
      -- Verbose and NCHAR type names
      subtype "CHARACTER VARYING" is VARCHAR;
      subtype "CHAR VARYING" is VARCHAR;
      subtype "NATIONAL CHARACTER" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHAR" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NCHAR" is CHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHARACTER VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NATIONAL CHAR VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NCHAR VARYING" is VARCHAR CHARACTER SET NCHAR_CS;
      subtype "NVARCHAR2" is VARCHAR2 CHARACTER SET NCHAR_CS;
      subtype "CHARACTER LARGE OBJECT" is CLOB;
      subtype "CHAR LARGE OBJECT" is CLOB;
      subtype "NATIONAL CHARACTER LARGE OBJEC" is CLOB CHARACTER SET NCHAR_CS;
      subtype "NCHAR LARGE OBJECT" is CLOB CHARACTER SET NCHAR_CS;
      subtype "NCLOB" is CLOB CHARACTER SET NCHAR_CS;
      subtype "BINARY LARGE OBJECT" is BLOB;
      subtype pls_integer is binary_integer;
      type TIME is new DATE_BASE;
      type TIMESTAMP is new DATE_BASE;
      type "TIME WITH TIME ZONE" is new DATE_BASE;
      type "TIMESTAMP WITH TIME ZONE" is new DATE_BASE;
      type "INTERVAL YEAR TO MONTH" is new DATE_BASE;
      type "INTERVAL DAY TO SECOND" is new DATE_BASE;
      SUBTYPE TIME_UNCONSTRAINED IS TIME(9);
      SUBTYPE TIME_TZ_UNCONSTRAINED IS TIME(9) WITH TIME ZONE;
      SUBTYPE TIMESTAMP_UNCONSTRAINED IS TIMESTAMP(9);
      SUBTYPE TIMESTAMP_TZ_UNCONSTRAINED IS TIMESTAMP(9) WITH TIME ZONE;
      SUBTYPE YMINTERVAL_UNCONSTRAINED IS INTERVAL YEAR(9) TO MONTH;
      SUBTYPE DSINTERVAL_UNCONSTRAINED IS INTERVAL DAY(9) TO SECOND (9);
      TYPE UROWID IS NEW CHAR_BASE;
      type "TIMESTAMP WITH LOCAL TIME ZONE" is new DATE_BASE;
      subtype timestamp_ltz_unconstrained is timestamp(9) with local time zone;
      subtype BINARY_FLOAT is NUMBER;
      subtype BINARY_DOUBLE is NUMBER;
      -- The following data types are generics, used specially within package
      -- STANDARD and some other Oracle packages.  They are protected against
      -- other use; sorry.  True generic types are not yet part of the language.
      type "<ADT_1>" as object (dummy char(1));
      type "<RECORD_1>" is record (dummy char(1));
      type "<TUPLE_1>" as object (dummy char(1));
      type "<VARRAY_1>" is varray (1) of char(1);
      type "<V2_TABLE_1>" is table of char(1) index by binary_integer;
      type "<TABLE_1>" is table of char(1);
      type "<COLLECTION_1>" is table of char(1);
      type "<REF_CURSOR_1>" is ref cursor;
      -- This will actually match against a Q_TABLE
      type "<TYPED_TABLE>" is table of  "<ADT_1>";
      subtype "<ADT_WITH_OID>" is "<TYPED_TABLE>";
      -- The following generic index table data types are used by the PL/SQL
      -- compiler to materialize an array attribute at the runtime (for more
      -- details about the array attributes, please see Bulk Binds document).
      type " SYS$INT_V2TABLE" is table of pls_integer index by binary_integer;
      -- The following record type and the corresponding generic index table
      -- data types are used by the PL/SQL compiler to materialize a table
      -- at the runtime in order to record the exceptions raised during the
      -- execution of FORALL bulk bind statement (for more details, please
      -- see bulk binds extensions document in 8.2).
      type " SYS$BULK_ERROR_RECORD" is
              record (error_index pls_integer, error_code pls_integer);
      type " SYS$REC_V2TABLE" is table of " SYS$BULK_ERROR_RECORD"
                                   index by binary_integer;
      /* Adding a generic weak ref cursor type */
      type sys_refcursor is ref cursor;
      /* the following data type is a generic for all opaque types */
      type "<OPAQUE_1>" as opaque FIXED(1) USING LIBRARY dummy_lib
        (static function dummy return number);
      type "<ASSOC_ARRAY_1>" is table of char(1) index by varchar2(1);
      /********** Add new types or subtypes here **********/
      /********** Predefined constants **********/
      BINARY_FLOAT_NAN constant BINARY_FLOAT;
      BINARY_FLOAT_INFINITY constant BINARY_FLOAT;
      BINARY_FLOAT_MAX_NORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MIN_NORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MAX_SUBNORMAL constant BINARY_FLOAT;
      BINARY_FLOAT_MIN_SUBNORMAL constant BINARY_FLOAT;
      BINARY_DOUBLE_NAN constant BINARY_DOUBLE;
      BINARY_DOUBLE_INFINITY constant BINARY_DOUBLE;
      BINARY_DOUBLE_MAX_NORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MIN_NORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MAX_SUBNORMAL constant BINARY_DOUBLE;
      BINARY_DOUBLE_MIN_SUBNORMAL constant BINARY_DOUBLE;
      /********** Add new constants here **********/
      /********** Predefined exceptions **********/
      CURSOR_ALREADY_OPEN exception;
        pragma EXCEPTION_INIT(CURSOR_ALREADY_OPEN, '-6511');
      DUP_VAL_ON_INDEX exception;
        pragma EXCEPTION_INIT(DUP_VAL_ON_INDEX, '-0001');
    ..and so it goes on... take a look yourself
    Edited by: BluShadow on 18-Dec-2012 09:32

  • Data types and Data object

    Can Any one give me Clear definition of Data type and Data objects.
    Concept i know clearly.. but unable to explain it..
    Regards,
    Prasanna

    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.
    <b>Data Types:</b>
                     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
    <b>Data objects:</b>
                      Data objects are the physical units with which ABAP statements work at runtime. Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running. The technical attributes of a data object are its length, number of decimal places, and data type. ABAP statements work with the contents of data objects and interpret them according to their data type. You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
    ABAP contains the following kinds of data objects
      Literals
       Named Data Objects
      Predefined Data Objects
      Dynamic Data Objects

  • Data type and Data object

    Hi Friends,
            What is the difference between Data type and Data object?
    Best Regards,
    VRV Singh

    hi
    good
    Each ABAP program define its own data types using the statement.
    TYPES dtype TYPE type ...
    and declare its own variables or instance attributes of classes using the statement
    DATA var {TYPE type} ...
    Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.
    When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    Constructing New Data Types
    The TYPE addition allows you to construct new data types in the TYPES, DATA; CONSTANTS; and STATICSstatements. In the TYPES statement, these are local data types in the program. In the other statements, they are attributes of new data objects, meaning that the newly defined data types are not free-standing. Rather, they are linked to database objects.This means that you can refer to them using the LIKEaddition, but not using TYPE.
    To construct new data types, the addition TYPE can be used with the following type constructors:
    ·        Construction of reference types
    REF TO type|dobj
    ·        Construction of structured data types
    BEGIN OF struc_type.
    END OF struc_type.
    ·        Construction of table types
    tabkind OF linetype
    These data types only exist during the runtime of the ABAP program.
    Referring to Known Data Types or Data Objects
    Using the additions TYPE or LIKE in the TYPESstatement, local data types in a program can be referred to known data types or data objects. This is mainly the case with user-defined elementary data types. If you declare variables using the additions TYPE type or LIKE dobj with statement DATA, the data type of var is already fully defined before the declaration is made.
    The known types or data that are referred to must be visible at the point where the data type or variable is declared.
    A known data type can be any of the following:
    ·        A predefined ABAP type to which you refer using the TYPE addition
    ·        An existing local data type in the program to which you refer using the TYPE addition
    ·        The data type of a local data object in the program to which you refer using the LIKE addition
    ·        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
    The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    ·        In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    ·        You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
    DATA dref TYPE REF TO cl_global.
    DATA:  f1 LIKE cl_global=>attr,
           f2 LIKE dref->attr.
    You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm
    thanks
    mrutyun^

  • AppleScript Call Soap Data types

    I am using AppleScript to issue SOAP requests via built-in the 'call soap' function. The server to which I am connecting uses both simple and complex data types. It's pretty straight forward issuing the basic parameters for simple data types, but if the remote method requires a complex data type, such as a double set of parameters, I can't see how to get it done.
    Anyone have any experience sending SOAP requests with AppleScript that involved complex data types, which include multiple parameters, rather than just simple flat parameter lists?

    Hi,
    not exactly sure what you mean by placeholder data types?
    Surely it would be better to evaluate off a sample employee/departments or predefined database schema if you want to see what the UI / design process is like?
    The design process is very smooth and elegant in JDev 11g if you use the business components from tables wizard in the model and then design pages.
    Brenden

  • String data type

    Hi
    Is there a built-in function/method to perform substring on an input
    string?
    If there is no such method, what is the quick and easy way to do
    substring on a string?
    Thanks
    Anthony
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Predefined Subtypes of Character Data Types
    >
    The CHAR data type has one predefined subtype, CHARACTER. The VARCHAR2 data type has two predefined subtypes, VARCHAR and STRING. Each of these subtypes has the same range of values as its base type, and can be used instead of its base type for compatibility with ANSI/ISO and IBM types.

  • MessageType and Data Type

    Hi Experts,
    In IR we are creating DataTypes and MessageTypes what excatly the main difference between why we need to create 2 things.

    Hi,
    Data types are abstract in nature,
    Data type defines the structure of your xml message.Message type is the wrapper of data type.You will be using your message type while mapping and not the data type.Its the abstraction concept used in oops
    A data type in a programming language is a set of data with values having predefined characteristics.
      Examples of data types are: integer, floating point unit number, character, string, and pointer.
    The characteristic of columns and variables that defines what types of data values they can store.
    Examples include character, floating point and integer
    Check out the details:
    http://en.wikipedia.org/wiki/Data_type
    A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type.
    details: http://help.sap.com/saphelp_nw04/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm

  • System table contains data types

    Hi all,
    I am migrating queries from SqlServer 7.0 to Oracle. I found a system tabel Systypes in SqlServer 7.0 which contains all the avaliable datatypes. Is there any similar table in Oracle from which we can get all data types. Any reply will be appreciated.

    Not only at least in 10g R2:
    SQL> select type_name from dba_types where predefined = 'YES';
    TYPE_NAME
    KOKED
    KOKED1
    KOTAD
    KOTADX
    KOTMD
    KOTMI
    KOTTB
    KOTTBX
    KOTTD
    BFILE
    BINARY ROWID
    TYPE_NAME
    BINARY_DOUBLE
    BINARY_FLOAT
    BLOB
    CANONICAL
    CFILE
    CHAR
    CLOB
    CONTIGUOUS ARRAY
    DATE
    DECIMAL
    DOUBLE PRECISION
    TYPE_NAME
    FLOAT
    INTEGER
    INTERVAL DAY TO SECOND
    INTERVAL YEAR TO MONTH
    LOB POINTER
    NAMED COLLECTION
    NAMED OBJECT
    NUMBER
    OCTET
    OID
    PL/SQL BINARY INTEGER
    TYPE_NAME
    PL/SQL BOOLEAN
    PL/SQL COLLECTION
    PL/SQL LONG
    PL/SQL LONG RAW
    PL/SQL NATURAL
    PL/SQL NATURALN
    PL/SQL PLS INTEGER
    PL/SQL POSITIVE
    PL/SQL POSITIVEN
    PL/SQL RECORD
    PL/SQL REF CURSOR
    TYPE_NAME
    PL/SQL ROWID
    PL/SQL STRING
    POINTER
    RAW
    REAL
    REF
    SIGNED BINARY INTEGER(16)
    SIGNED BINARY INTEGER(32)
    SIGNED BINARY INTEGER(8)
    SMALLINT
    TABLE
    TYPE_NAME
    TIME
    TIME WITH TZ
    TIMESTAMP
    TIMESTAMP WITH LOCAL TZ
    TIMESTAMP WITH TZ
    UNSIGNED BINARY INTEGER(16)
    UNSIGNED BINARY INTEGER(32)
    UNSIGNED BINARY INTEGER(8)
    UROWID
    VARCHAR
    VARCHAR2
    TYPE_NAME
    VARYING ARRAY
    67 rows selected.

Maybe you are looking for