Problem : There is no syntax errors in the program but just before displaying the Output results it is giving runtime error.
Runtime Errors: DBIF_RSQL_INVALID_RSQL
Except. CX_SY_OPEN_SQL_DB
Sample Internal table
Types : begin of fieldstring,
Col1 type Ztable-col1,
Col2 type Ztable-col2,
Col3 type Ztable-col3,
End of fieldstring.
Wrong way : select col3 col1 col2 into table body from Ztable. [ No Syntax Error ]
Correct way : select col1 col2 col3 into table body from Ztable. [ everything perfect ]
Solution:
Maintain columns in correct order in SELECT statement.