I guess all people gave you all the hints to optimize your code. Now I am running in the background for 1,5 millions records and it continues after 1 hour. Read table itab with key belnr = gwa_belnr_sums-belnr Lv_5per_total = con_5per_tax * gwa_belnr_sums-dmbtr. Loop at git_belnr_sums into gwa_belnr_sums. Move-corresponding itab to gwa_belnr_sums.Ĭollect gwa_belnr_sums into git_belnr_sums. So the declaration of the tables was: DATA : BEGIN OF itab OCCURS 0,Īfter your suggestion I made the following changes: types: begin of ty_belnr_sums,ĭata: git_belnr_sums type sorted table of ty_belnr_sums In the 2nd loop I compare the sum per belnr with the amount of the belnr/account and do what the code says.ġst of all the initial code existed and I added the new one. In the 2nd part in the 1st loop I summ the amounts per belnr for the accounts that start with 73. Modify itab transporting budat where belnr = itab2-belnr.ĭoes anyone have an idea on how to fix the 2nd part?Īfter the 1st process ITAB has 1,5 million records. If itab-dmbtr between lv_5per_lower and lv_5per_upper. Read table itab with key belnr = itab2-belnr Lv_5per_total = con_5per_tax * itab2-dmbtr. The 2nd part which is doing 13,5 hours is the following: sort itab by belnr. Select * from bseg into corresponding fields of itab Both of them process 1,5 million records, but the first part is taking 20 minutes and the 2nd part is taking 13,5 hours!!!!!! Itab in the PBO loop, the rows on the screen are deleted.I have 2 parts of code. Since the table control is read again from the internal table Then all selected rows are deleted in a loop using the internal table First the system checks inįlights-cols whether the fields of the table control are ready for input. You can delete selected rows from the internal table After sort the selection is undone, and the componentįlights-cols is assigned a blank character. SORT statement is determined dynamically from the componentĭemo_conn must be removed using an offset specification. The selected column is derived from the internal tableįlights-cols. The static settings of the table control allow you to select only a single column. The function codes SORT_UP and SORT_DOWN allow you to sort selected columns of the internal table By choosing the function code TOGGLE, you can change the ready for input status of the columns. All columns with a column position larger than two are set to not ready for input status in a loop using the tableįlights - cols. The static specifications of the table control in the Screen Painter are modified beforeĬALL SCREEN in the program. When the program is called not all of the fields in the table control are ready for input. The GUI status SCREEN_100 provides the appropriate function codes. In particular, the internal table also contains a flag in the column MARK to indicate whether the row of the table control is selected or not.Īfter the PAI loop, user input is processed in the module User input is transferred from the input fields of the control to the internal table. Itab before the PBO loop to install the scroll bar of the table control.ĭuring the PBO loop, in the module FILL_TABLE_CONTROL the work areaĭemo_conn is filled with values from the internal table, where the row index corresponds to the current row of the table control.ĭuring the PAI loop, the rows of the internal table, whose row index corresponds to the current row of the table control, are overwritten with the contents of the work areaĭemo_conn. However, during the PAI loop, a module is called to modify tableįlights is filled explicitly with the current number of rows of the internal table No module is called to fill the table control from table MODULE user_command_0100.Ī loop is executed at PBO and PAI using the table controlįlights and is also executed using the internal table LOOP AT itab INTO demo_conn WITH CONTROL flights. LOOP AT itab INTO demo_conn WHERE mark = 'X'. READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'. MODIFY flights-cols FROM cols INDEX sy-tabix. SORT itab STABLE BY (cols-screen-name+10) DESCENDING. READ TABLE flights-cols INTO cols WITH KEY selected = 'X'. SORT itab STABLE BY (cols-screen-name+10) ASCENDING. LOOP AT flights-cols INTO cols WHERE index GT 2. MODIFY itab FROM demo_conn INDEX flights-current_line. SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab. DATA: ok_code TYPE sy-ucomm, save_ok TYPE sy-ucomm. DATA: cols LIKE LINE OF flights-cols, lines TYPE i. CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |