Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Causing error in query using 3 tables?

$
0
0

With Respect Gurus,

 

I have a problem in a query using 3 table tables with inner join...

 

 

SELECT a~DIVID a~DPTID b~SFTCD c~FRMTM c~TOTTM

         INTO (YEMPMST-DIVID, YEMPMST-DPTID, YESHTMST-SFTCD,

               YSHIFTM-FRMTM, YSHIFTM-TOTTM)

         FROM yempmst as a

         INNER JOIN YESHTMST as b

         on  b~ADRNR = a~ADRNR

         AND b~EMPCD = a~EMPCD

         AND b~untno = a~untno

         AND b~FRMDT <= YATNDENT-PCHDT

         AND b~TODAT >= YATNDENT-PCHDT

         INNER JOIN YSHIFTM asc

         on  c~untno = b~untno

         ANDc~sftcd = b~sftcd

         WHERE a~EMPCD = YATNDENT-EMPCD

           AND a~UNTNO = YEMPMST-UNTNO.

ENDSELECT.

 

Error is:

The list "(YEMPMST-DIVID, YEMPMST-DPTID, YESHTMST-SFTCD,

YSHIFTM-FRMTM, YSHIFTM-TOTTM)" after "INTO" is not of the the form (f1,

...,fn), or contains an undefined field. the form (f1, ...,fn), or

contains an undefined field or contains an

 

 

But here all the fields are in correct order ..

 

Kindly give me suggestion...

 

 

Many Thanks / Himanshu Gupta


Viewing all articles
Browse latest Browse all 10425

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>