Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem is select/inner join

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.

Former Member
replied

The query seems to be correct.

what you can do is, goto LIKP and select any entry.

Get the VBELN, KUNAG and the ERDAT.

Also check that for the selected VBELN, corresponding entry exists in the table LIPS.

Then pass the same information to your program.

If the data is coming in the internal table, then the query is fine.

One more thing you can check is the Dealer Number might not be appended with Zero's in the start.

You can use the CONVERSION ROUTINE To convert the dealer number and then you can check the query.

Regards

Abhishek

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question