2007 May 11 4:41 PM
2007 May 11 4:44 PM
Hi,
It defines a new type within the program..
Ex..
TYPES: BEGIN OF type_material_plant,
MATNR type MATNR,
WERKS type werks_d,
END OF type_material_plant.
DATA: WA TYPE type_material_plant.
Thanks,
Naren
Hi,
It defines a new type within the program..
Ex..
TYPES: BEGIN OF type_material_plant,
MATNR type MATNR,
WERKS type werks_d,
END OF type_material_plant.
DATA: WA TYPE type_material_plant.
Thanks,
Naren
2007 May 11 4:44 PM
Hi,
It defines a new type within the program..
Ex..
TYPES: BEGIN OF type_material_plant,
MATNR type MATNR,
WERKS type werks_d,
END OF type_material_plant.
DATA: WA TYPE type_material_plant.
Thanks,
Naren
2007 May 11 4:44 PM
2007 May 11 4:53 PM
Hi,
You can use the TYPE addition of an appropriate ABAP statement to refer to these data types in any ABAP program in the system.
In ABAP programs, you can use the TYPE addition with the data type of a database table or view. You may refer to the whole structure or to individual components:
... TYPE <dbtab> ...
refers to the complex data type of the structure,
... TYPE <dbtab>-<ci> ...
refers to the elementary data type of component <ci>.
If you define a complex data type <t> as a structure using
TYPES <t> TYPE <dbtab>.
the components of the data type <t> inherit the names of the components of the database table or view, and can be addressed in the program using <t>-<ci>.
Regards,
Ferry Lianto
2007 May 12 5:55 AM
Hi Krishna,
If you use the key work types
it will create a structure for your
given fields.
For example.
Types : Begin of str,
Vbeln like anla-vbeln,
Bukrs like anla-bukrs,
end of str,
Now the above commands will
create a structure for the two fields
Data itab type table of str with header line.
This will create one internal table for your
structure with header line.
Actually when you doing some coding,
in that if u need to create an internal table
you should follow this way only.
Dont declare directly an internal table.
Hope u got.
Reward if it useful.
2007 May 12 8:44 AM
hi krishna,
TYPES are used to define structures....it does include any memory area...
it defines an internal table without header line..
Define:
TYPES : begin of TY_ITAB,
field type DBtable-field,
End of ITAB.
this will define a structure. to define an internal table use the following command.
types : TT_ITAB type table of TY_ITAB.
this will define an internal table without header line...
so when you are defining an internal table with types always define the work area for that internal table...
hope this could solve ur problem...
Regards,
Prashant
2007 May 13 6:11 AM
TYPES is used to declare a data type. Anything declared using this keyword will NOT have any memory allocated with it, just a data type will be declared. This datatype is then used to declare data objects using the keyword DATA.
Note that the use of TYPES is a must from ECC 6 onwards, to avoid EPC errors.
Reward if helpful
Regards
2007 May 13 8:45 AM
Hai, Krishna latha.
The TYPES statement introduces user-defined data types .
As with standard data types, you can use them when creating data objects and when assigning types to formal parameters and field symbols. User-defined data types are an essential component of the ABAP/4 type concept .
2007 May 14 9:02 AM
Hi
Type keyword is mainly used for grouping the different fields/variables which comes under single category like
Type : begin of itab_final,
matnr like mara-matnr,
werks like mara-werks,
end of itab_final.
if you type keyword the memory will not be allocated immeadiately instead it would be allocated during runtime.
REWARD IT PLEASE....!!!
2007 May 14 9:11 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |