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 select query

Former Member
0 Likes
713

Hi experts,

I have a following piece of code:

types: begin of ty_equi,

eqart type equi-eqart,

equnr type equi-equnr,

kunde type equi-kunde,

invnr type equi-invnr,

end of ty_equi.

DATA: lt_equi TYPE TABLE OF ty_equi with header line.

IF equipment_number IS NOT INITIAL.

SELECT

eqart

equnr

kunde

invnr

FROM equi INTO TABLE lt_equi

FOR ALL ENTRIES IN equipment_number

WHERE equnr = equipment_number-equipment_number.

ENDIF.

The problem is that the select query does not return anything in lt_equi table. How to rectify the issue?

Thanks,

Ajay

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
656

Try changing the condition


IF equipment_number[] IS NOT INITIAL.  "you need the table not to be empty, not header line

Regards

Marcin

3 REPLIES 3
Read only

MarcinPciak
Active Contributor
0 Likes
657

Try changing the condition


IF equipment_number[] IS NOT INITIAL.  "you need the table not to be empty, not header line

Regards

Marcin

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
656

Hello Ajay,

Looks like a conversion exit problem to me.

I think you have to use the FM: CONVERSION_EXIT_ALPHA_INPUT on equipment_number-equipment_number & check.

BR,

Suhas

Read only

Former Member
0 Likes
656

Hi Ajay,

There might not be the entries satisfying the equipment numbers in the table EQUI , which you are passing in the where clause of the select QUERY.

Do one thing to cross verify with the table . Just copy all the entries for the field EQUIPMENT_NUMBER from the internal table equipment_number. Open table EQU in SE11 & paste all the values in field EQUNR & execute & see if you find any values.

If you arent getting your SELECT query is working perfectly.

Regards

Abhii