12-08-2006 1:08 AM
hii frnds ,
when i am executingthis select statement theni am getint this sort of syntax error ,
The list "(T_AUFNR" after "INTO" is not of the form (f1, ...,fn), or contains an undefined field. excludes specification of a field list.
the select statement is
SELECT SINGLE
AUFNR
PRIOK
EQUNR
ILOAN
GEWRK
WARPL
LAUFN
INTO (T_AUFNR,T_PRIOK,T_EQUNR,T_ILOAN,T_GEWRK,T_WARPL,T_LAUFN)
FROM AFIH WHERE AUFNR = S_AUFNR .
12-08-2006 1:38 AM
Usually I would do it like this.
report zrich_0001.
data: begin of xafih,
aufnr type afih-aufnr,
priok type afih-priok,
equnr type afih-equnr,
iloan type afih-iloan,
gewrk type afih-gewrk,
warpl type afih-warpl,
laufn type afih-laufn,
end of xafih.
select-options: s_aufnr for xafih-aufnr.
select single aufnr priok equnr
iloan gewrk warpl laufn
into xafih
from afih
where aufnr = s_aufnr .
Regards
Rich Heilman
12-08-2006 1:11 AM
12-08-2006 1:16 AM
hii rich ,
its still notworking i am getting the same error now also ...
kindly provide some other solution ..
regards
rohit
12-08-2006 1:29 AM
Rohit,
Are you sure T_AUFNR, T_PRIOK, T_EQUNR, T_ILOAN, T_GEWRK, T_WARPL, T_LAUFN, are variables that you have declared explicitly.
To me it sounds like these are columns of a table. If that is the case then it should ITAB-AUFNR.
Either Make sure these are individual variables declared
Or replace with the names of the columns along with the workarea.
An easier way could be
DATA : WA_ORDER TYPE AFIH .
SELECT .... into corresponding fields of WA_ORDER ....
Regards,
Ravi
Note - Please mark all the helpful answers
12-08-2006 1:35 AM
well, this is syntaxically correct, it does have spaces after the comma and each field is defined. This isn't usually how I would do it, but it does work.
report zrich_0001.
data: t_aufnr type afih-aufnr,
t_priok type afih-priok,
t_equnr type afih-equnr,
t_iloan type afih-iloan,
t_gewrk type afih-gewrk,
t_warpl type afih-warpl,
t_laufn type afih-laufn.
select-options: s_aufnr for t_aufnr.
select single
aufnr
priok
equnr
iloan
gewrk
warpl
laufn
into (t_aufnr, t_priok, t_equnr, t_iloan, t_gewrk, t_warpl, t_laufn)
from afih where aufnr = s_aufnr .
Regards,
RIch Heilman
12-08-2006 1:31 AM
Hi Rohit,
Please try this.
SELECT SINGLE
AUFNR
PRIOK
EQUNR
ILOAN
GEWRK
WARPL
LAUFN
INTO (AFIH-AUFNR, AFIH-PRIOK, AFIH-EQUNR, AFIH-ILOAN, AFIH-GEWRK, AFIH-WARPL, AFIH-LAUFN)
FROM AFIH WHERE AUFNR = S_AUFNR.
IF SY-SUBRC = 0
T_AUFNR = AFIH-AUFNR.
T_PRIOK = AFIH-PRIOK.
T_EQUNR = AFIH-EQUNR.
T_ILOAN = AFIH-ILOAN.
T_GEWRK = AFIH-GEWRK.
T_WARPL = AFIH-WARPL.
T_LAUFN = AFIH-LAUFN.
ENDIF.
Regards,
Ferry Lianto
12-08-2006 1:32 AM
12-08-2006 1:38 AM
Usually I would do it like this.
report zrich_0001.
data: begin of xafih,
aufnr type afih-aufnr,
priok type afih-priok,
equnr type afih-equnr,
iloan type afih-iloan,
gewrk type afih-gewrk,
warpl type afih-warpl,
laufn type afih-laufn,
end of xafih.
select-options: s_aufnr for xafih-aufnr.
select single aufnr priok equnr
iloan gewrk warpl laufn
into xafih
from afih
where aufnr = s_aufnr .
Regards
Rich Heilman