Skip to Content
author's profile photo Former Member
Former Member

LITTLE QUE OF ABAP

What is difference between

" any internal table TYPE STANDARD TABLE OF any data dictionary table INTIAL SIZE 0 WITH HEADER LINE "

and

any internal table LIKE any dictionary table OCCURS 0 WITH HEADER LINE.

Thanks...

Nirav Parekh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2007 at 06:24 AM

    Hi Nirav,

    Diff bn TYPE N LIKE.

    Go through the link.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm

    Regards,

    Priyanka.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 05, 2007 at 06:25 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2007 at 06:27 AM

    hi,

    Acc to me the difference lies in Type & LIKE .. when u define any variable like to another variable it inherits all the search helps and documention of the variable u have declared.

    for ex: suppose u declare a variable p_matnr Like mara-matnr.. then p_matnr will have all the properties like search help asociated with mara-matnr to itself... this is some times useeful and some times ..not .., so u should always use it with caution.

    • reward points if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2007 at 06:30 AM

    hi,

    chk this

    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3646358411d1829f0000e829fbfe/content.htm

    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

    regards,

    keerthi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 05, 2007 at 06:30 AM

    Hi,

    We uses the TYPES concept from 4.7 version onwards a lot.

    In the previous versions we uses LIKE .

    When you declare

    DAT Itab like KNA1 occurs o with header line,

    we are considering the complete fields of the db table in your internal table, which we may not use all fields.

    Where as in other case. first we define with few fields with TYPES and we declare an ITAB with that TYPES and TYPE STANDARD TABLE OF any data dictionary table INTIAL SIZE 0 WITH HEADER LINE .

    We use this type of declarations in ECC versions of ABAP a lot.

    Regards,

    Anji

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.