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: 

move using index

Former Member
0 Kudos

hai

Using move statement i want to move the records from internal table to another using index.

is it possible, let me know

actually my requirement is that my final table is having mroe than 2 lakhs but excel can capture 60000 records only so i have to create no of excel files based on no of records, in this case each time i have to move 60000 records to another internal table and then i have to call gui_download.

madhavi

1 ACCEPTED SOLUTION

former_member195698
Active Contributor
0 Kudos

You can use APPEND statement for moving data from one internal table to a TEMP internal table.

APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.

n1 and n2 will be variable which you can increment accordingly

ITAB1 will be your main table and ITAB2 will be your temp table to which you will move 60000 entries and then download.

Regards,

Abhishek

Message was edited by:

Abhishek Jolly

4 REPLIES 4

Former Member
0 Kudos

create a counter and sort it loop it using index

Former Member
0 Kudos

i cann't use move statement in this scenario

Simha_
Employee
Employee
0 Kudos

Hi,

Read the no of records and based on the records u can divide , how many entries ur itab has to handle.

U can use loop at itab where <cond>.

in condition u have to use index from and to.

The specification TO is only possible with standard tables and sorted tables. The specification only accepts table rows after table index idx2. For idx2, a data object of the type i is expected. If the value of idx2 is smaller or equal to 0, then the loop will not be passed. If the value is larger than the number of table rows, then the value will be set to the number of rows. If idx2 is smaller than idx1, then the loop is not passed as well.

Cheers,

SImha.

former_member195698
Active Contributor
0 Kudos

You can use APPEND statement for moving data from one internal table to a TEMP internal table.

APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.

n1 and n2 will be variable which you can increment accordingly

ITAB1 will be your main table and ITAB2 will be your temp table to which you will move 60000 entries and then download.

Regards,

Abhishek

Message was edited by:

Abhishek Jolly