10-14-2008 6:04 AM
Hi,
Can anybody tell me we have to write loop
-
endloop
in both pbo and pai.
is loop in pai is mandatory.
what is its purpose in pai ? ?
regards,
10-14-2008 6:17 AM
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.
Regards,
R.Nagarajan.
-
We can -
10-14-2008 6:10 AM
it is mandatory only incase of Tablecontrol. the loop is responsible for adding/reading the entries of a table control line by line. PBO is for adding, PAI is for reading.
10-14-2008 6:17 AM
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.
Regards,
R.Nagarajan.
-
We can -