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

TYPE and LIKE

what is the difference between the key words 'TYPE' and 'LIKE', In wht scenarios we can we use them, and in what r the scenarios we cant use these.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 04:33 AM

    hi,

    TYPE addition:

    With TYPE addition, you can refer either to local data types of the

    same ABAP program or on global data types of the Dictionaries.

    Local types mask global types that have the same names. When typing

    the interface parameters or field symbols, a reference is also

    possible to generic types ANY, ANY TABLE,INDEX TABLE, TABLE or

    STANDARD TABLE, SORTED TABLE and HASHED TABLE.

    LIKE addition:

    With the LIKE addition, you can refer to all visible data objects

    at the ABAP program's positon in question. Only the declaration of

    the data object must be known. In this case it is totally

    irrelevant whether the data object already exists physically in

    memory during the LIKE reference. Local data objects mask global

    data objects that have the same name.

    Sri

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2007 at 04:18 AM

    Hi,

    Check this Link

    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.