‎2007 Jun 20 6:30 AM
DATA: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
TYPES: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
TABELS: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
‎2007 Jun 20 6:34 AM
Hi,
1)
DATA: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Declares a work area where you can have values in the work area in the run time..
2)
TYPES: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Declares a type where you can use in a work area..But you cannot have values in the TYPES in the run time.
3)
TABELS: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
I believe this is not possible.
Thanks,
naren
‎2007 Jun 20 6:34 AM
Hi,
1)
DATA: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Declares a work area where you can have values in the work area in the run time..
2)
TYPES: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Declares a type where you can use in a work area..But you cannot have values in the TYPES in the run time.
3)
TABELS: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
I believe this is not possible.
Thanks,
naren
‎2007 Jun 20 6:36 AM
Hi,
1)DATA: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
With DATA you are actually declaring the Variables with or without referencing the TYPES.DATA statements allocate the memory at runtime.
2)TYPES: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
With TYPES you are defining the data types that can be used by other variables/itabs in the program.TYPES statement defines the structure without allocation of memory.
3)TABELS: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
U can't use tables for defining a work area.
Regards,
Padmam.
‎2007 Jun 20 6:38 AM
Hi,
1. TYPES statement defines the structure without allocation of memory, DATA statements allocate the memory at runtime.
2. Create a structure by using types statement and refer it by using the DATA statement.
3. In order to avoid the internal table declaration without header line, we are declaring a structure by types statemnet and declaring an internal table with reference to the structure.
Table Type is one of the DATA TYPES which we create and reference to this datatype
<b>Reward points</b>
Regards
‎2007 Jun 20 6:39 AM
Hi,
DATA: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
U can now use wa_spfli as a work area.(ie) a structure.
TYPES: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Here u have defined a data type.. so u cannot use wa_spfli as it is as a structure..
u can define str n tables using this data type..
eg. data str type wa_spfli ...............(define structure of that type)
data itab type table of wa_spfli .............(define internal table using the tupe defenition)
TABELS: BEGIN OF wa_spfli,
carrid TYPE spfli-carrid,
END OF wa_spfli.
Ucannot use tables like this..
Syntax is ..
Tables <database table>.
This will create a workarea(structure) of the same type as the database table
also it will have the same name at the dbtab.
Regards,
Aparna