02-27-2007 2:09 PM
Hello,
When i am executing my program one system, it working fine for the below select statement. But while testing the same in another system we are having a runtime error 'DBIF_RSQL_INVALID_RSQL' 'RSQL error 13 when accessing table "EBAN ".
the select statement is as follows:
SELECT
menge
lfdat
matnr
FROM eban
INTO CORRESPONDING FIELDS OF TABLE i_pr_items
WHERE bsart EQ c_bsart1
AND bstyp EQ c_bstyp1
AND loekz EQ space
AND werks IN s_plant
AND matnr IN s_matnr
AND ebakz NE c_check.
can anyone help me in this please.
thanks a lot
regards
Nitin
02-27-2007 2:21 PM
Hi
<b>I guess the Internal table - i_pr_items[] is not compatible here.</b>
<u>Please paste the declaration of i_pr_items internal table as well.
Also, paste the detailed Shortdump from ST22 transaction.</u>
Hope this will help.
Please reward suitable points.
Regards
- Atul
02-27-2007 2:32 PM
Hi Atul,
thanks for the response.
declaration of internal table: i_pr_items TYPE STANDARD TABLE OF t_pr_items,
the details error in ST22:
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "F_SELECT_PR_MATERIALS" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The SQL statement generated from ABAP/4 Open SQL violates a
restriction imposed by the database system used in R/3.
You can usually find details in the system log and in developer
trace. The following error scenarios may be database-specific:
-
ORACLE
-
The maximum size of an SQL statement has been exceeded. In Oracle
6.* this is 8 KB, in Oracle 7.* 64 KB.
The Native SQL statement generated from an ABAP/4 Open SQL statement
must not take up more than the permitted space.
THANKS A LOT
Regards,
Nitin
02-27-2007 2:35 PM
Hi
Also paste the declaration of t_pr_items table.
Hope this will help.
Please reward suitable points.
Regards
- Atul
02-27-2007 2:40 PM
TYPES: BEGIN OF t_pr_items,
matnr LIKE eban-matnr,
menge LIKE eban-menge,
lfdat LIKE eban-lfdat,
END OF t_pr_items.
02-27-2007 2:24 PM
One of these 3 fields menge lfdat matnr declaration is not compatible in the internal table with the database fields, pls show declaration
02-27-2007 2:40 PM
Hi,
declaration of types:
TYPES: BEGIN OF t_pr_items,
matnr LIKE eban-matnr,
menge LIKE eban-menge,
lfdat LIKE eban-lfdat,
END OF t_pr_items.
thanks
02-27-2007 2:34 PM
can you check how many entries are populated in ur select options s_matnr and s_plant , it should not exceed more than 1630
02-27-2007 2:43 PM
hi,
i think the varaiables, select-options, parameters used in the where condition is not of the type of the field they are compared with. just declare those variables of type of the field to whihc it is compared
02-27-2007 6:18 PM
I think you are passing too many entries in either S_MATNR or S_PLANT.
there is a limit to overall length of where clause passed to DB.
workaround would be
- either split your s_matnr into smaller chunks (define ranges, pass <=300...400 entries from s_matnr to the range, then select appending internal table, do it until you process all entries in s_matnr.).
- or, if you do not use intervals in your s_matnr (just single values) - use select for all entries in s_matnr where matnr = s_matnr-low.