Why do we need to code a LOOP statement in both the PBO and PAI events for each table in the screen?
We need to code a LOOP statement in both PBO and PAI events for each table in the screen. This is because the LOOP statement causes the screen fields to be copied back and forth between the ABAP/4 program and the screen field. For this reason, at least an empty LOOP….ENDLOOP must be there. 51. The field SY-STEPL refers to the index of the screen table row that is currently being processed. The system variable SY-stepl only has a meaning within the confines of LOOP….ENDLOOP processing. Outside the loop, it has no valid value.
We need to code a LOOP statement in both PBO and PAI events for each table in the screen. This is because the LOOP statement causes the screen fields to be copied back and forth between the ABAP/4 program and the screen field. For this reason, at least an empty LOOP.ENDLOOP must be there. 51. The field SY-STEPL refers to the index of the screen table row that is currently being processed. The system variable SY-stepl only has a meaning within the confines of LOOP.ENDLOOP processing. Outside the loop, it has no valid value.