2011 Feb 17 7:54 AM
Hi,
Below is my select Query, Im not understanding y im not getting data into v_QUOTNO
, can any one suggest me plz, i have written this codei n LSMW , VK12ss is a source strucure
select single b~QUOTNO into v_QUOTNO
from A601 as a inner join OICQ6 as b on a~KNUMH = b~KNUMH
where VKORG = VK12SS-VKORG
and VTWEG = VK12SS-VTWEG
and SPART = VK12SS-SPART
and OICONTNR = VK12SS-OICONTNR
and MATNR = VK12SS-MATNR
and QUOTNO = VK12SS-QUOTNO
and DATAB = VK12SS-DATAM.
2011 Feb 17 8:51 AM
Hi,
I suspect the last condition of the where clause (DATAB). You are passing = operator. Ideally we check for LE. Can try to comment this condition and see? Also, did you verify the tables if it actually has the data or not for the given values in the where clause?
select single b~QUOTNO into v_QUOTNO
from A601 as a inner join OICQ6 as b on a~KNUMH = b~KNUMH
where VKORG = VK12SS-VKORG
and VTWEG = VK12SS-VTWEG
and SPART = VK12SS-SPART
and OICONTNR = VK12SS-OICONTNR
and MATNR = VK12SS-MATNR
and QUOTNO = VK12SS-QUOTNO.
"and DATAB = VK12SS-DATAM.
Thanks,
Vinod.
2011 Feb 17 8:16 AM
Wild guess. In where clause please ensure you are addressing components together with table aliases either a~ or b~
where a~VKORG = VK12SS-VKORG
and a~VTWEG = VK12SS-VTWEG
and a~SPART = VK12SS-SPART
and a~OICONTNR = VK12SS-OICONTNR
and a~MATNR = VK12SS-MATNR
and a~QUOTNO = VK12SS-QUOTNO
and a~DATAB = VK12SS-DATAM.
Regards
Marcin
2011 Feb 17 8:44 AM
hi
thankx for the reply,
I tried with this still im getting same problm
can u plz help
2011 Feb 17 8:47 AM
So this might be a data issue (not data for such join). The only option I see is to check manually in SE16N both tables against one record values from your LSMW file.
Regards
Marcin
2011 Feb 17 8:51 AM
Hi,
I suspect the last condition of the where clause (DATAB). You are passing = operator. Ideally we check for LE. Can try to comment this condition and see? Also, did you verify the tables if it actually has the data or not for the given values in the where clause?
select single b~QUOTNO into v_QUOTNO
from A601 as a inner join OICQ6 as b on a~KNUMH = b~KNUMH
where VKORG = VK12SS-VKORG
and VTWEG = VK12SS-VTWEG
and SPART = VK12SS-SPART
and OICONTNR = VK12SS-OICONTNR
and MATNR = VK12SS-MATNR
and QUOTNO = VK12SS-QUOTNO.
"and DATAB = VK12SS-DATAM.
Thanks,
Vinod.
2011 Feb 17 9:00 AM
hi
i have data in table ....i dont know wt im doing wrong .....
i checked by commenting DATAB value also same issue im facing
2011 Feb 17 9:04 AM
Hi,
Make sure you pass the leading zeros in all required fields like MATNR.
Just keep commenting the conditions one by one and see which field is making the difference.
Thanks,
Vinod.