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.
37073
- Selection in loop continuation lines is not allowed ?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.
37072
Transformed to table control (& column header(s) deleted)
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
37071
Cursor not allowed outside the dynpro
What causes this issue? Mark fields and blocks to be moved, cut and copied by positioning the cursor in the appropriate field or block and pressing F...
37074
Transformation to table control was canceled
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
37075
Assign a name to the line selection field
What causes this issue? You are editing a table control with a line selection column, but the line selection column has no name.System Response The ...
Click on this link to search all SAP messages.