Você está na página 1de 2

TYPES - TYPE, LIKE Syntax TYPES dtype { {TYPE [LINE OF] type} | {LIKE [LINE OF] dobj} }.

Addition: ... LINE OF ... Effect: If a data type type or a data object dobj is specified, dtype assumes all the pr operties of the specified data type or data object. type can be a non-generic ty pe from the ABAP Dictionary, to which in particular the structure of a database tab le also belongs, or it can be a public type of a global class or a non-generic d ata type of the same program that has already been defined by TYPES. dobj can be a d ata object visible at this point that has already been declared. Within a proced ure, generically typed formal parameters cannot be specified for dobj. If a reference is made to a data type in the ABAP Dictionary, its primary compon ents are converted to predefined ABAP types according to the table of predefined types in the ABAP Dictionary. Note The data objects that you can reference with LIKE include the public attributes of global classes, as well as the data objects of the program itself. Addition ... LINE OF ... The optional addition LINE OF can be used if type is a table type or if dobj is an internal table. If this addition is used, dtype inherits the properties of th e line type of the internal table. Example: These TYPES statements define two data types local to the program. The first cop ies a table type from a type group of the ABAP Dictionary, and the second corres ponds to the line type of this table type. TYPE-POOLS cntl. DATA: event_table TYPE cntl_simple_events, event LIKE LINE OF event_table.

Você também pode gostar