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 with select options not working

Former Member
0 Likes
1,086

Hi,

This is the query I have written.

   SELECT  a~tu_num

           a~tu_sr_act_num

           a~docid

           a~itemid

           a~docno

           a~itemno

           b~start_plan_tstfr

           c~tu_num_Ext

      INTO TABLE lt_tu_dlv

      FROM /scwm/tu_dlv AS a

      INNER JOIN /scwm/tu_sr_act AS b

         ON a~tu_num EQ b~tu_num

      INNER JOIN /scwm/tunit AS c

         ON b~tu_num EQ c~tu_num

        WHERE c~tu_num_ext IN s_tu_ext

          AND b~act_dir EQ 1

          AND b~start_actual EQ 0

          AND b~end_actual EQ 0.

However, I do not get any records selected though I see them in the individual tables.

Can you tell me if there is anything wrong with my select options used in the WHERE clause?

Thanks

Sneha

Hi,

This is the query I have written.

   SELECT  a~tu_num

           a~tu_sr_act_num

           a~docid

           a~itemid

           a~docno

           a~itemno

           b~start_plan_tstfr

           c~tu_num_Ext

      INTO TABLE lt_tu_dlv

      FROM /scwm/tu_dlv AS a

      INNER JOIN /scwm/tu_sr_act AS b

         ON a~tu_num EQ b~tu_num

      INNER JOIN /scwm/tunit AS c

         ON b~tu_num EQ c~tu_num

        WHERE c~tu_num_ext IN s_tu_ext

          AND b~act_dir EQ 1

          AND b~start_actual EQ 0

          AND b~end_actual EQ 0.

However, I do not get any records selected though I see them in the individual tables.

Can you tell me if there is anything wrong with my select options used in the WHERE clause?

Thanks

Sneha

2 REPLIES 2
Read only

FredericGirod
Active Contributor
0 Likes
679

Hi,

could you remove your createria :

          AND b~act_dir EQ 1

          AND b~start_actual EQ 0

          AND b~end_actual EQ 0.

Fred

Read only

former_member730258
Participant
0 Likes
679

The start_actual and end_actual are timestamp fields, try passing '00000000' (for date) or '000000' (for time) or better check values in SE16 to be sure.