why loop in pbo and pai
Can anybody tell me we have to write loop
in both pbo and pai.
is loop in pai is mandatory.
what is its purpose in pai ? ?
Nagarajan Ramamoorthy replied
Hi Phaneendra Punukollu,
While using table control, in PBO, we want to pass the data to
the table control. For that only following syntax used in PBO:
LOOP AT ITAN INTO WA WITH CONTROL ZTC CURSOR ZTC-CURRENT_LINE. .... ENDLOOP.
In PAI, we want back in the internal table whatever changes made on the data in the table control. For that the follwing syntax used in PAI:
LOOP AT ITAB. .... ENDLOOP.
The screen fields in table contol are not necessarily to have the
same field names as in internal table. In this case, the MOVE staement inside the LOOP used in PBO and PAI.
In PAI, MODIFY statement is used within a MODULE to update the internal table.
We can -