i have a basic abap query.
In a an interface function module I declared one field
v1 like some table field,
v2 type some dataelement,
technically and functionally what is the difference between these two declarations.
thanks in advance,
Jay Tripathy replied
YOU HAVE NOT CLEARLY MENTIONED YOUR QUERY
ANYWAY,I THINK YOU WANT TO KNOW THE DIFFERENCE BETWEEN LIKE AND TYPE STATEMENT.
LIKE->The LIKE Addition
You use the LIKE addition, similarly to the TYP E addition , in various ABAP statements for defining data types and specifying the types of interface parameters or field symbols. The addition
can be used in the same ABAP statements as the TYPE addition to refer to any data object <obj> that is already visible at that point in the program. The expression <obj> is either the name of the data object or the expression
LINE OF <table-object>
In this case, the LIKE addition describes the line type of a table object that is visible at that point in the program.
You use LIKE to make the new object or type inherit the technical attributes of an existing data object
TYPE STATEMENT ->
The introductory statement TYPE-POOL can only be used for type groups (type T programs). A program introduced with the TYPE-POOL statement can only contain global type definitions and constants declarations. The CLASS-POOL statement is generated automatically where required by the ABAP Dictionary - you should not insert it into programs manually.
These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.
Examples of declarative keywords:
TYPES, DATA, TABLES