Dump with OPEN Cursor logic- in Ranges condition.
Following is my code snippet.
OPEN CURSOR WITH HOLD l_v_c1 FOR SELECT matnr werks lgort charg lvorm clabs cumlm cinsm ceinm cspem cretm FROM mchb FOR ALL ENTRIES IN l_i_fltrd_data WHERE matnr = l_i_fltrd_data-matnr AND werks = l_i_fltrd_data-werks AND lgort IN l_r_lgort AND charg IN fp_s_charg AND lvorm = space AND (l_v_where). *Fetch next cursor DO. FETCH NEXT CURSOR l_v_c1 INTO TABLE l_i_mchb_mch1_temp PACKAGE SIZE c_package_size. IF sy-subrc NE 0. CLOSE CURSOR l_v_c1. EXIT. ELSE. APPEND LINES OF l_i_mchb_mch1_temp TO fp_i_mchb_mch1. ENDIF. ENDDO.
In the Above code, the Ranges Table which iam using for LGORT(l_r_lgort), iam populating it with data. The entries in to this table are based on the server. In the development server, iam using some 50-60 entries, so the logic is working fine..
But in the Prod server, i shud give some 300-400 entries in to the ranges table. But while using this code with so many entries, iam getting DUMP.
Error in the module RSQL accessing the database interface. Error analysis An exception occurred. This exception is dealt with in more detail below . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was neither caught nor passed along using a RAISING clause, in the procedure "RETRIEVE_MCHB_MCH1" "(FORM)" . Since the caller of the procedure could not have expected this exception to occur, the running program was terminated. The reason for the exception is: The SQL statement generated from the SAP Open SQL Statement violates a restriction imposed by the database system used in R/3. Possible errors: o The maximum size of an SQL statement has been exceeded. o The statement contains too many input variables. o The space needed for the input data exceeds the available memory. o ... You can usually find details in the system log (SM21) and in the developer trace of the work process (ST11). If an error occurs the developer trace often informs you about the.
So can u please suggest me what is that which is causing the Dump, and is there any limit for Ranges data to be entered.