4 ways of declaring structures in sap abap
* 1 structure declared locally
types: begin of st_flightinfo,carrid type s_carr_id,
connid type s_conn_id,
fldate TYPE s_date,
seatsmax TYPE sflight-seatsmax,
seatsocc TYPE sflight-seatsocc,
percentage(3) TYPE p decimals 2,
end of st_flightinfo.
DATA ls_flightinfo TYPE st_flightinfo.
* 2 structure referring dictionary transparent table
DATA ls_spfli type spfli.
* 3 structure_declared_usind_dictionary_structure
DATA ls_spfli_2 type spfli_t.
*4 type + data
data: begin of ls_flightinfo_2,
carrid type s_carr_id,
connid type s_conn_id,
fldate TYPE s_date,
seatsmax TYPE sflight-seatsmax,
seatsocc TYPE sflight-seatsocc,
percentage(3) TYPE p decimals 2,
end of ls_flightinfo_2.
carrid type s_carr_id,
connid type s_conn_id,
fldate TYPE s_date,
seatsmax TYPE sflight-seatsmax,
seatsocc TYPE sflight-seatsocc,
percentage(3) TYPE p decimals 2,
end of ls_flightinfo_2.
Comments
Post a Comment