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
359

Hi all,

I want to know the structure of my Internal table <b>i_employee_id</b> to be passed in the following query.I am not passing this table from select-options.

SELECT * FROM pa0002 INTO TABLE i_pa0002

WHERE pernr IN <b>i_employee_id.</b>

I have some pernrs..i want to insert that in <b>i_employee_id</b>.Cud anyone help me ?

Rgds,

JBP.

I used this ....but im getting some erro...

DATA : i_employee_id type range of pernr-pernr.

Data : wa_employee_id like line of i_employee_id.

wa_employee_id-sign = 'I' .

wa_employee_id-option = 'EQ' .

wa_employee_id-low = '00002544'.

wa_employee_id-high = '00002590'.

insert wa_employee_id into i_employee_id .

Message was edited by: P24101990

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
331

i_employee_id could be declared as RANGES in the Program..if so you can add pernrs as below..


i_employee_id-sign = 'I'.
i_employee_id-option = 'EQ'.
i_employee_id-low = '00001234'. "you pernr no
append i_employee_id.
*similarly append all the pernrs to the ranges.

~Suresh

2 REPLIES 2
Read only

suresh_datti
Active Contributor
0 Likes
332

i_employee_id could be declared as RANGES in the Program..if so you can add pernrs as below..


i_employee_id-sign = 'I'.
i_employee_id-option = 'EQ'.
i_employee_id-low = '00001234'. "you pernr no
append i_employee_id.
*similarly append all the pernrs to the ranges.

~Suresh

Read only

Former Member
0 Likes
331

Hi,

If you want to select pernrs from database table pa0002 in i_pa0002 for corresponding pernrs in i_employee_id, you can use a query of the type.

select * from pa0002 into corresponding fields of table

i_pa0002 for all entries in i_employee_id where pernr = i_employee_id-pernr.

hope this helps.

Regards,

Sameer