Application Development 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: 

select in table COEP

Former Member
0 Kudos

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

LucianoBentiveg
Active Contributor
0 Kudos

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

Check it,

0 Kudos

what is the other condition

0 Kudos

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

0 Kudos

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

0 Kudos

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

other

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

0 Kudos

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

0 Kudos

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

SAP will take care of which index to use.

Regs

Manas

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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