2008 May 06 4:48 PM
Hi
I have the following select in a function containing in a function group.
SELECT SINGLE makt-maktx FROM makt WHERE makt-matnr = matnum.
I have declare in the topinclude Tables: makt but I still get the syntax message:
Unknown column name "MAKT-MAKTX". not determined until runtime, you cannot specify a field list.
Can anybody help
2008 May 06 4:50 PM
hi,
do this way ..
SELECT SINGLE maktx FROM makt into makt-maktx WHERE matnr = matnum.
Hi
I have the following select in a function containing in a function group.
SELECT SINGLE makt-maktx FROM makt WHERE makt-matnr = matnum.
I have declare in the topinclude Tables: makt but I still get the syntax message:
Unknown column name "MAKT-MAKTX". not determined until runtime, you cannot specify a field list.
Can anybody help
2008 May 06 4:50 PM
hi,
do this way ..
SELECT SINGLE maktx FROM makt into makt-maktx WHERE matnr = matnum.
2008 May 06 5:16 PM
Thanks it helped but why do I need an "INTO" I just wanted to select and than with an Write makt-makty display it on the screen
2008 May 06 5:20 PM
u have to populate into work area( that u define) or header of your table to display.
if u do not want to write into, write:
SELECT SINGLE *
FROM makt
WHERE matnr = matnum.
regards,
madhumitha
2008 May 06 5:20 PM
2008 May 06 5:21 PM
Hi Vahed,
Since you are selecting only single field MAKTX from MAKT table. So the value has to be placed into a variable. So is why we are using into statement. But if you want to select a record with all the fields then ...do this way ..
SELECT SINGLE * FROM makt into makt WHERE matnr = matnum. Regards,
Santosh
2008 May 06 6:50 PM
hi check this...
tables: makt .
data: begin of itab1 occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of itab1 .
select-options:s_matnr for makt-matnr.
select single matnr maktx from makt
into itab1
where matnr in s_matnr .
append itab1 .
loop at itab1 .
write:/ itab1-matnr,
itab1-maktx.
endloop.
regards,
venkat.
2008 May 06 4:51 PM
Hi,
Try this way :
SELECT SINGLE maktx FROM makt WHERE matnr = matnum.
Regards,
Nicolas
2008 May 06 4:54 PM
hye vahed,
It is not advisable using Tables statement. It is obselete now.
Follow the below sequence.
data: wa type makt.
SELECT SINGLE wa-maktx FROM makt WHERE makt-matnr = matnum.
...
Hope this helps, reward if helpful.
Thanks,
Imran.
2008 May 06 4:56 PM
sorry,
I have written the above postly wrongly.
data: wa type makt.
SELECT SINGLE maktx
into wa-maktx
FROM makt
WHERE makt-matnr = matnum.
Thanks,
Imran.