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: 

re: how to create a temporary index for a table in program

colin_cheong
Contributor
0 Kudos

Hi,

I execute a report to access table EKBE. The field that is essential is the CPUDT - entry date.

Now, the EKBE is not index with this field.

I do not want to create a permanent index which might occupied space. The current read on EKBE is sequential.

I thought of creating an index in the program and then releases it once the report is out.

Is there a way to achieve that?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

I think it is not possible to create a temporary index.

the purpose of index is based on the key fields.

By using these index we can retrieve the data easily.

So it is not possible to create temp index in a table.

Please reward points if it is useful.

Regards,

satish.

2 REPLIES 2

Former Member
0 Kudos

Hi ,

I think it is not possible to create a temporary index.

the purpose of index is based on the key fields.

By using these index we can retrieve the data easily.

So it is not possible to create temp index in a table.

Please reward points if it is useful.

Regards,

satish.

Former Member
0 Kudos

Hi,

You can dump the data into one internal table and create index of that internal table like this:

tables: ekbe.

data: begin of itab occurs 0,

cpudt like ekbe-cpudt,

indx type i,

end of itab.

select cpudt up to 10 rows

from ekbe into table itab.

loop at itab.

itab-indx = sy-tabix.

write:/ itab-cpudt, itab-indx.

endloop.

Regards,

Bhaskar