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: 

There are more records i.e.10000 in an internal table and while looping the

Former Member
0 Kudos

Hi Experts,

There are more than 5000 records in an internal table and while looping the internal table,it is needed to call a function module passing the entries from the above workarea.Then it takes lot of time and gives short dump as long time has been taken.

Please suggest me how to loop an internal table having more than 5000 records.

Regards,

Johny

7 REPLIES 7

Former Member
0 Kudos

Hi,

Which FM your using?

Former Member
0 Kudos

Hi

Sort the ITAB with fields you want to pass in FM.

then use.

loop at Itab

on change <fields you want to pass>

call FM

end change.

endloop.

Regards

Aditya

bpawanchand
Active Contributor
0 Kudos

Hi

If the Fm is a Z Function module then what you can do is pass the entire internal table after it is filled with the values , to the Function module and in the FM you try to manipulate the values .

Regards

Pavan

0 Kudos

Hi Pavan, How are you, Gmail id ivvu.

Regards

Janardhan reddy Yash

Former Member
0 Kudos

Hi,

For making the loop processing time lesser u can use field-symbols instead of work areas.

FIELD-SYMBOLS: <fs_table > TYPE / LIKE int_table.

LOOP AT int_table ASSIGNING <fs_table.>

........

.......

ENDLOOP.

The field symbols clears by itself.

This takes lesser time than usage of work areas.

Hope this helps.

Cheers,

Lakshmi Prasanna Gandham

ThomasZloch
Active Contributor
0 Kudos

To find out exactly what takes so much time, run a SE30 runtime analysis and sort the resulting list by net time descending. Post the problematic statements here, if you are unsure how to fix them.

Thomas

0 Kudos

Hi Thomas,

Here are the statements:

LOOP AT it_dimaiobpar INTO wa_dimaiobpar.

CALL FUNCTION 'FKK_ACCOUNT_BALANCE_COMPUTE'

EXPORTING

i_vkont = wa_dimaiobpar-partneracc

i_gpart = wa_dimaiobpar-partner

i_vtref = wa_dimaiobpar-insobject

i_start_date = '00000000'

i_start_time = '000000'

i_end_date = p_date "sy-datum

i_end_time = '000000'

TABLES

t_postab = it_postab2.

IF it_postab2 IS NOT INITIAL.

CLEAR wa_postab2.

LOOP AT it_postab2 INTO wa_postab2 WHERE augst NE '9'.

MOVE-CORRESPONDING wa_postab2 TO wa_postab1.

wa_postab1-lob = wa_dimaiobpar-insobjecttyp.

APPEND wa_postab1 TO it_postab1.

ENDLOOP.

ENDIF.

CLEAR wa_postab1.

Endloop.

The table it_dimaiobpar contains more than 7000 records and that makes an issue here it seems..