‎2006 Dec 27 9:06 AM
Hi Friends,
How to select multiple fields in a select statement.
Eg. Fields A, B, C, D.
I tried the following, it is not working.
Select A B C D
INTO A1 B1 C1 D1
FROM XYZ.
Kindly guide me.
TIA.
Regards,
Mark K
‎2006 Dec 27 9:07 AM
Select A B C D
INTO(A1, B1, C1, D1)FROM XYZ.)---->remember no space b/w '(' and A1.
kishan negi
‎2006 Dec 27 9:07 AM
Select A B C D
INTO(A1, B1, C1, D1)FROM XYZ.)---->remember no space b/w '(' and A1.
kishan negi
‎2006 Dec 27 9:07 AM
Select A B C D
INTO (A1, B1, C1, D1)
FROM XYZ.
regards
shiba dutta
‎2006 Dec 27 9:08 AM
Hi
You have to provide here where condition .
try using this
Select A B C D
INTO ( A1,B1,C1,D1 )
FROM XYZ.
where a eq cond1.
Regards
Ashutosh
Reward points if helpful
Message was edited by:
ashutosh ambekar
‎2006 Dec 27 9:09 AM
Hai
tables : xyz.
data : a1 type xyz-a,
b1 type xyz-b,
c1 type xyz-c,
d1 type xyz-d.
Select A B C D
INTO ( A1, B1, C1, D1 )
FROM XYZ.
Regards
Sreeni
Regards
Sreeni
‎2006 Dec 27 9:15 AM
Hai Check the sample Code
tables : mara.
data : v_matnr type mara-matnr,
v_mtart type mara-mtart,
v_mbrsh type mara-mbrsh,
v_meins type mara-meins.
select
matnr
mtart
mbrsh
meins
into (v_matnr,
v_mtart,
v_mbrsh,
v_meins)
from mara up to 1 rows.
endselect.
Regards
Srini
‎2006 Dec 27 9:09 AM
KEEP A1 B1 C1 D1 IN AN ITAB. AND USE:
select a1 b1 c1 d1 from xyz into table itab.
Cheers.
‎2006 Dec 27 9:11 AM
Hi,
Your question is not clear.
if your fields A,B,C,D are there in some database tables say XMARK.and you are fetching these fields into an internal table say itab created during run time..
you can fetch like this...
select A B C D from XMARK into corresponding fields of table itab.
to display it :
loop at itab.
write: / itab-A,itab-B,itab-C,itab-D.
endloop.
rgrds,
pankaj
‎2006 Dec 27 9:12 AM
Hi,
data : begin of itab occurs 0,
a type xyz-a,
b type xyz-b,
c type xyz-c,
d type xyx-d,
end of itab.
select a b c d from xyz into table itab.
The above stateemnt will fetch multiple rows and multiple columns.If you need to fetch the values in a variable,use
select a b c d from xyx into (a1, b1, c1, d1) up to 1 rows.
‎2006 Dec 27 9:13 AM
Hi,
Declare like this
data : wa type XYZ.
Select A B C D
INTO corresponding fields of wa
FROM XYZ.
Thanks,
Sutapa