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

Problem in where clause

Former Member
0 Likes
664

Hi all,

Can anybody tell me what is the problem in my where clause. Showing error

Comma without preceding colon (after LOOP ?).

loop at main_table1 where bwart IN('105','104').

loop at i_mkpf where mblnr = i_mseg-mblnr and

mjahr = i_mseg-mjahr.

main_table1-budat = i_mkpf-budat.

append main_table1.

clear main_table1.

endloop.

endloop.

Definitely rewards points.

Best regards,

Aastha

Hi all,

Can anybody tell me what is the problem in my where clause. Showing error

Comma without preceding colon (after LOOP ?).

loop at main_table1 where bwart IN('105','104').

loop at i_mkpf where mblnr = i_mseg-mblnr and

mjahr = i_mseg-mjahr.

main_table1-budat = i_mkpf-budat.

append main_table1.

clear main_table1.

endloop.

endloop.

Definitely rewards points.

Best regards,

Aastha

4 REPLIES 4
Read only

Former Member
0 Likes
633

here in operator is not supported

loop at main_table1 where bwart = '105'

and bwart = '104'.

loop at i_mkpf where mblnr = i_mseg-mblnr and

mjahr = i_mseg-mjahr.

main_table1-budat = i_mkpf-budat.

append main_table1.

clear main_table1.

endloop.

endloop.

or

loop at main_table1

case main_table1-bwart

when '105'

loop at i_mkpf where mblnr = i_mseg-mblnr and

mjahr = i_mseg-mjahr.

main_table1-budat = i_mkpf-budat.

append main_table1.

clear main_table1.

endloop.

endloop.

endcase.

Read only

Former Member
0 Likes
633

give spaces between the operators

eg, IN ( '105' , '104' ).

as always,

pk

Read only

Former Member
0 Likes
633

Hi,

Change the where clause in loop statement to

WHERE bwart = '105' AND bwart = '104'.

Reward points if helpful.

Regards,

Ramya

Read only

Former Member
0 Likes
633

Hi,

create a range for bwart and fill it accordingly.

Then you can:

loop at itab into wa where bwart in range.

endloop.

Cheers,

Raymond