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

Similar Messages

  • Data objects and code objects in oracle application

    Hi,
    can any one please help me out with following question?
    1. what are data objects and code objects in oracle apps and why is that difference?
    2. How does the objects gets created in Oracle Applications, like during the installation which part is responsible for creating objects and after the installtion later point of time, how the new objects gets created in oracle applications?
    3. what are the ways to find out if my 11i application is OATM enabled ?
    Thanks in advance

    Hello,
    I managed to find answer for question 1, yet to find answer for 2 and 3.
    Answer for question 1 --
    Data objects : store and access business data (tables, indexes, sequences, index-organized tables, etc);
    Code objects : process data objects but them don't contains business data (functions, procedures, packages, views, synonyms);
    Now, here i have a question - under which objects queues are considered ?

  • Mutable and Immuatable Objects...Pl. Explain

    I would like to know what exactly are these mutable and immutable objects with respect to Java and how do they differ.

    Immutable objects are the one in which the same reference can't be assigned again and again if you perform any operation on it,in the other way it creates new reference whenever a method is called on that object.,example for that is the String object.
    Mutable objects are one in which the reference is not modified for any method on that object.For example StringBuffer object.,the same reference is used always.
    The basic difference is the reference you manipulate on.Immutable not possible to manipulate the same reference,Mutable possible to manipulate with the same reference.
    Hope this helps.
    Regards,
    Hari

  • APO roles and auth objects

    Hello all,
    Can someone tell me the most common used Tcodes, roles and auth objects in SAP APO - DP and APO-SNP security
    thanks

    I was going to type them out but luckily for me found this link to the DP & SNP auth objects - the info there is as detailed as anything else I have seen
    http://help.sap.com/saphelp_scm50/helpdata/en/21/f6253b90e48743e10000000a11402f/content.htm
    There is a list of useful APO transactions here
    http://help.sap.com/bp_scmv241/documentation/SCM_AIO_BP_Function_List.xls
    I can't help with the standard roles as I build my own.

  • Issues in persisting dynamic entity and view objects using MDS

    Hi All,
    I'm trying to create dynamic entity and view objects per user session and to persist these objects throughout the session, I'm trying to use MDS configurations(either file or Database) in adf-config.xml.
    I'm facing following two errors while trying to run the app module:
    1. MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/model/DynamicEntityGenModuleOperations.xml"
    2. oracle.mds.exception.ReadOnlyStoreException: MDS-01273: The operation on the resource /sessiondef/dynamic/DynamicDeptEntityDef.xml failed because source metadata store mapped to the namespace / DEFAULT is read only.
    I've gone through the following links which talks about the cause of the issue, but still can't figure out the issue in the code or the config file. Please help if, someone has faced a similar issue.
    [http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG |http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG ]
    [http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm|http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm]
    Attached is the code for dynamic entity/view object generation and corresponding adf-config.xml used.
    ///////////App Module Implementation Class/////////////////////////
    public class DynamicEntityGenModuleImpl extends ApplicationModuleImpl implements DynamicEntityGenModule {
    private static final String DYNAMIC_DETP_VO_INSTANCE = "DynamicDeptVO";
    * This is the default constructor (do not remove).
    public DynamicEntityGenModuleImpl() {
    public ViewObjectImpl getDepartmentsView1() {
    return (ViewObjectImpl) findViewObject("DynamicDeptVO");
    public void buildDynamicDeptComp() {
    ViewObject internalDynamicVO = findViewObject(DYNAMIC_DETP_VO_INSTANCE);
    if (internalDynamicVO != null) {
    System.out.println("OK VO exists, return Defn- " + internalDynamicVO.getDefFullName());
    return;
    EntityDefImpl deptEntDef = buildDeptEntitySessionDef();
    ViewDefImpl viewDef = buildDeptViewSessionDef(deptEntDef);
    addViewToPdefApplicationModule(viewDef);
    private EntityDefImpl buildDeptEntitySessionDef() {
    try {
    EntityDefImpl entDef = new EntityDefImpl(oracle.jbo.server.EntityDefImpl.DEF_SCOPE_SESSION, "DynamicDeptEntityDef");
    entDef.setFullName(entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setName(entDef.getName());
    System.out.println("Application Module Path name: " + getDefFullName());
    System.out.println("EntDef :" + entDef.getFileName() + " : " + entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setAliasName(entDef.getName());
    entDef.setSource("DEPT");
    entDef.setSourceType("table");
    entDef.addAttribute("ID", "ID", Integer.class, true, false, true);
    entDef.addAttribute("Name", "NAME", String.class, false, false, true);
    entDef.addAttribute("Location", "LOCATION", Integer.class, false, false, true);
    entDef.resolveDefObject();
    entDef.registerSessionDefObject();
    entDef.writeXMLContents();
    entDef.saveXMLContents();
    return entDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private ViewDefImpl buildDeptViewSessionDef(EntityDefImpl entityDef) {
    try {
    ViewDefImpl viewDef = new oracle.jbo.server.ViewDefImpl(oracle.jbo.server.ViewDefImpl.DEF_SCOPE_SESSION, "DynamicDeptViewDef");
    viewDef.setFullName(viewDef.getBasePackage() + ".dynamic." + viewDef.getName());
    System.out.println("ViewDef :" + viewDef.getFileName());
    viewDef.setUseGlueCode(false);
    viewDef.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_FULL);
    viewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
    viewDef.setSelectClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.addEntityUsage("DynamicDeptUsage", entityDef.getFullName(), false, false);
    viewDef.addAllEntityAttributes("DynamicDeptUsage");
    viewDef.resolveDefObject();
    viewDef.registerSessionDefObject();
    viewDef.writeXMLContents();
    viewDef.saveXMLContents();
    return viewDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private void addViewToPdefApplicationModule(ViewDefImpl viewDef) {
    oracle.jbo.server.PDefApplicationModule pDefAM = oracle.jbo.server.PDefApplicationModule.findDefObject(getDefFullName());
    if (pDefAM == null) {
    pDefAM = new oracle.jbo.server.PDefApplicationModule();
    pDefAM.setFullName(getDefFullName());
    pDefAM.setEditable(true);
    pDefAM.createViewObject(DYNAMIC_DETP_VO_INSTANCE, viewDef.getFullName());
    pDefAM.applyPersonalization(this);
    pDefAM.writeXMLContents();
    pDefAM.saveXMLContents();
    ////////adf-config.xml//////////////////////
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
    <amconfig-overrides>
    <config:Database jbo.locking.mode="optimistic"/>
    </amconfig-overrides>
    </startup>
    </adf-adfm-config>
    <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="TestDynamicEC-8827"/>
    </adf:adf-properties-child>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    <persistence-config>
    <metadata-namespaces>
    <namespace metadata-store-usage="mdsRepos" path="/sessiondef/"/>
    <namespace path="/model/" metadata-store-usage="mdsRepos"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage default-cust-store="true" deploy-target="true" id="mdsRepos">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property name="metadata-path" value="/tmp"/>
    <!-- <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
    <property name="jndi-datasource" value="jdbc/TestDynamicEC"/>
    <property name="repository-name" value="TestDynamicEC"/>
    <property name="jdbc-userid" value="adfmay28"/>
    <property name="jdbc-password" value="adfmay28"/>
    <property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521:XE"/>-->
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </adf-config>
    //////////////////////////////////////////////////////////////////////////////////////////////////////////

    Hi Frank,
    I m trying to save entity and view object xml by calling writeXMLContents() and saveXMLContents() so that these objects can be retrieved using the xmls later on.
    These methods internally use MDS configuration in adf-config.xml, which is creating the issue.
    Please share your thoughts on resolving this or if, there is any other way of creating dynamic entity/view objects for db tables created at runtime.
    Nik

  • Difference Between Data Type and Data Object

    Difference Between Data Type and Data Object

    hi magesh
    <u><b>Data types</b></u> can be divided into
    elementary,
    reference, and
    complex types.
    <u><b>Elementary Types</b></u>
    Elementary types are the smallest indivisible unit of types. They can be grouped as those with fixed length and those with variable length.
    <u><b>Fixed-Length Elementary Types</b></u>
    There are eight predefined types in ABAP with fixed length:
    <u><b>Four character types:</b></u>
    Character (C),
    Numeric character (N),
    Date (D),
    and Time (T).
    <b>One hexadecimal type:</b>
    Byte field (X).
    <b>Three numeric types:</b>
    Integer (I),
    Floating-point number (F)
    and Packed number (P).
    <u><b>Variable-Length Elementary Types</b></u>
    There are two predefined types in ABAP with variable length:
    STRING for character strings
    XSTRING for byte strings
    Reference Types
    <b>Reference types</b>
    describe data objects that contain references (pointers) to other objects (data objects and objects in ABAP Objects).
    <u><b>Data Types</b></u>
    1) As well as occurring as attributes of a data object, data types can also be defined independently.
    2)You can then use them later on in conjunction with a data object.
    3) The definition of a user-defined data type is based on a <b>set of predefined elementary data types.</b>
    4) You can define data types <b>either locally in the declaration part of a program</b> using the TYPESstatement) or <b>globally in the ABAP</b> Dictionary.
    5) You can use your own data types to declare data objects or to check the types of parameters in generic operations.
    <u><b>Data Objects</b></u>
    1)<b>Data objects</b> are the physical units with which ABAP statements work at runtime.
    2) The contents of a data object occupy memory space in the program.
    3) <b>ABAP statements access these contents by addressing the name of the data object</b> and interpret them according to the data type..
    4) 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.
    5) Each <b>ABAP data object has a set of technical attributes</b>, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type).
    6) You <b>declare data objects</b> either <b>statically in the declaration part</b> of an ABAP program (the most important statement for this is DATA), or <b>dynamically at runtime</b> (for example, when you call procedures).
    7) As well as fields in the memory area of the program, the program also treats literals like data objects.
    hope this helps u,
    reward points if useful
    Ginni

  • Differences between DATA TYPE and DATA OBJECTS

    I am new to ABAP,I want to know the differences between DATA TYPE and DATA OBJECTS with some examples.
    please help me regarding this.

    Hi Ashish,
    Data Types:       Are pure descriptions.
                   No memory is associated with data types.
                   Describes the technical properties of data objects.
    EX.
    1.     C-CHARACTER
    2.     D-DATE
    3.     F-FLOAT
    4.     I-INTEGER
    5.     N-NUMERIC TEXT
    6.     T-TIME
    7.     P-PACKED NUMBER
    8.     X-HEXADECIMAL
    9.     STRING-Variable length string.
    10.     XSTRING-Variable length byte string.
    Data Objects: Are created during runtime.
                    They cannot exist without the data Types.
                    Occupies memory space.
    EX:
    1.     INTERNAL DATA OBJECT- Internal Data objects
         LITEERAL- A literal has a fixed value.Ex: WRITE:u201DWORK HARDu201D.
         VARIABLES: Data statement is used to create variables.
    EX.DATA: NUM TYPE I.
    NUM: VARIABLE defined by data statement.
    EX: DATA: PRICE LIKE NUM.
         CONSTANT-It is a data object, which contains a constant value throughout the program.
    Can be declared in program by using CONSTANT statement.
    EX:CONSTANT: INT TYPE I VALUE 15.
    2.     EXTERNAL DATA OBJECT: Are defined in tables i.e In ABAP/4 dictionary you can access this data from table.
             EX: TABLES: SFLIGHT
              DATA: SEATS LIKE SFLIGHT-SEATSMAX.
    3.     SYSTEM DEFINED DATA OBJECTS:Space & system variables like SY-UNAME,SY-DATUM, SY-REPID.
    4.     SPECIAL DATA  OBJECTS:
         PARAMETERS: Are Variables ,which can accept value from user.
          SELECTION SCREEN : Are special internal tables to accept value ranges from user.
    3 APPROACHES TO DEFINE DATA OBJECTS.
    1.     ELEMENTARY TYPES
    DATA: Customer _Name (25) TYPE C,
                   Vendor_Name (25) TYPE C.
    2.     REFRENCE TO AN EXISTING FIELD:
    DATA: Customer _Name2 (25) TYPE C,
                  Vendor_Name2 (25) LIKE Customer_Name2
    3.     REFRENCE TO NON-ELEMENTARY TYPE:
    TYPES: T_NAME (25) TYPE C
    DATA: CUSTOMER_NAME TYPE T_NAME
                   VENDOR_NAME  TYPE T_NAME
    4.     RECORD-Information in rows & columns.
    DATA: BEGIN OF BOOKING,
                                    ID (4) TYPE C,
                                    FLIGHT_DATE TYPE D,
                                    NAME LIKE CUSTOMER_NAME,
                                    END OF BOOKING.
    You can also look into SAP help for more information.
    Regards,
    Indu.

  • 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^

  • 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

  • Get name and type of data in an object?

    Hello,
    I would like to know if there is a way of getting the names and types of data encapsulated by a labview object?
    For example, lets say I make a simple object, called myObject to be unoriginal, with private data: myObjectName (string), myObjectValue (int 32) (etc)
    How then do I construct a method to return the type of the myObjectValue data, or infact return the names and types of all of the data fields within the object, which could be many?
    Thanks,
    Paul.
    Solved!
    Go to Solution.

    Hi there
    i can't find a generic solution. Attached is a workaround. The trick is to pack all private data inside a cluster and use the "Controls" property of a template of this cluster to get all data elements and their types.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    LVClass_8.5.1.zip ‏38 KB

  • 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

  • Calculation of difference of wages types master data and accounting cluster

    Hi, I am developing a ABAP HR report for calculating the difference of wage types master data and accounting data and in the output i need to display the fields like
    • Officer in-charge of payroll accounting
    • Officer in-charge of Support
    • Officer in-charge of time recording
    also from where I could get the accounting cluster data for the wage types
    I want to know from where I can get these fields and how ther are related with wage types.

    Check through PA30,there are different infotypes by which these data are maintained in the Employee Master.

  • Difference of wages types master data and accounting cluster data

    Hi, I am developing a ABAP HR report for calculating the difference of wage types master data and accounting data and in the output i need to display the fields like
    • Officer in-charge of payroll accounting
    • Officer in-charge of Support
    • Officer in-charge of time recording
    I want to know from where I can get these fields and how ther are related with wage types.

    Hi Luo
    As per below link
    How to... MDG-M: Use the Data Import Framework | SCN
    The IDoc doesn't support flex entities, as they don't write into active area. Therefore, the DIF can only be used to load reuse entities in staging or active area.

  • Difference between Data carrier type and Data carrier??

    Hi experts,
    Could you please explain me the difference between Data carrier type and Data carrier with an example??
    Regards,
    Kiran T

    hi Kiran,
    Data carrier is to achive communication between server and user front end. We can define one data carrier type along with path as default for all or seperate data carriers type for specific users in define data carrier in SPRO. This defined data carriers again we assign to application in defining network for workstation application in SPRO.
    By using data carrier we can upload to & download originals from server. We can change and print the documents from server.
    Please award pts if its useful / need further information.
    Pramod

  • Historic and Current data for Master data bearing objects

    Hi All,
    We are trying to implement type 2 dimensions for all the master data bearing characteristics, where we require historic and current data available for reporting. the master data can have a number of attributes and all of them can be time dependent. We are not getting any 'datefrom' or 'dateto' from the source system.
    For example:
    For Example: The table below shows data entering BI at different dates.
    Source Data day of entering BI
    MasterID ATTR1 ATTR2
    123506 Y REWAR day1
    123506 N REWAR day4
    123506 Y ADJUST day4
    123506 N ADJUST dayn
    The field 'day of entry into BI' is only for your understanding; we do not get any date fields from the source. SID is the field we are generating for uniqueness. It is a counter. EFF_DATE would be the current date for all the data. EXP_DATE would be 31.12.9999 until the attributes change. SID and MasterID together would be the key.
    On day 1 the following data enters BI,
    day 1
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    1 123506 Y REWAR 2/10/2009 12/31/9999
    On day 4, 2 data records enter with same PID,
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    2 123506 N REWAR 2/13/2009 12/31/9999
    3 123506 Y ADJUST 2/13/2009 12/31/9999
    the EXP_DATE of the record of day 1 needs to be changed to current date.
    Also there are two records entering, so latest record would have EXP_DATE as 31.12.9999. And the EXP_DATE of the first record on day 4 should change to the current date.
    so the following changes should happen,
    CHANGE
    SID MasterIDATTR1 ATTR2 EFF_DATE EXP_DATE
    1 123506 Y REWAR 2/10/2009 2/13/2009
    CHANGE
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    On day n, one data record enters with same PID,
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    4 123506 N ADJUST 2/22/2009 12/31/9999
    The change is ,
    CHANGE
    SID MasterID ATTR1 ATTR2 EFF_DATE EXP_DATE
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    The data expected in P-table is as below, on Day n or after Day n, untill any other record enters for this MasterID,
    1 123506 Y REWAR 2/10/2009 2/13/2009
    2 123506 N REWAR 2/13/2009 2/13/2009
    3 123506 Y ADJUST 2/13/2009 2/22/2009
    4 123506 N ADJUST 2/22/2009 12/31/9999
    Has anyone worked on type 2 dimensions earlier? Or any ideas to implement this logic would be appreciated.
    Regards,
    Sudeepti

    Compound the Master ID with eff date and other attribute as superior objects
    so you will get P-table as
    ATTR1   ATTR2   MAT ID  
    1 2/10/2009 2/13/2009 123506 Y REWAR
    2 2/13/2009 2/13/2009 123506 N REWAR
    3 2/13/2009 2/22/2009 123506 Y ADJUST
    4 2/22/2009 12/31/9999  123506 N ADJUST

Maybe you are looking for