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

Split Internal table for every 100 records

Former Member
0 Likes
8,305

Hello Everyone,

My requirement is to send the email based on number of records in the internal table.

If my internal table contains 400 records in case i need to split the content into 100 records each and send 4 email with 100 records.

So how to split the internal table having 400 records by 100 each. If it move in temporary internal table how 1st 100 to be passed and followed by 2nd...

Help me pls...

Hello Everyone,

My requirement is to send the email based on number of records in the internal table.

If my internal table contains 400 records in case i need to split the content into 100 records each and send 4 email with 100 records.

So how to split the internal table having 400 records by 100 each. If it move in temporary internal table how 1st 100 to be passed and followed by 2nd...

Help me pls...

1 REPLY 1
Read only

Muthu_raja
Active Participant
2,272

Hi Meenakshi,

By using temporary internal table inside the loop of the main internal table, you can achieve this. Kindly try the below pseudo-code and let me know if you need more help on this.

loop at lt_data assigning <fs_data>.
  append <fs_data> to lt_tmp_data.
  check ( sy-tabix mod 100 eq 0 ).
  " Send the 100 records to the email ( you have to use lt_tmp_data not lt_data)
  refresh lt_tmp_data.
endloop.