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: 

No fields from the right-hand table of a left outer join ...where condition : "ZPP_T004~CRDAT"

0 Kudos

Hi friends,

I couldn't use left outer join both where clause. I need filtering  so where clause using 'IN'. IF I use 'IN' , I get an error title.

I have examined the question asked earlier but not  solving.

How to use left outer join together with 'IN' clause.

Thanks for your advise.


SELECT DISTINCT ZPP_T004~CRDAT AS CRDAT_1 ENAME ZPP_T004~CRUZT AS CRUZT_1 ARBPL ZPP_T004~MATNR MAKTX ZTBARKOD BARKOD ZTELCAP1 ZTELCAP

                 ZMUKAVEMET ZBURMA ZHIZ LOW HIGH ZPARTI ZSABUN ZDRESAJ ZACIKLAMA

                 ZPP_T004~AUFNR KANTAR KADET SEPET BRAGR NTAGR TEYIT ZQM_T001~CRDAT ZQM_T001~CRUZT

                 INTO CORRESPONDING FIELDS OF TABLE gt_tablo UP TO SAYI ROWS FROM ZQM_T001

                 LEFT OUTER JOIN ZPP_T004 ON  ZQM_T001~ZTBARKOD = ZPP_T004~CHARG

                 JOIN MAKT ON ZPP_T004~MATNR = MAKT~MATNR

                 JOIN AUFK ON ZPP_T004~AUFNR = AUFK~AUFNR

                 JOIN PA0001 ON ZPP_T004~PERNR = PA0001~PERNR

                 JOIN ZPP_T001 ON ZPP_T001~MKVNO = AUFK~MKVNO

                where ZTBARKOD IN TBARKOD AND ZPP_T004~CRDAT IN KKTARIH

7 REPLIES 7

Former Member
0 Kudos

Hi

Post your error.

you must use "~" in all fields in select statement and where condition also.

if not solve, post your error.

Regards,

Chandu

0 Kudos

0 Kudos

Hi

Remove   where ZTBARKOD IN TBARKOD AND ZPP_T004~CRDAT IN KKTARIH


and add the following:


and   ZQM_T001~ZTBARKOD IN TBARKOD AND ZPP_T004~CRDAT IN KKTARIH .



Regards,

Chandu

custodio_deoliveira
Active Contributor
0 Kudos

It's a limitation. You will need either use inner join (if you can) or remove the ZPP_T004~CRDAT from where clause and delete the results after the select:

delete gt_tblo where crdat_1 not in kktarih.

Regards,

Custodio

0 Kudos

Hi Chandra ,

I changed as you say but not change I got the same error.

0 Kudos

Because the error has nothing to do with '~'or lack of. It's a limitation (not sure if OpenSQL or native SQL), as a said before.

0 Kudos

Custodio ,

How to solve limitation . Is not there another way to do this. I don't understand first say. How will we clear the table ?