‎2005 Sep 06 6:22 AM
Hi Friends,
My requirement is i have to fetch data from qasr table based on some condition .
when i tried to exexute the report the data is fetched wrongly.
eg :
select x into itab-x frm qasr where y = y.
The qasr table contains only value 1,2,3,4 and 5.
but when i executed the query the value retrived was 6,7,8,9,0 which is not there in the table
i tried with all the logic. This is related to QM
kindly suggest me a solution.
Regards
Yamini.A
‎2005 Sep 06 6:25 AM
Yamini,
This is going to sound silly, but check the contents of QASR via SE16. Do you only see 1, 2, 3, 4, 5?
Also could you please paste your select query so we can see what you are doing?
Thanks,
Pat
‎2005 Sep 06 6:38 AM
Hi,
I have declared my iternal table .sorry the retival should be frm qase table.
My query for retrival of data is
SELECT SINGLE
kurztext steuerkz
INTO (itab2-kurztext,itab2-steuerkz)
FROM qamv
WHERE prueflos = prueflos AND qpmk_werks = werk AND merknr = itab2-merknr.
if itab2-steuerkz8(1) Eq ''.
MOVE itab-probenr TO itab2-probenr.
SELECT SINGLE
original_input
INTO itab2-original_input1
FROM qase
WHERE merknr = itab2-merknr AND
probenr = itab2-probenr AND
detailerg = 1 AND
stuecknr = 1.
SELECT SINGLE
original_input
INTO itab2-original_input2
FROM qase
WHERE merknr = itab2-merknr AND
probenr = itab2-probenr AND
detailerg = 2 AND
stuecknr = 2.
so on....
when i checked with qase table the value of orginal_input was like 1,2,3,4,5
but when i executed the query the value retrived was 6,7,8,9,0
i donno why it is retriving so
Kindly help.
Regards
Yamini.A
‎2005 Sep 06 6:48 AM
Yamini,
Humm it looks ok in principle...try putting break points before each select and then as you single step through the program keep an eye on the contents of itab2-original_input1, itab2-original_input2, etc...
It doesn't look like that there are any conversion routine errors...
Let us know how the debugging goes.
Cheers,
Pat.
‎2005 Sep 06 8:14 AM
‎2005 Sep 06 6:40 AM
Hi,
In the where condition what are fields you're using and check the field has any conversion exit.
Cheeres,
Sasi
‎2005 Sep 06 7:21 AM
hi,
Check all the field types which is corrctly defined or not. for ex instead of numc may be defined as integer like that.
Cheers,
Sasi
‎2005 Sep 06 7:57 AM
Hi Friends,
I have tried debugging also. My declaration of internal table is similar to the the table field. even then i am facing this problem.
Regards
Yamini.A
‎2005 Sep 06 8:11 AM
Hi,
check whether your select single statement fetches exact one record.
for example your where conditon fetches more than one record, then the output will be any one of the record. If this is a problem you add all the key fields in the where condition else remove the select single and use into table for all entries.
Cheers,
Sasi