Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPWHILE_VARY - WHILE VARY

ABAPWHILE_VARY - WHILE VARY

ROGBILLS - Synchronize billing plans   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

WHILE, VARY

Short Reference



WHILE ... VARY dobj FROM dobj1 NEXT dobj2 $[RANGE range$]
         $[VARY ...$].
  $[statement_block$]
ENDWHILE.

Effect

The addition VARY and its addition RANGE have exactly the same effect on a WHILE loop as the other obsolete additions VARYING and RANGE of the statement DO. The addition VARY can be used more than once in a WHILE statement.

Notes

  • The way the addition VARY works depends on the internal structure of the working memory, which itself can be affected by alignment gaps.
  • Instead of the addition VARY, the statement ASSIGN should be used in the loop with the addition INCREMENT.

Exceptions

Non-Catchable Exceptions

  • Cause: Invalid access to tables, strings, field references, or object references within the range specified by the addition RANGE.
    Runtime Error: DO_WHILE_VARY_ILLEGAL_ACCESS
  • Cause: Access to data outside the range specified by the RANGE addition.
    Runtime Error: DO_WHILE_VARY_NOT_IN_RANGE






Fill RESBD Structure from EBP Component Structure   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 2343 Date: 20230207 Time: 100353     sap01-206 ( 32 ms )