Do you have any question about this error?
Message type: E = Error
Message class: 00 -
Message number: 098
Message text: Program error with LOOP AT int. tab: FROM greater than TO
The limits within which an internal table should be displayed are
incorrect. The specification of FROM is larger than TO.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Correct the specifications for FROM and TO.
Error message extract from SAP system. Copyright SAP SE.
00098
- Program error with LOOP AT int. tab: FROM greater than TO ?The SAP error message "00098 Program error with LOOP AT int. tab: FROM greater than TO" typically occurs when there is an issue with the internal table being processed in a LOOP statement. This error indicates that the range specified for the LOOP AT statement is invalid, specifically that the starting index (FROM) is greater than the ending index (TO).
Cause:
Invalid Indexing: The error arises when the internal table is being looped over, and the specified range for the loop is incorrect. This can happen if:
- The internal table is empty, and an attempt is made to loop over it with a specified range.
- The FROM index is set to a value greater than the TO index.
- There is a logical error in the code that calculates the indices.
Data Manipulation: If the internal table is modified (e.g., rows are deleted) before the LOOP statement, it may lead to an invalid range.
Solution:
Check Index Values: Review the code where the LOOP AT statement is defined. Ensure that the FROM and TO indices are correctly set and that FROM is less than or equal to TO.
Example:
DATA: lt_table TYPE TABLE OF your_structure, lv_from TYPE i, lv_to TYPE i. lv_from = 1. lv_to = lines( lt_table ). " Ensure this is valid LOOP AT lt_table INTO DATA(ls_row) FROM lv_from TO lv_to. " Your processing logic here ENDLOOP.
Handle Empty Tables: Before executing the LOOP, check if the internal table is empty. If it is, avoid executing the loop or set appropriate default values for the indices.
Example:
IF lines( lt_table ) > 0. LOOP AT lt_table INTO DATA(ls_row). " Your processing logic here ENDLOOP. ELSE. " Handle the case where the table is empty ENDIF.
Debugging: Use the debugger to step through the code and inspect the values of the indices and the internal table before the LOOP statement. This can help identify where the logic may be going wrong.
Review Logic: If the indices are calculated dynamically, ensure that the logic used to determine these indices is correct and accounts for all possible scenarios.
Related Information:
By following these steps, you should be able to resolve the error and ensure that your LOOP AT statements function correctly.
Get instant SAP help. Start your 7-day free trial now.
00097
Internal table & does not exist or is empty
What causes this issue? Access to internal tables with index = 0.System Response The system issues an error message and will not allow you to contin...
00096
No field was held
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
00099
Field after FROM, TO or CURSOR has incorrect data type
What causes this issue? Fields that can be specified for the LOOP AT internal table (FROM, TO, CURSOR), have an incorrect data type. &RSYSTEM_RES...
00100
Program error in LOOP AT internal table; FROM is greater than table end
What causes this issue? Incorrect specification of FROM.System Response The system issues an error message and will not allow you to continue with t...
Click on this link to search all SAP messages.