‎2008 Mar 11 10:43 AM
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?
‎2008 Mar 11 10:59 AM
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.
‎2008 Mar 11 10:49 AM
Comment out the condition
loop at t_join where field1(1) = 'I'
append t_join into m_join.
endloop.
reward points if helpful
‎2008 Mar 11 10:53 AM
instead of
jest~stat LIKE 'I*'
use
jest~stat CP 'I*'
or this can be acheived using ranges also
‎2008 Mar 11 10:59 AM
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.
‎2008 Mar 11 11:11 AM
‎2008 Mar 11 11:18 AM
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'.
‎2008 Mar 11 11:32 AM
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