Do you have any question about this error?
Message type: E = Error
Message class: 37 - Screen Painter
Message number: 073
Message text: Selection in loop continuation lines is not allowed
You cannot select screen elements for moving or copying to lines in
subsequent loop blocks.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
You can only move elements within a loop block.
Error message extract from SAP system. Copyright SAP SE.
The SAP error message 37073, "Selection in loop continuation lines is not allowed," typically occurs in ABAP programming when there is an attempt to use a selection statement (like
SELECT
,SELECT-OPTIONS
, orPARAMETERS
) within a loop that is not allowed. This error is often related to the structure of the code and how the loops and selection statements are organized.Cause:
- Improper Placement of Selection Statements: The error usually arises when a selection statement is placed inside a loop that is not designed to handle it. For example, if you have a
LOOP AT
statement and you try to perform aSELECT
query inside that loop, it can lead to this error.- Nested Loops: If you have nested loops and the inner loop contains a selection statement, it may also trigger this error.
- Incorrect Use of Control Structures: Using control structures incorrectly can lead to this error, especially if the logic is not properly structured.
Solution:
Reorganize Your Code: Move the selection statement outside of the loop. Perform the selection before entering the loop, and then process the results within the loop.
DATA: lt_data TYPE TABLE OF your_table_type. SELECT * FROM your_table INTO TABLE lt_data WHERE your_conditions. LOOP AT lt_data INTO DATA(ls_data). " Process each entry in lt_data ENDLOOP.
Use Temporary Tables: If you need to filter or process data based on certain conditions, consider using temporary tables or internal tables to store the results of your selection before looping through them.
Check Logic: Ensure that the logic of your program does not require a selection statement within a loop. If it does, consider restructuring your approach.
Related Information:
By following these guidelines, you should be able to resolve the error message 37073 and improve the structure of your ABAP code.
Get instant SAP help. Start your 7-day free trial now.
Feature | Free Access | Free Trial |
---|---|---|
Basic SAP error explanation | ![]() |
![]() |
Step-by-Step Usage Guide | ![]() |
![]() |
Interactive SAP Coach Assistance | ![]() |
![]() |
AI Troubleshooting for T-Code Errors | ![]() |
![]() |
37072 Transformed to table control (& column header(s) deleted)
Self-Explanatory Message Since SAP believes that this specific error message is ...
37071 Cursor not allowed outside the dynpro
What causes this issue? Mark fields and blocks to be moved, cut and copied by p...
37074 Transformation to table control was canceled
Self-Explanatory Message Since SAP believes that this specific error message is ...
37075 Assign a name to the line selection field
What causes this issue? You are editing a table control with a line selection c...
SAP messages fall into 3 different categories: Error messages
(message type = E), Warnings (W) or Informational (I) messages.
An error message will prevent you from continuing your work - it is a hard stop and you need to fix the error before you can proceed. A warning message will stop your work, however, you can then bypass the warning by pressing the Enter key on your keyboard. That said, it is still good practice to investigate the cause of the warning message and address it. An information message will not stop your work and is truly just for informational purposes.
Click on this link to search all SAP messages.