Difference between DEclaring Itab with DATA & TYpe Statement?

HI Friends,
  What is the Difference between Declaring Itab with DATA & TYpe Statement?

Hi,
The Statements TYPES and DATA
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
TYPES: BEGIN OF struct,
         number_1 TYPE i,
         number_2 TYPE p DECIMALS 2,
       END OF struct.
DATA:  wa_struct TYPE struct,
       number    LIKE wa_struct-number_2,
       date      LIKE sy-datum,
       time      TYPE t,
       text      TYPE string,
       company   TYPE s_carr_id.
This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.

Similar Messages

  • Please  tell me the difference between CREATE OBJECT & CREATE DATA ,statements in CRMTECHNICAL

    Please  tell me the difference between CREATE OBJECT & CREATE DATA ,statements in CRMTECHNICAL

    found it on my own . the best way to do this is use the RetriveLimitedHierTreeCommand  with a search on the taxonomy table.

  • Considering buying refurbished.  Is there a big difference between a refurb with an original date this year vs. one from over a year ago??

    Considering buying refurbished.  Is there a big difference between a refurb with an original date this year vs. one from over a year ago??

    MacBook Air, 13", Mid 2013:
    On June 10, 2013, Apple released an updated MacBook Air in the same form factor as the 2012 model during the company's Worldwide Developer Conference (WWDC). The 11-inch and 13-inch models have a minimum standard 4GB RAM, with a maximum configuration of 8GB. Both models are powered by the Haswell ULT 1.3GHz dual-core Intel Core i5 processors with Turbo Boost up to 2.6GHz and 1.7GHz Dual-Core i7 with Turbo Boost up to 3.3GHz option available. Each model has a 128GB configuration and a 256GB configuration available, with the 256GB model being upgradeable to 512GB SSD.
    1.3 GHz (Core i5) or 1.7 GHz (Core i7)
    MacBook Air, 13", Early 2014:
    On April 29, 2014 Apple released an updated MacBook Air featuring faster processors and better battery life. The standard configurations also saw a price drop in most regions.
    1.4 GHz (Core i5) or 1.7 GHz (Core i7)
    MacBook Pro, 13", Retina, Late 2013:
    At the Apple Special Event on October 22, 2013, Apple announced that it had updated the 13-inch and 15-inch MacBook Pro with Retina display. Both versions feature the new Intel Haswell chipset.
    2.4 or 2.6 GHz (Core i5) or 2.8 GHz (Core i7)
    MacBook Pro, 13", Retina, Mid 2014:
    On July 29, 2014 Apple announced updated prices and processors for their Haswell Macbook Pro with Retina Display.
    2.6 or 2.8 GHz (Core i5) or 3.0 GHz (Core i7)
    I would go for the Pro Retina since the display is much better.

  • Difference between relational integrity and data intigrity

    hi
    could anybody tell me
    what is the difference between
    relational integrity and data intigrity
    tahnx
    kals.

    hi,
    Data Integrity
    Data integrity means, in part, that you can correctly and consistently navigate and manipulate the tables in the database. There are two basic rules to ensure data integrity; entity integrity and referential integrity.
    The entity integrity rule states that the value of the primary key can never be a null value (a null value is one that has no value and is not the same as a blank). Because a primary key is used to identify a unique row in a relational table, its value must always be specified and should never be unknown. The integrity rule requires that insert, update, and delete operations maintain the uniqueness and existence of all primary keys.
    The referential integrity rule states that if a relational table has a foreign key, then every value of the foreign key must either be null or match the values in the relational table in which that foreign key is a primary key.
    What is a Relational Integrity?
    A relational database contains tables of data which are related to each other. For example, articles are related to the author who wrote them, and conversely, authors are related to the articles they wrote. (Sounds obvious, and it is.) That's the relational part.
    When we work with a relational database, we naturally expect that data in related tables stay related. For example, articles written by MartinB should always be related to MartinB and never be confused with articles written by any other author. That's the integrity part.
    Relational Integrity is also called Referential Integrity, perhaps because the mechanism for ensuring integrity is implemented by the way the tables reference each other. Both terms are okay with me. I usually just say RI anyway.
    Regards,
    Sourabh

  • Adding fields with data type "TIMS" to the BP transaction

    hi all,
      This  is Anil regarding the addition of fields to the BP transaction.
    here my problem is for BP transaction I could not find any BADI or screen exit  to add the fields. Even EEWB tool does not allow us to cretate the fields with data type "TIMS". so could you please suggest any other way to add these fields to BP?
    when I enter the values to the time fields in BP transaction, they must reflect in
    BUT000 table also?
    Regards,
    Anil .

    In the physical layer, Column Properties change the data type to int.
    If still problem exists, In the Business Model, write a case statement like
    case when column1=1 then 1 end
    and apply count aggregation on the new calculated column,add the column to presentation table, use that new calculated column for report.
    - Madan

  • Difference between 0FI_AP_30 and 0FI_AP_4 Data source

    HI,
    What is the difference between 0FI_AP_30 and 0FI_AP_4 Data source.
    Thanks in advance

    Hi,
    In addition to above differences. Below is the functional difference between 0FI_AP_30 & 0FI_AP_4:
    0FI_AP_4 gives you accounts payable line items in your report. Here GL account shows the balances of particular types of  vendors/payables to which that particular GL account is been assigned.
    And If subledger is activated in ECC, then by using 0FI_AP_30 you can get the break up of that particular GL balance according to vendors.
    To make use of datasource 0FI_AP_30, subledger accounting must be activated in ECC.
    Regards,
    Pradip

  • What is the difference between partner function and partner type

    Hi Gurus,
    What is the difference between partner function and partner type?
    Thanks,
    Paul

    Hi John,
    The partner types allow us to distinguish between different business partners such as customer, vendor, employee etc and the partner functions represent the functionality or role each partner plays within the business transaction.
    For example under the partner type Customer, you will find - Sold to party, Ship to party, Bill to party, Payer.
    The business partners that exist in the market place are represented with a partner type in the R/3 system. Examples of business partners are customer, vendor, employee and contact person.
    The following partner types are defined in the partner processing for the sales & distribution module –
    a.     AP – contact person (06)
    b.     KU – customer (07)
    c.     LI – vendor (08)
    d.     PE – employee/personnel (09)
    Assigning the partner functions in the SAP system determines the functions of particular partner in the sales process. One partner may take on several functions also.
    REWARD POINTS IF HELPFUL
    Regards
    Sai

  • Difference between At new and on change statement?

    What is the difference between at new and on change statement? Please explain with an example.

    hi
    on change of differs from at new in the following respects:
    It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    You can use else between on change of and endon.
    You can use it with loop at it where . . ..
    You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    REGARDS
    PRASANTH

  • Difference between 122 and 161 movement type

    Hi,
    Can anyone explain me the difference between 122 and 161 movement type?
    How will be the finance postings?
    Can these movement types will be used in outbound delivery? If so,what kind of scenarios this can be used?
    Thanks
    Srini

    Hi
    Both are belongs to vendor return
    1. 122 - return to vendor -total  consignment - return total received gr qty
         Migo - return delivery with 122- j1is - credit memo
    2. 161 - here you have to crate the return po. return to vendor for partial qty.
         after po- gr - j1is-credit memo
    Laxman

  • Difference between Manual Standby and Data Guard Broker..

    hi,
    could any let me know any usefull docs which help to understand the difference between manual dr and data guard broker?
    thanks,

    >
    could any let me know any usefull docs which help to understand the difference between manual dr and data guard broker?
    >
    Without Data Guard Broker:
    http://www.oracle.com/pls/db112/to_toc?pathname=server.112/e17022/toc.htm
    With Data Guard Broker:
    http://www.oracle.com/pls/db112/to_toc?pathname=server.112/e17023/toc.htm
    See especially why you want to use the broker:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17023/concepts.htm#i1013106
    In short: You should have a good reason if you do not use the broker, because it is the officially recommended way to maintain Data Guard. It is even required for some features like Fast-Start Failover.
    Kind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • What is the difference between 651 and 653 movement types

    Hi
    What is the difference between 651 and 653 movement types
    Points will be rewarded
    Regards
    Suddu

    Hi,
    Whenever goods movment happens following things are going on in the background:
    A material document is generated, which is used as proof of the movement and as a source of information for any other applications involved.
    If the movement is relevant for Financial Accounting, one or more accounting documents are generated.
    The stock quantities of the material are updated.
    The stock values in the material master record are updated, as are the stock and consumption accounts.
    651 - two steps - with a transfer posting using 453
    653 - one steps - direct post to unrestricted used
    *Using movement type 651, you post returns from a customer with a return delivery in Shipping to blocked stock returns.
    Using 653 movement type, you post returns from the customer with returns delivery via Shipping directly to the valuated stock.
    <b>Reward if helpful.</b>
    Thanks

  • Difference between passive and active data connection mode for  FTP

    Hi,
    Does any body have the idea of passive and active data connection mode for the transport protocol FTP.
    I have one server with FTP, I have to pick the data from this FTP to XI.
    What is the difference between active and passive data connection? Does XI supports both the connections?
    Thanks & Regards
    Katta Mohan Reddy

    Hi
    According to SAP Note - 821267
    Q: Does the File Adapter support active data connections when connecting to an FTP server?
    A: Up to and including SP14, the File Adapter exclusively uses passive data connections. Starting with SP15, active connections will be available.
    Difference between active and passive,
    You can definitely refer to the site mentioned by Suraj
    cheers
    Sameer

  • Differences between client copy with sap_all and database copy

    What's the difference between client copy with sap_all and doing a database copy.
    I know if I do a database copy from Production to our Quality system.
    I need to install the license key
    restore the production library to the quality library
    Initialize TMS and so on.
    I know if I want to copy to our Development system. I would need to run either a remote client copy or and export/import since I cannot do a database copy because I would loose all my other clients in Development.
    My question is, if the quality systems and the production systems are on the same support packs, same kernel.
    What does a database copy give you (besides being faser) that a remote client copy or export/import of a client copy does.
    Any differences
    Thanks
    Joe

    Hello Joe,
    If there is inconsistent Z tables between QAS and PRD, remote client copy could fail, especially when the table on PRD has longer length or more fields than the one on QAS.
    Also the source client should has no-activity during the client copy, otherwise the application data could be inconsistent. For example, some material documents are copied, but not the corresponding financial documents. (For PRD client, it could be hours between the times those tables are copied.) For database restore, it is rarely an issue.
    Best regards,
    Victor

  • JDBC MS Access--- cannot extract entry with null value with data type Meta

    I'm trying to extract a data entry with null value by using JDBC. The database is MS Access.
    The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when the data type is memo.
    Any advice will be appreciated! thanks!
    Following are the table description and JDBC code:
    test table has the following attributes:
    Field name Data Type
    name Text
    label Memo
    table contents:
    name label
    me null
    you gates
    Code:
    String query = "SELECT name, label FROM test where name like 'me' ";
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next())
    String name = rs.getString("name");
    rs.getString("val");
    String label = rs.getString("label");
    System.out.println("\t"+name+"\t"+label);
    catch (SQLException ex)
    System.out.println(ex.getSQLState());
    System.out.println(ex.getErrorCode());
    System.out.println("in sqlexception");
    output:
    C:\Temp\SEFormExtractor>java DBTest
    yet SELECT name, label FROM test
    null
    0
    in sqlexception

    The question is how to extract null entry with data type memo?Okay, what you need to do is this:
    if (rs.getString("val") == null)
      // do something
    }This way, when it's a null value, you can check it first, and then handle it how you want, rather than getting an exception.

  • Issue with Data type 'Date' in Hyperion Planning V11.1.2.2

    Hi,
    I have created members with data type date. However when I save the date, it either disappears or comes up with a random date? Has any one come across this kind of problem before?
    If so can you share the fix.
    Thanks in advance for your help.
    Cheers,
    XXX

    Hi
    This problem is linked to you not having a consistent setting for your date input type.
    So, go to application administration and set the date format to MM/DD/YYYY in application settings and display options, under current application defaults. Then after you have done this as a user go to User Preferences and display options and on the date format select the same. Or remove the Automatically detect.
    I have seen this behaviour if you have Automatically Detect on the user preferences
    Thanks
    Anthony

Maybe you are looking for

  • InDesign CS6 colors to Corel Draw 12

    I've designed a logo and stationery for a small business customer. The logo has 2 Pantone colours. The offset printed letterhead has a 7% tint for a graphic element (curved stripes) printed in Pantone #137 (orange) as a large watermark on the page. I

  • JSF & JDev error: The page cannot be displayed

    I'm trying to use JSF with JDeveloper. When I make my project no errors are reported, when I run it a browser opens up with an error. I added 'faces/' to the url and refreshed but still get same error message i.e. 'The page cannot be displayed' Here

  • Configure Sign-In Unity 7.0(2)

    I am looking for a way to configure the Sign-In function.  I am having an issue where people are being directed there and if they don't respond properly (or at all) the calls are being forwarded to an unattended mailbox.  My question is where do I go

  • Right+click brush panel problem

    I use dual monitors. Tools on one monitor, doc. on the other. When working on the doc side and I right+click to bring up the brush tool panel to quickly change brushes, size, etc. the brush tool panel opens, but on the monitor with my tools not under

  • Disk Utility Can't Repair Permissions - A different one

    I'm posting this separately from the previous thread I saw somewhere, because my situation is a little different. I did the software updates on my G4 15" Aluminum this morning: Battery thing, iTunes, QuickTime and Safari. Security Update? FUGGETTABOU