‎2021 Oct 05 12:42 PM
I made a change to add field and pull data in report, I didn't get any error in dev system but I got such error in live system. what could be the reason.

‎2021 Oct 05 12:55 PM
If you look at the last sentence in the screenshot, it says it. The ABAP code in the report is obvously building a dynamic Open SQL statement( a SELECT ?), probably the code is concatening a string that will then sent to the database, and this string contains too many selections/is too long. In Open SQL there are restrictions on the size and number of selection field values( for example in a SELECT statement ) .
‎2021 Oct 05 1:13 PM
SAPSQL_STMNT_TOO_LARGE happens if the user selects too many criteria values or if the program does the same. You may only reduce the risk, not eliminate it.
See more:
‎2021 Oct 05 4:56 PM
Another common cause of SAPSQL_STMNT_TOO_LARGE is SQL with FOR ALL ENTRIES IN with a large internal table.
‎2021 Oct 05 5:09 PM
You really prefix a FORM name with f_? What else could it be? You do know that no new development should use Forms. They're obsolete.
‎2021 Oct 05 9:23 PM
You can have an idea of length of generated SQL by having look into "Database Interface Information" in ST22.

Then you can calculate which parameter caused the issue, and limit of number of conditions for the parameters.