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

Can this statement be optimized?

Former Member
0 Likes
758

loop at lt_hide_log_list into ls_hide_log_list.

delete table et_save_log_customizing from ls_hide_log_list.

endloop.

Thanks for helping.

Best regards,

Lament

1 ACCEPTED SOLUTION
Read only

former_member222860
Active Contributor
0 Likes
741

Hi

loop at lt_hide_log_list into ls_hide_log_list.

delete table et_save_log_customizing from ls_hide_log_list.

APPEND lt_hide_log_list.

endloop.

thanks

Mahesh

7 REPLIES 7
Read only

Former Member
0 Likes
741

can u tell what all those tables are??how they are related???

Read only

0 Likes
741

They are all the type tihttpnvp

That is the "name-value" list.

Regards,

Lament

Read only

0 Likes
741

Hi Gates,

I dont think it requires further optimization. The code is already optmized. Inside LOOP when you are using a work area to delete the values from another internal table of same line type, the performance is satisfactory. The code that you have used is the recommended way of using the delete statement.

So you can use the code as it is.

Best Regards,

Ram.

Read only

0 Likes
741

Hi,

when u use a work area...it is like...

The statement deletes the first internal table row whose values in the columns of the table key match those of the corresponding components of wa. If the key fields in wa are empty, no entry is deleted.

So if you want to delete more than one row from the table et_save_log_customizing having the same key as the work area...u have to use..

loop at lt_hide_log_list into ls_hide_log_list.

DELETE TABLE et_save_log_customizing WITH KEY name = ls_hide_log_list-name.

endloop.

preformance wise both are ok...

Read only

Former Member
0 Likes
741

Hi Gates,

Can u please elaborate u r question please.

Read only

former_member222860
Active Contributor
0 Likes
742

Hi

loop at lt_hide_log_list into ls_hide_log_list.

delete table et_save_log_customizing from ls_hide_log_list.

APPEND lt_hide_log_list.

endloop.

thanks

Mahesh

Read only

Former Member
0 Likes
741

Thanks very much for all your reply

Regards,