‎2011 Jul 06 1:10 PM
Hi,
I got a program which is using a Loop at IT PA0167 and building few tables based on conditions and also using Do 20 times varying statement as well couple of times. When the Program is run with complete data it takes around 20000 records in the IT PA0167 and looping for those and using Do varying is taking lot of time.
What I can think is that I can split IT PA0167 into different sets of employees and then execute, not sure how effective that will be.
Any Idea on how to resolve this ?
Thanks
Manoj
‎2011 Jul 06 3:54 PM
Hi Manoj, Try replacing the Do varying with the actual workarea, like if you are summing up in the Do varying, try replacing with actual variable sum like WA-FLD1 + WA-FLD2...WA_FLD20 or Check if the Assign Increment variant improves the performance.
DO.
inc = sy-index - 1.
ASSIGN WA_DATA-FLD1 INCREMENT inc TO <EACH_FLD> RANGE WA_DATA.
IF sy-subrc = 0.
* ...Logic based on <EACH_FLD>
ELSE.
EXIT.
ENDIF.
ENDDO.
‎2011 Jul 07 5:00 AM
Hi Suman,
Tried out but nothing changed much..
thanks anyways..
Manoj
‎2011 Jul 06 4:18 PM
It's unlikely that you have to DO 20 TIMES VARYING... for each record in PA0167. Most or all of the fields will be empty. You should determine when you have processed all of the fields and then EXIT or CONTINUE.
Rob
‎2011 Jul 07 5:00 AM
Hi Rob,
I am already using Exit in case of blank records.
Thanks
Manoj
‎2011 Jul 07 1:56 PM
‎2011 Jul 08 5:30 AM
I mean the same Rob.. I am using Exit for blank field only.. that was a casual statement..