‎2010 Sep 20 10:39 AM
If the SELECT query has dynamic WHERE clause then in CRM side it fails if the number of records are more than 13000 in table from where we are picking up the values. We have used it many a place in whole application. Is there any way to handle it by configuring System level change rather than changing the code? We have problems in changing the code as it is used in multiple locations in whole custom application.
Example1:
DELETE FROM <table1> WHERE <field1> IN ( SELECT <field1> FROM <table2>
WHERE <field2> = <var2> ).
<table1> has more than 13000 records.
Thank you.
Cheers,
Ashish
‎2010 Sep 20 10:54 AM
Hi ,
Incase u changes code ,better use modular programming ,include the code in form
,so that you dont have to face such problem again.
Regards,
Kiran
‎2010 Sep 20 10:56 AM
Hello Asish,
This is b'coz the SQL statement you've coded exceeds maximum length of the SQL statement for your SAP release.(Search for relevant OSS Notes, you can check ABAP forums as well i remember a discussion on this 1-2 weeks back)
The Open SQL statement with the range (after the 'IN' keyword) is parsed before being forwarded to the DB layer & if your range contains too many recs your DELETE stmt will result in a runtime error.
BR,
Suhas