10-29-2007 5:11 PM
Hi,
I have defined ranges table...
if ( not date_from is initial and not date_to is initial ).
wa_daterange-sign = 'I'.
wa_daterange-option = 'BT'.
wa_daterange-low = date_from.
wa_daterange-high = date_to.
APPEND wa_daterange TO r_daterange.
elseif ( not date_from is initial and date_to is initial ).
wa_daterange-sign = 'I'.
wa_daterange-option = 'EQ'.
wa_daterange-low = date_from.
APPEND wa_daterange TO r_daterange.
endif.
My select statement is
select avbeln bposnr
into table t_likp
from likp as a
inner join lips as b
on avbeln = bvbeln
where a~vbeln = DELIVERY_NO.
and a~erdat in r_daterange
and a~kunag = PARTNER_NUMBER
and b~matnr in r_matnrrange.
in the debug mode, when i see table t_likp,it is initial..but there are values for the delivery number,vendor,and date....
any one please correct me where i went wrong...
Thanks,
Challa.
10-29-2007 5:19 PM
Bhaskar,
Can you tell me what you have appened in r_matnrrange which you have used in your select query?
I think this could be a problem.
<b><REMOVED BY MODERATOR></b>
Satish
Message was edited by:
Alvaro Tejada Galindo
10-29-2007 5:18 PM
are there items on lips for the deliveries.
Run the SQL and comment out the conditions except for the devliery number. Then uncomment each one to see which is causing the problem.
10-29-2007 5:19 PM
Bhaskar,
Can you tell me what you have appened in r_matnrrange which you have used in your select query?
I think this could be a problem.
<b><REMOVED BY MODERATOR></b>
Satish
Message was edited by:
Alvaro Tejada Galindo
10-29-2007 5:22 PM
select avbeln bposnr
into table t_likp
from likp as a
inner join lips as b
<b>on bvbeln = avbeln</b> "u have to check the lips vbeln<b> to likp vbeln[a]"
where a~vbeln = DELIVERY_NO.
and a~erdat in r_daterange
and a~kunag = PARTNER_NUMBER
and b~matnr in r_matnrrange.
10-29-2007 5:23 PM
Hi challa,
Try to do one thing.
Put a break point at your select statement. try to observe the values which are coming there.. and go to the respective tables and give the same selection crieteria, you would know whether you are getting exact records or not.
I would suggest you to go for individual selects than a join there.
Use for all entries rather than inner join.
Thanks,
Sreekanth