2006 Mar 13 9:08 PM
I have a function that runs a native sql statement in a generated subroutine ( based on an example posted by Rich Heilman here ==> ).
When l_statement (my native sql statement) is greater than 255 characters, I get the following error ==> CX_SY_GEN_SOURCE_TOO_WIDE ... however, if the sql is <= 255, I do not get an error.
I have modified many of the char variables in the function to be string variables, and I'm still receiving getting the same error. Is there a limitation on the length of a native sql statement ? If so, can someone recommend a possible work around ?
Thanks !
2006 Mar 13 9:26 PM
Yes there is a limitation on as to how long an ABAP statement can be and that is 255 as you found out.
What you have to do is to have your native sql statement on separate lines instead of one long line. For instance,
you can have each AND/OR where conditions on seperate lines(different records in the itab containing the code for the subroutine).
Srinivas
I have a function that runs a native sql statement in a generated subroutine ( based on an example posted by Rich Heilman here ==> ).
When l_statement (my native sql statement) is greater than 255 characters, I get the following error ==> CX_SY_GEN_SOURCE_TOO_WIDE ... however, if the sql is <= 255, I do not get an error.
I have modified many of the char variables in the function to be string variables, and I'm still receiving getting the same error. Is there a limitation on the length of a native sql statement ? If so, can someone recommend a possible work around ?
Thanks !
2006 Mar 13 9:26 PM
Yes there is a limitation on as to how long an ABAP statement can be and that is 255 as you found out.
What you have to do is to have your native sql statement on separate lines instead of one long line. For instance,
you can have each AND/OR where conditions on seperate lines(different records in the itab containing the code for the subroutine).
Srinivas
2006 Mar 13 11:36 PM
Thanks Srinivas.
This gets me going in the right direction. I need to figure out how to continue a string across 2 lines within a db2 sql statement, but I should be able to answer that with some more google searching.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |