Hello, I have an internal table which has a only four fields in it.
Material
GL_Account
Amount
Customer.
I want to update a standard database table with data that is in my internal table, the problem is that standard database table's structure is different than my internal table. so i created another internal table which is TYPE my database table and work area. ok
then I did a loop from Internal table into Workarea.
INT_TAB has four fields above.
WA_INT is INT_TAB's work area
STD TABLE is a standard database table
WA_STD_TAB is work area of STD_TAB which is TYPE STANDARD TABLE OF standard database table.
This is my code:
Loop at Int_Tab into WA_INT.
WA_std_tab-ZZMATERIAL = WA_INT-ZZMATERIAL.
WA_std_tab-ZZGL_ACCOUNT = WA_INT-ZZGL_ACCOUNT.
WA_std_tab-ZZAMOUNT = WA_INT-ZZAMOUNT.
WA_std_tab-ZZCUSTOMER = WA_INT-ZZCUSTOMER.
UPDATE STD_TAB from WA_STD_TAB.
ENDLOOP.
My code compiled okay but this is very very slow and times out after 40 mins. I am only pulling 1 million records. I am looking and see how to optimize this better. This should be done in a few minutes.
Please suggest me what to do here,
Thanks.