Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

why loop in pbo and pai

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,

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.

Regards,

R.Nagarajan.

-


We can -


0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question