Hi Amol,
just for completeness: You can find the variable for the SQL Statement in class EXECUTE_QUERY. You should find a string variable holding the statement. In older releases an ABAP CHAR-like variable (32k or 64k has been used). So if you find a string variable in your systems, you should be fine.
Cheers,
Jasmin