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

WHERE Condition problem

Former Member
0 Likes
955

Hello I am trying to do this inner join:

SELECT prpspspnr prpsimprf prpsobjnr jeststat jest~inact

tj02ttxt04 tj02tspras

INTO TABLE t_join FROM prps

INNER JOIN jest ON prpsobjnr = jestobjnr

INNER JOIN tj02t ON jeststat = tj02tistat

FOR ALL entries IN t_anla

WHERE prps~pspnr = t_anla-posnr

AND jest~stat LIKE 'I*'

AND jest~inact = inact

AND tj02t~spras = 'P'.

but it returns nothing, unless i comment this condition:

AND jest~stat LIKE 'I*'

There are records starting with I...

Any sugestions?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
728

hi check this , may be ur order is in correct this is good i think..

SELECT prps~pspnr

prps~imprf

prps~objnr

jest~stat

jest~inact

tj02t~txt04

tj02t~spras

FROM

( ( prps INNER JOIN jest ON prpsobjnr = jestobjnr )

INNER JOIN tj02t ON jeststat = tj02tistat )

INTO TABLE t_join

FOR ALL entries IN t_anla

WHERE prps~pspnr = t_anla-posnr

AND jest~stat LIKE 'I*'

AND jest~inact = inact

AND tj02t~spras = 'P'.

regards,

venkat.

6 REPLIES 6
Read only

Former Member
0 Likes
728

Comment out the condition


loop at t_join where field1(1) = 'I'
  append t_join into m_join.
endloop.

reward points if helpful

Read only

prabhu_s2
Active Contributor
0 Likes
728

instead of


jest~stat LIKE 'I*'

use


jest~stat CP  'I*'

or this can be acheived using ranges also

Read only

Former Member
0 Likes
729

hi check this , may be ur order is in correct this is good i think..

SELECT prps~pspnr

prps~imprf

prps~objnr

jest~stat

jest~inact

tj02t~txt04

tj02t~spras

FROM

( ( prps INNER JOIN jest ON prpsobjnr = jestobjnr )

INNER JOIN tj02t ON jeststat = tj02tistat )

INTO TABLE t_join

FOR ALL entries IN t_anla

WHERE prps~pspnr = t_anla-posnr

AND jest~stat LIKE 'I*'

AND jest~inact = inact

AND tj02t~spras = 'P'.

regards,

venkat.

Read only

0 Likes
728

not use

jest~stat LIKE 'I*'

but

jest~stat LIKE 'I%'

Read only

Former Member
0 Likes
728

SELECT prpspspnr prpsimprf prpsobjnr jeststat jest~inact

tj02ttxt04 tj02tspras

INTO TABLE t_join FROM prps

INNER JOIN jest ON prpsobjnr = jestobjnr

INNER JOIN tj02t ON jeststat = tj02tistat

FOR ALL entries IN t_anla

WHERE prps~pspnr = t_anla-posnr

AND jest~stat LIKE 'I%' <-- Change here

AND jest~inact = inact

AND tj02t~spras = 'P'.

Read only

Former Member
0 Likes
728

jest~stat LIKE 'I*' in place of this just keep

jest~stat CP 'I*'.

EX : I0091

CP : Contains Pattern

OR use offset , this will solve ur problem