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

select in table COEP

Former Member
0 Likes
1,040

i have select-option : scr_pernr.

i'm making select from table coep, one of the condition is <b>pernr in scr_pernr</b>.

<b>problem</b>

if i have pernr-low = 5555

i get data

if i have pernr-low = 5555 and pernr-high = 5555

i get diffrent data.

<b>i[</b>b]nformation</b>:

i make new index(z) for this selection.

thanks.

10 REPLIES 10
Read only

LucianoBentiveg
Active Contributor
0 Likes
933

I think you have another condition in where clause, making that difference.

Check it,

Read only

0 Likes
933

what is the other condition

Read only

0 Likes
933

i mean: ther is other way then <b>pernr in scr_pernr</b>

Read only

0 Likes
933

Hi,

Can you check the table 'scr_pernr' how it get populated in the debug....

I think you have give the other values also in the selection.

Regards,

Satya

Read only

0 Likes
933

in the screen i have field scr_pernr once i input <b>low-5555 high-</b>

other

<b>low-5555 high-5555</b>

Read only

0 Likes
933

the index that i create dont have ifluance on that situation.

Read only

0 Likes
933

U dont hv to specify the index name while data selection.

SAP will take care of which index to use.

Regs

Manas

Read only

0 Likes
933

O.K BUT THERE I CAN PUT ANY FIELD IN ANY ORDINARY, OR THERE IS A LOGIC ABOUT THIS

Read only

0 Likes
933

Hi let me clear abt ur idea in Index.

We create index to make data selection faster.

Two types of index,

1.Primary index(by default will be created)

2.secondary index(we will create)

suppose u want to fetch 4 fields frm a table,so u will make one index with that 4 fields.

When u write select 4 fields name,then SAP will autometically use this index.

when we write select stmts,SAP will search for suitable index.

NB: Indexs will not store any data like views only used for searching.

Regs

Manas

Read only

Former Member
0 Likes
933

HI use like this,

Ranges: r_pernr for coep-pernr occurs 1.

if scr_pernr not initial.

r_pernr-sign = 'I'.

r_pernr-option = 'EQ' "here make as BT if u want range

r_pernr-low = scr_pernr .

r_pernr-high = scr_pernr .

append r_pernr.

select pernr from coepe into corresponding fields of table <itab> where pernr IN r_pernr.

It will work

Regs

Manas Ranjan Panda