‎2006 Nov 02 9:33 PM
hi folks,
I having a problem with the query.
data g_eeamt(9) type c,
g_eepct(4) type c.
select eeamt eepct from pa0169 into g_eeamt g_eepct where pa0169-bplan = 'RT04' and begda le pybegda and endda ge pyendda.
what is the problem here?
Thanks
Vinu
‎2006 Nov 02 9:37 PM
Hi,
Try this..
select eeamt eepct from pa0169 into <b>(g_eeamt,g_eepct)</b> where pa0169-bplan = 'RT04' and begda le pybegda and endda ge pyendda.
Thanks,
Naren
‎2006 Nov 02 9:39 PM
‎2006 Nov 02 9:41 PM
I see, it doesn't compile. Try:
DATA: g_eeamt(9) TYPE c,
g_eepct(4) type c.
SELECT eeamt eepct
FROM pa0169
INTO (g_eeamt, g_eepct)
WHERE bplan = 'RT04'
AND begda LE pybegda
AND endda GE pyendda.
endselect.
Rob
There were still some problems, but s/b OK now
Message was edited by: Rob Burbank
‎2006 Nov 02 11:23 PM
Yep, I having some problems in the query
select eeamt eepct from pa0169 into (g_eeamt, g_eepct) where bplan = 'RT04' and begda le pybegda and endda ge pyendda.
endselect.
because eeamt (dec) and eepct (Curr) where as the variables are char type.
How can i do that?
Thanks
Vinu
‎2006 Nov 02 11:24 PM
Hi,
Modiy the variables g_eeamt, g_eepct of the same type of the fields that you are selecting..
THanks,
Naren
‎2006 Nov 02 11:28 PM
Ultimately I need to have them, stored as char variables for further validation.
‎2006 Nov 02 11:46 PM
Hi,
Declare the variables like this..
DATA: g_eeamt_char(17) TYPE c,
g_eepct_char(6) type c.
DATA: g_eeamt like pa0169-eeamt.
DATA: g_eepct like pa0169-eepct.
SELECT eeamt eepct
FROM pa0169
INTO (g_eeamt, g_eepct)
WHERE bplan = 'RT04'
AND begda LE pybegda
AND endda GE pyendda.
ENDSELECT.
g_eeamt_char = g_eeamt.
g_eepct_char = g_eepct.
Thanks,
Naren
Message was edited by: Narendran Muthukumaran