‎2006 Jan 14 12:59 PM
hi,
i need to select 6 fields into some global variable,
what is the syntax for that.
‎2006 Jan 14 1:02 PM
HI,
Use the following satetments..
data: w_field1 type dbtab-field1,
w_field2 type dbtab-field2,
w_field3 type dbtab-field3.
select field1 field2 field3 from dbtab
into (w_field1,w_field2,w_field3)
where (your conditions).
endselect.
regards,
Suresh Datti
‎2006 Jan 14 1:02 PM
HI,
Use the following satetments..
data: w_field1 type dbtab-field1,
w_field2 type dbtab-field2,
w_field3 type dbtab-field3.
select field1 field2 field3 from dbtab
into (w_field1,w_field2,w_field3)
where (your conditions).
endselect.
regards,
Suresh Datti
‎2006 Jan 14 1:06 PM
u can do like this
data : begin of itab occurs 0,
fld1 type ztab-fld1,
fld2 type ztab-fld2,
fld3 type ztab-fld3,
fld4 type ztab-fld4,
fld5 type ztab-fld5,
fld6 type ztab-fld6,
end of itab.
data :workarea like itab.
select single fld1
fld2
fld3
fld4
fld5
fld6
from ztab
into workarea.
CONCATENATE workarea-fld1 workarea-fld2 workarea-fld3 workarea-fld4 workarea-fld5 workarea-fld6 into global variable
pls award points and close if ur problem is solved
Message was edited by: chandrasekhar jagarlamudi
‎2006 Jan 14 1:16 PM
Hi,
SELECT SINGLE bukrs butxt INTO (t001-bukrs, t001-butxt)
FROM t001
WHERE bukrs = '0001'.
Cheers
JK
‎2006 Jan 14 2:07 PM
Hi Anitha,
Have a look at demo programs
DEMO_SELECT_SINGLE
DEMO_SELECT_SINGLE_FIELDS
DEMO_SELECT_SOME_COLUMNS
DEMO_SELECT_ALL_COLUMNS
Hope this helps.
Thanks
Lakshman
‎2006 Jan 14 4:51 PM
Hi Anitha,
You can select to the global variables or you can select into the table & move then accordingly.
select value1 value2 value3 value4 value5 value6
from <dbtab>
into ( dbtab-value1, dbtab-value2, dbtab-value3, dbtab-value4, dbtab-value5, dbtab-value6 )
where ....
<b>OR</b>
declare the fields as the database table fields...
select value1 value2 value3 value4 value5 value6
from <dbtab>
into ( v_value1, v_value2, v_value3, v_value4, v_value5, v_value6 )
where ....