Application Development and Automation 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: 
Read only

Inner Join Problem

Former Member
0 Likes
361

Can anyone help me out?

I have a select query as below using inner join.

When all ranges are empty, it works fine.

When RA_SELOPT_GBDAT is filled, it works fine.

However if any other range is filled individually, select query fails.

=======================

SELECT T1~PERNR

T1~NACHN

T1~VORNA

T1~MIDNM

T1~GBDAT

T2~USRID

FROM PA0002 AS T1 INNER JOIN PA0105 AS T2

ON T1PERNR = T2PERNR

INTO TABLE IT_PA0002

WHERE

T1~NCHMC IN RA_SELOPT_NCHMC

AND T1~VNAMC IN RA_SELOPT_VNAMC

AND T1~MIDNM IN RA_SELOPT_MIDNM

AND T1~GBDAT IN RA_SELOPT_GBDAT

AND T2~USRTY IN RA_SELOPT_USRID.

=======================

Please let me know. Would reward for useful answer.

thanks

2 REPLIES 2
Read only

Sm1tje
Active Contributor
0 Likes
333

Probably the only thing which can cause this is the fact that for that particular value in your select options, there really are NO values in that particular table. So first make sure that values are available by checking this table in SE16.

Read only

Former Member
0 Likes
333

hi,

you have use 'AND' in where condition . So to get values all ur conditon must meet.