The only thing to do is to first store the lines of BSEG in a temporary itab_temp, to contain only the lines of one document at a time, so that you loop only at these lines, and then add them to itab. Now, if you accept to adapt a few little things in the 1st part, right after reading the lines of BSEG of every document, then you may simply loop at these lines, no need of an index or binary search or hash table, and that's done. So, you shouldn't group ("collect") by document number only, or you risk to mix documents of distinct companies or years. Not related to the performance but on the data model: the key of a financial document is made of 3 fields, company (BUKRS), document number (BELNR) and year (GJAHR).you should measure the performance of your code with transaction SAT, and you will see on which operation the time is spent.If these concepts are unclear, I recommend the ABAP documentation: Row-Based Administration Costs of Internal Tables and Internal Tables - Performance Notes Essentially, as you want to optimize only the 2nd part, the only issues seem to be with itab operations (loop, read, modify), that you may improve by using an index or a or a hash table on the internal table itab. 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!!!!!! SAP ABAP Online Test and Answers Pdf Download. These are very useful & Most Asked Questions in your certification Exam. Read all Online Mock Test Exam Question Bank for Beginners Freshers & Experienced.ġ. This data type has a default length of one and a blank default value.Ģ. A DATA statement may appear only at the top of a program, before START-OFSELECTION.ģ. If a field, NAME1, is declared as a global data object, what will be output by theĭATA: name1 like KNA1-NAME1 value ‘ABAP programmer’.Ĥ. Which of the following may NOT be modified using the ABAP Dictionary transaction?Ħ.Īll of these allow you to step through the flow of a program line-by-line except:ĥ. In a line of code, text-100, is an example of which type of text element?ħ. The editor function that formats and indents the lines of code automatically is calledĨ. A DO loop increments the system field _.ĩ. The event that is processed after all data has been read but before the list is displayed is:ġ0. The field declared below is of what data type?ġ1. In regard to the INITIALIZATION event, which of the following is NOT a true statement?Ī: Executed before the selection screen is displayed.Ĭ: You can assign different values to PARAMETERS and SELECT-OPTIONS here.ĭ: Executed one time when you start the report.ġ2. occurs before the selection screen is displayed and is the best event for assigning default values to selection criteria.ġ3. The business (non-technical) definition of a table field is determined by the field’sġ4. In regard to the three-tier client/server architecture, which of the following is a true statement?Ī: The presentation server processes the SAP program logic.ī: An application server is responsible for updating database tables.Ĭ: Typically, there is a one-to-one ratio of database servers to presentation servers.ĭ: The application server layer is the level between a presentation server and aġ5. What will be output by the code below?ġ6. To allow the user to enter a single value on a selection screen, use the ABAP keyword _.ġ7. What will be output by the following code?ĭATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.ġ8. You can define your own key fields when declaring an internal table.ġ9.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |