Dump DBIF_RSQL_INVALID_RSQL

Dear all
I am facing a problem related to abap program, when I run the program like zmatlist
When I give Material Number in selection option ( for example 20000 Material Number )
In one go then abap report give me the following DUMP
DBIF_RSQL_INVALID_RSQL
CX_SY_OPEN_SQL_DB
And when in give selection option in chunk the that report run fine
After the dump I check dev_w0 file it shows like that
*C *** ERROR => max. statement length (65536) exceeded*
http://dbsloci.c 5759
C Dumping statement ...
C 0 | TEXT | 6 | SELECT
C 1 | TEXT | 4 | T_00
C 2 | TEXT | 1 | .
C 3 | IDENTIFIER | 5 | BISMT
So on
C 17481 | TEXT | 3 | AND
C 17482 | TEXT | 4 | T_02
C 17483 | TEXT | 1 | .
C 17484 | IDENTIFIER | 5 | WERKS
C 17485 | TEXT | 1 | =
C 17486 | MARKER(8588)| 0 | NULL
C token_cnt=17487, input_cnt=8589, marker_cnt=8589, stmt_length=86128
B ***LOG BYK=> current SQL statement exceeds a database limit dbtran#5 @ 7261 dbtran 7261
B dbtran ERROR LOG (hdl_dbsl_error): DbSl 'PRE'
thankx
Rayyan

Hi Shahid,
Please refer OSS note:
Note 48230 - Parameters for the SELECT ... FOR ALL ENTRIES statement
which explains the various option to solve your problem.
The dump is occuring because of too many inputs(20000 material number) in the select option.
Please let me know if this helpful, by rating.
Regards
Prashanth

Similar Messages

  • Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S

    Hi Experts,
    I  am facing the problem in the select statement where it giving the short dump
    DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S.
    i have searched many forms, but i found that the select option s_matnr have the limitaion 2000 entreis, but i am passing same s_matnr to other select statement with more than 2000 entries but it is not giving me any short dump.
    but i am facing problem with only one select statement where if i  pass select option s_matnr more than 1500 entris also giving short dump.
    my select statement is
    SELECT * FROM bsim                                       
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean  
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.
    in the internal table g_t_bsim_lean internal table contain all the fields of the table bsim with 2 fields from other table.
    Please let me know whether i need to change the select statement or any other solution for this.
    Regards,
    udupi

    my select query is like this:
    DATA: BEGIN OF t_bwkey OCCURS 0,                          "184465
              bwkey LIKE bsim-bwkey,                            "184465
            END OF t_bwkey.                                     "184465
      LOOP AT g_t_organ          WHERE  keytype  =  c_bwkey.
        MOVE g_t_organ-bwkey     TO  t_bwkey-bwkey.
        COLLECT t_bwkey.                                        "184465
      ENDLOOP.                                                  "184465
      READ TABLE t_bwkey INDEX 1.                               "184465
      CHECK sy-subrc = 0.                                       "184465
      SELECT * FROM bsim                                        "n443935
             INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean   "n443935
               FOR ALL ENTRIES IN t_bwkey   WHERE  bwkey = t_bwkey-bwkey
                                            AND    matnr IN matnr
                                            AND    bwtar IN bwtar
                                            AND    budat >= datum-low.

  • Customer Analysis Dump -  DBIF_RSQL_INVALID_RSQL

    Hi all,
    when I try to comparison previous period with tcode MCTA (Customer Analysis) the system generate the following dump.
    It occurs when I select 2092 Sold-to-party for 1 Sales Office and for 1 month. Since last week it has been working.
    The SAP release is ECC 5.0 on SQL 2005.
    Runtime Error          DBIF_RSQL_INVALID_RSQL
    Except.                    CX_SY_OPEN_SQL_DB
    ShrtText
        Error in RSQL module of database interface.
    What happened?
        Error in ABAP application program.
        The current ABAP program "RMCV0100" had to be terminated because one of the
        statements could not be executed.
        This is probably due to an error in the ABAP program.
    Any idea?
    Thanks
    M.

    Hi Shahid,
    Please refer OSS note:
    Note 48230 - Parameters for the SELECT ... FOR ALL ENTRIES statement
    which explains the various option to solve your problem.
    The dump is occuring because of too many inputs(20000 material number) in the select option.
    Please let me know if this helpful, by rating.
    Regards
    Prashanth

  • Short dump (DBIF_RSQL_INVALID_RSQL) during activating ODS

    Hello Experts,
    I found short dump during activating ODS.
    The error message in short dump:
    Runtime Error: DBIF_RSQL_INVALID_RSQL
    Except.: CX_SY_OPEN_SQL_DB
    The termination occurred in the ABAP program "GP7WIVS2MDWGSTMN3ICFDKNAH65" in "ACTIVATE_SIDS".
    The main program was "RSODSACT1 ".
    I add one InfoObject in the ODS. After activating related objects, I loaded data into the data target.
    Data seemed to be loaded correctly, but couldn't be activated.
    Any suggestion on this?
    -WJ-

    Hi,
    Please chekc the following SAP Notes you will find solution
    Note 908599 - Runtime error SAPSQL_INVALID_FIELDNAME during activation
    Note 612995 - P13:ODS:Data activation in bckgrnd always ends 'successfully
    Note 1175860 - P19: DSO: SDL: Automatic update after activation
    Note 1113603 - P17:DSO:Postprocessing ODS - activating and updating
    Note 378447 - Correction: hierarchies do not become green
    Note 1272738 - P21:DSO: Activation and automatic updating
    Note 794584 - P26:Timestamp field empty in RS2NDPROCPROT after ODSACTIVATE
    Note 800086 - P26: ODS activation: Status field in table RS2NDPROCPROT
    Note 856292 - P28: Automatic functions: No lock obtained for ERSICENQ
    Thanks
    Reddy

  • Dump DBIF_RSQL_INVALID_RSQL inserting the entry in bbp_pdisc

    Hi Experts,
    In our SRM senario, we are haing differnt backend system which are connected to SRM portal. Each system send the PO to SRM. I am currently facing a ssue with SRM system. When i create the PO in some backend system i am able to see the PO in SRM box. but for other systems PO it is giving the short dump as  DBIF_RSQL_INVALID_RSQL.
    On analysis of the dump i found that the error is occuring in the inesrt statemnt while iinserting the data in table bbp_pdisc. in standard program.
    I am not sure while this is happing only for few system , Can any one let me know why this is happening ,any inputs on this are really helpful.

    hi ,
    Please check table bbp_pdisc format  and pass data according 
    if there is data type mismatch then it will give dump .
    regards
    Deepak.

  • Dump DBIF_RSQL_INVALID_RSQL using pnp

    Hi guys, i have a report which use the logical data base pnp but when it runs on productive enviroment with all personnel numbers it send me this dump: Run-time error "DBIF_RSQL_INVALID_RSQL" occurred, a tried to use a TRY ENDTRY befor the get event but does not accept it before the event....
    What can i do to avoid this dump???
    Thnks a lot.

    Thx a lot for reply, i checked the note but it is for release 30 and we are in release higher so basis said that this note is not available any more.... we find this one 1298550 do u think it could solved the problem????
    Or do u know another solution???
    Edited by: Sandra Torres on Dec 22, 2009 7:56 PM

  • GRC 10.1 SP06 - Role sync fails with dump DBIF_RSQL_INVALID_RSQL

    Hi!
    We're experiencing an issue with the repository sync job for one connector. When selecting the full option, the sync for users and profiles report success but for the role sync we get the error "Error in RFC; 'Error in module RSQL of the database interface'" and a dump is generated in the back-end ( DBIF_RSQL_INVALID_RSQL) with the program /GRCPI/CL_GRIA_ROLE===========CP
    The problem occurs in the sentence:
    >>>>>
    SELECT agr_name parent_agr FROM agr_define   
    "#EC CI_SGLSELECT
       84      
    INTO TABLE lt_derived
       85 *      
    WHERE agr_name IN it_incl_role
       86      
    WHERE agr_name IN lt_incl_role
       87         
    AND ( change_dat GE iv_update_date  OR
       88             
    ( create_dat GE iv_update_date AND change_dat = '00000000'  ) ).
    We've tried working with the parameter 1122 (Batch size for Role sync) switching it to different values like 500, 100, 50, 10 and even 1 but the error still persists.
    Synch for another connector with the same GRC System works fine.
    any idea?
    Thanks,
    Diego.

    Sounds like an old foe from 10.0
    http://service.sap.com/sap/support/notes/1632421
    You may have to ask SAP to make a 10.1 version of this fix for you to apply to the plug-in system.
    There is a specific note for this issue in both 10.0 and 10.1, but it is part of 10.1 SP01 (you are on SP06)
    http://service.sap.com/sap/support/notes/1803121

  • 'DBIF_RSQL_INVALID_RSQL' short dump

    Hello All,
    I have a dynamic where_clause in a select query. ie its created at runtime. I get a short dump 'DBIF_RSQL_INVALID_RSQL' at the select statement. The reason shown in ST22 is:
    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.
    Could you please suggest a solution to the problem, since the data to be fetched is large I would not want to use select-endselect loop as that would make it slower.
    Thanks in advance,
    Anju

    Hi Anju,
    Check the link
    [ Perfect link|
    DBIF_RSQL_INVALID_RSQL;
    Regards,
    Sandeep

  • DBIF_RSQL_INVALID_RSQL when creating a Purchase Order (ME21N)

    Hi,
    The system is generating a short dump DBIF_RSQL_INVALID_RSQL when a user tries to create a purchase order.
    what could be the cause of this? i have analysed the short dump in st22 and looked at sm21 and st11 and they are giving very little detaill.
                                                                                    Error in the module RSQL accessing the database interface.                                                                               
    What happened?                                                                               
    Error in ABAP application program.                                                                               
    The current ABAP program "SAPLZMM_GET_ACT" had to be terminated because one of    
    the                                                                               
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.                                                                               
    What can you do?                                                                               
    Print out the error message (using the "Print" function)                          
    and make a note of the actions and input that caused the                          
    error.                                                                               
    To resolve the problem, contact your SAP system administrator.                    
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer          
    termination messages, especially those beyond their normal deletion              
    date.                                                                               
    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          
    "ZMM_GET_ACT_PLN" "(FUNCTION)"                                           
    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        
    current restrictions.                                                                               
    How to correct the error                                                                               
    The exception must either be prevented, caught within the procedure             
    "ZMM_GET_ACT_PLN"                                                              
    "(FUNCTION)", or declared in the procedure's RAISING clause.                    
    To prevent the exception, note the following:                                   
    The SAP Open SQL statement must be divided into several smaller units.          
    If the problem occurred due to the use of an excessively large table            
    in an IN itab construct, you can use the addition FOR ALL ENTRIES               
    instead.                                                                        
    When you use this addition, the statement is split into smaller units           
    according to the restrictions of the database system used.                                                                               
    You may able to find an interim solution to the problem                         
    in the SAP note system. If you have access to the note system yourself,         
    use the following search criteria:                                                                               
    "DBIF_RSQL_INVALID_RSQL" CX_SY_OPEN_SQL_DBC                                     
    "SAPLZMM_GET_ACT" or "LZMM_GET_ACTU01"                                          
    "ZMM_GET_ACT_PLN"                                                               

    Hi,
    Wherever you have used SQL statement please do check all the fields here as some of the fields are not in correct order as they are required per the actual table in dictonary, to just verify that you can use addition of "INTO CORRESPONDING FIELDS OF INTERNALTABLE" in your SQL statement as this will not require the fields to be in order but this may cause performance issue.
    Thanks and Regards
    Sudharshan

  • Runtime error DBIF_RSQL_INVALID_RSQL on BW Idoc archiving.

    Hi Experts,
    I am facing one issue while performing IDOC archiving in BW system.
    While running write program with RSEXARCA, I am getting ABAP dump DBIF_RSQL_INVALID_RSQL
    with a exception CX_SY_OPEN_SQL_DB. 'Error in RSQL module of database interface' as a short text.
    Please let me know what could be the problem.
    Regards,
    Mohan.

    Hi,
    You can try to implement the latest DBSL patch in order to solve this. You can implement the latest Kernel and DBSL patches from the links below.
    -> http://service.sap.com/patches
    -> Support Packages and Patches - Entry by Application Group
      -> Additional Components
       -> SAP Kernel
    Regards,
    Rafael

  • DBIF_RSQL_INVALID_RSQL

    Hello All,
    I have a dynamic where_clause in a select query. ie its created at runtime. I get a short dump 'DBIF_RSQL_INVALID_RSQL' at the select statement. The reason shown in ST22 is:
      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 ...                                                                               
    Could you please suggest a solution to the problem, since the data to be fetched is large I would not want to use select-endselect loop as that would make it slower.
    Thanks in advance,
    Anju

    I implemented one simple example. Can you check with your code where the mistake is...
    Input Table as SFLIGHT, and Fieldname as CARRID
    REPORT  ZTEST_SIMPLE.
    data: it_fcat type lvc_t_fcat.
    data: itable type ref to data.
    field-symbols: <fs> type standard table.
    parameters: p_table(30),
                p_column(30).
    data: cond type string.
    cond = 'CARRID = ''AA'' and  connid = ''00017'''.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
       I_STRUCTURE_NAME             =  p_table
      CHANGING
        ct_fieldcat                  = it_fcat
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = it_fcat
      IMPORTING
        EP_TABLE                  = itable
      EXCEPTIONS
        GENERATE_SUBPOOL_DIR_FULL = 1
        others                    = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    assign itable->* to <fs>.
    SELECT DISTINCT (p_column)
    INTO CORRESPONDING FIELDS OF TABLE <fs>
    FROM (p_table) WHERE (cond).
    break-point.

  • Can we use Loop Statement for Ranges

    Hi Friends,
    I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
    I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
    But my question is .....
    My R_range has values as below
    'I' 'EQ' '001'
    'I' 'EQ' '002'
    'I' 'BT' '003' '007'
    'I' 'EQ' '008'
    I have to move all these values to R_New_range and my count of items should be '8'.
    How can i do that????????
    Expecting ur answers....
    Thanks in advance
    Cheers,
    R.Kripa.

    hey friends,
    Its nice to see the replies.... but i think i had confused u all with the question
    Now i'll explain u all in detail ....
    See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
    I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
    Description of the Dump is
    Error in the module RSQL accessing the database interface
    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        
    "GET_COSP_COSS" "(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      
    current restrictions.                                                   
    So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
    Now :
    My Projects are stored in the form of a range R_Range
    I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
    I am clear till this .....
    If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
    But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
    Hope iam clear with my question
    If not do revert back ....
    Thanks in advance for the replies
    Cheers,
    R.Kripa.
    My Doubt is ....

  • SAPLFAGL_ITEMS_SELECT runtime error in FAGLL03 after ECC EHP 7 upgrade

    Hi all,
    We have recently upgraded to SAP ECC to EHP7, after this we are getting SAPLFAGL_ITEMS_SELECT runtime error in FAGLL03 report.
    Runtime error is not about a time out
    I have searched for a note but could not find any on this problem.
    Information on where terminated
        The termination occurred in ABAP program "SAPLFAGL_ITEMS_SELECT", in
    "FAGL_GET_ITEMS_BSEG". The main program
        was "FAGL_ACCOUNT_ITEMS_GL ".
        In the source code, the termination point is in line 412 of (Include)
        program "LFAGL_ITEMS_SELECTU08".
    Thanks in advance,

    Hi,
    Check this SAP note1578577 - FAGLL03: Dump DBIF_RSQL_INVALID_RSQL. Another one is 1728986. Cannot check further as I am not aware of exact patch level.
    If this does not help kindly raise it to SAP as dump is in standard object.
    Regards,
    Anand Raichura

  • How to add Material type(MTART) field on Selection screen of MB5B transaction code.

    Hi All,
        Please let me know how to add material type field on selection screen of MB5B transaction
    For that i made copy ZMB5B_COPY of original report RM07MLBD.
    Thanks in adv .
    Samadhan

    Hi,
    Once you copied the standard report to Z report, you can MTART in selection screen like below.
    and in order to inlcude the same in programming logic, we have three option.
    1) Check all related select queries, and include MTART in SELECT query using inner join with MARA.
    2) In START-OF-SELECTION event fill MATNR as shown below.
    3) If user entered any value in MTART, then before displaying the report just check material type of each material in the final internal table(which is used to display report) delete enteries from internal table accordingly.
    START-OF-SELECTION.
    IF MTART[] IS NOT INITIAL AND MATNR[] IS INITIAL.
        SELECT MATNR FROM MARA INTO MATNR-LOW WHERE MTART IN MTART.
          MATNR-OPTION = 'EQ'.
          MATNR-SIGN = 'I'.
          APPEND MATNR.
          CLEAR MATNR.
        ENDSELECT.
    ENDIF.
    The above option has one limitation: The selection screen variables has some restriction, please read the below thread.
    Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S
    Getting Dump in the select query has more than 2000 entries
    Hope this will work for you .
    regards,
    Rajesh Sadula.

  • How to get the Database Type quan in my internal table?

    Hi, I have the following problem, I have a Database Table with a column foo (QUAN with length 15 and 3 dec). Now I want to read this field into a Internal Table and the corrospoding field is:
    foo(19) TYPE C,
    But this is not working I'm getting the dump:
    DBIF_RSQL_INVALID_RSQL
    CX_SY_OPEN_SQL_DB
    What is the correct abap type in my structure to put this QUAN in my internal table?

    Hi Michael,
         when you know your data base field name then u can define your variable f00 of your db field type like
         foo type <dbtabname>-<fieldname)  -----ex -- j_1iexcdtl-menge
         or define foo as packed no
         data : foo(19) type p decimals 3.
    Regards

Maybe you are looking for

  • Public-facing on-premises SharePoint with NTLM authentication

    I've been searching for authentication best practices for public-facing SharePoint site but I didn't find any useful resources on the issue that is troubling me. Assume I set up a web application with Classic NTLM authentication. On that web applicat

  • Creating a Price in 1 table, determined by data contained in multiple other tables.

    Hi I'm trying to construct a quote tool for my resellers and partners. My software product has a different selling price determined by the licence type, licence size and some vertical market positioning. In my example, if my partner ticks the box for

  • OAB - Certifications : Action Item Due Date

    Hi, Does anyone know how to setup Due Date for the Action Type based on certain conditions? For eg Birth Certificate - 3 Months Marriage Certificate - 45 days etc Thanks in advance

  • Export illustrator file to exact dimensions

    I have an illustrator document with the art-board size at 1000x1000 px and I need it to be exactly that but when I export as a png, it exports at ~ 4000x4000 px, even if I tick "use art-boards." What is the problem and how do I fix it? I am using ill

  • IBM JRE 1.2.2 - NullPointerException

    Hi All, anyone knows the solution to this : ??? We need to use WebStart in connection with IBM WebSphere and IBM-JRE 1.2.2 on the client side. The JRE is installed well, an is used by webstart. WebStart shows "Starting Application" and hangs. I alway