join table / program
REPORT ZJOINING_TABLES.
TYPES : begin of ty_spfli_scarr,
carrid type spfli-carrid,
connid type spfli-connid,
cityfrom type spfli-cityfrom,
carrname type scarr-carrname,
end of ty_spfli_scarr.
data: lt_join TYPE TABLE OF ty_spfli_scarr,
wa_join LIKE LINE OF lt_join.
select * from spfli as sp
join scarr as sc
on sp~carrid = sc~carrid
into CORRESPONDING FIELDS OF table lt_join.
loop at lt_join into wa_join.
new-line.
write:
wa_join-carrid,
wa_join-connid,
wa_join-cityfrom,
wa_join-carrname.
endloop.
Comments
Post a Comment