12-14-2007 12:11 PM
Hi everybody,
I have to get only three fields form a Ztable and pass them to an internal table(which is of type another Ztable)
Field names are different in the Ztable and the internal table
Please give me the SELECT ststement
Thanks in advance
12-14-2007 12:13 PM
hi,
Rajani
do neccasary data declarations
select f1 f2 f3
from ztable1
into (v1, v2, v3)
ztable2-f1 = v1.
ztable2-f2 = v2.
ztable2-f3 = v3.
append ztable2.
endselect.
<b><removed_by_moderator></b>
feel free to ask any quieries my mail id is
<b><removed_by_moderator></b>
12-14-2007 12:13 PM
hi,
Rajani
do neccasary data declarations
select f1 f2 f3
from ztable1
into (v1, v2, v3)
ztable2-f1 = v1.
ztable2-f2 = v2.
ztable2-f3 = v3.
append ztable2.
endselect.
<b><removed_by_moderator></b>
feel free to ask any quieries my mail id is
<b><removed_by_moderator></b>
12-14-2007 12:13 PM
Hi,
Declare internal table first
data : itab1 like ztable occurs 0 with header line.
select f1 f2 f3 from ztable into table itab1.
loop at itab1.
itab2-f1 = itab1-f1.
itab2-f2 = itab1-f2.
itab2-f3 = itab1-f3.
append itab2.
Endloop.
Regards,
Prashant
12-14-2007 12:14 PM
select fld1 fld2 fld3 from table into (itab-f1, itab-f2, itab-f3) where <condtion>.
append itab.
endselect.
12-14-2007 12:15 PM
Try this..
SELECT f1 as itab-f1 f2 as itab-f2 f3 as itab-f3
INTO CORRESPONDING FIELDS OF TBALE itab FROM <dbtab>
WHERE <COND>.
12-14-2007 12:17 PM
hi ,
DATA: ITAB OCCURS 10,
FIELD 1 TYPE ZTABLE-FIELD1,
FIELD 2 TYPE ZTABLE-FIELD2,
FIELD 3 TYPE ZTABLE-FIELD3.
SELECT FIELD1
FIELD2
FIELD3
FROM ZTABLE INTO CORRESPONDING FIELDS OF TABLE ITAB.
12-14-2007 12:57 PM