Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

inner join

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

sreemsft
Contributor
0 Kudos

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