"System Resource Exceeded" for simple select query in Access 2013
Using Access 2013 32-bit on a Windows Server 2008 R2 Enterprise. This computer has
8 GB of RAM.
I am getting:
"System Resource Exceeded" errors in two different databases
for simple queries like:
SELECT FROM .... GROUP BY ...
UPDATE... SET ... WHERE ...
I compacted the databases several times, no result. One database size is approx 1 GB, the other one is approx. 600 MB.
I didn't have any problems in Office 2010
so I had to revert to this version.
Please advise.
Regards,
M.R.
Hi Greg. I too am running Access on an RDP server. Checking Task Manager, I can see many copies of MSACCESS running in the process list, from all users on the server. We typically have 40-60 users on that server. I am only changing the Processor Affinity
for MY copy, and only when I run into this problem. Restarting Access daily, I always get back to multi-processor mode soon thereafter.
As this problem only seems to happen on very large Access table updates, and as there are only three of us performing those kind of updates, we have good control on who might want to change the affinity setting to solve this problem. However, I
understand that in other environments this might not be a good solution. In my case, we have 16 processors on the server, so I always take #1, my co-worker here in the US always takes #2, etc. This works for us, and I am only describing it here in case it
works for someone else.
The big question in my mind is what multi-threading methods are employed by Microsoft for Access that would cause this problem for very large datasets. Processing time for an update query on, say, 2 million records is massively improved by going down
to 1 processor. The problem is easily reproduced, and so far I have not seen it in Excel even when working with very large worksheets. Also have not seen it in MS SQL. It is just happening in Access.
Similar Messages
-
Simple SELECT query to generate INSERT for a table
Hi,
I am looking for a SELECT query which generates INSERT statements for a table.Please guide.
Thanks
PG.Like this?
SQL> SELECT * from kons;
COL1 COL2
1 1
2 2
SQL> SELECT 'INSERT INTO kons VALUES('||col1||','||col2||');' statement FROM kons;
STATEMENT
INSERT INTO kons VALUES(1,1);
INSERT INTO kons VALUES(2,2);
SQL> If you have character and / or date columns you will have to change my example,
but you might get the idea from it.
You can spool the result to a file.
Regards,
Guido
Edit: ';' added to end of statement... -
Error 2950 System Resource Exceeded
Hello Team,
I am going to set warning to No for a series of queries that they need to run one after the other and then at then end to add text message and then set warning to yes. But I get an error message: Error 2950 System Resource Exceeded.
How can I resolve this question?
GGGGGNNNNN
GGGGGNNNNNHi GN,
>> set warning to No for a series of queries that they need to run one after the other and then at then end to add text message and then set warning to yes
Could you share us a simple demo to reproduce your issue? I made a research about "Error 2950 System Resource Exceeded" and found it might be caused by the complexity of the query.
I think you could try the steps as following to troubleshoot this issue.
#1 Just run the series of queries one by one to check whether the query could work correctly.
#2 Just set the warning to No and the warning to yes with one simple query.
If you find it was caused by one query, I think you need to change your query to many simple queries and the link below might be useful to you.
# Error message when you run a query in Access 2007: "System Resource Exceeded" or "Query is too complex"
https://support.microsoft.com/kb/918814?wa=wsignin1.0
In addition, it would be helpful if you could share us a simple demo to reproduce your issue.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
Access 2010 warn "System Resources Exceeded" when change machine
My Access file has 1.2GB and need to run a lot of simple Update SQLs. The program run well on my old PC.
I recently change the PC from Core 2 Due to I5-4570S. The Access
warn "System Resources Exceeded" when running. I use the old PC to run and it is ok.
My old PC is E7500 2 GB ram, Win 7 (64bit) + Office 2010 (64bit). New PC is I5-4570S with 8GB ram, with same OS and Office. Why the system resources would exceeded on my new machine?
I searched many websites for this and cannot find a well solution. Does anyone know how to solve it?
I have posted this question on Access 2010 help forum before, please refer to:
http://social.msdn.microsoft.com/Forums/office/en-US/60810447-2f18-452e-b752-c23bda4a67aa/access-2010-warn-system-resources-exceeded-when-change-machine?forum=accessdevI don't use ODBC. I use ADO with ACE connection string to connect database.
The Access version of new pc is newer than my old pc already.
I tried in different PCs with different setting and found that in 2GB ram, the program is stable. If 4GB or above, the error appeared.
The error does not appear at the same command all the time. It may not appear sometimes. If I try to compact the database and re-run the command, it may pass, but not always. -
A simple select query taking forever
Hi All
I am not able to execute a simple select query, I traced my session and here is TKPROF of that Trace.
Solaris 8 , Oracle 10.2.0.4.0
TKPROF: Release 10.2.0.4.0 -
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: 502_ora_28260.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
select OBJECT_ID , ORACLE_USERNAME , SESSION_ID
from
v$locked_object
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.03 32.86 0 0 6 0
total 3 0.03 32.86 0 0 6 0
Misses in library cache during parse: 1
Optimizer mode: CHOOSE
Parsing user id: SYS
Rows Row Source Operation
0 MERGE JOIN (cr=0 pr=0 pw=0 time=60 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=58 us)
0 MERGE JOIN (cr=0 pr=0 pw=0 time=42 us)
1 SORT JOIN (cr=0 pr=0 pw=0 time=2443 us)
1105 FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=1204 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=41 us)
1001 FIXED TABLE FULL X$KTCXB (cr=0 pr=0 pw=0 time=16132 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us)
0 FIXED TABLE FULL X$KTADM (cr=0 pr=0 pw=0 time=0 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
buffer busy waits 34 0.97 32.83
SQL*Net break/reset to client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.03 32.86 0 0 6 0
total 3 0.03 32.86 0 0 6 0
Misses in library cache during parse: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 1 19.00 19.00
buffer busy waits 34 0.97 32.83
SQL*Net break/reset to client 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
1 user SQL statements in session.
0 internal SQL statements in session.
1 SQL statements in session.
Trace file: 502_ora_28260.trc
Trace file compatibility: 10.01.00
Sort options: default
0 session in tracefile.
1 user SQL statements in trace file.
0 internal SQL statements in trace file.
1 SQL statements in trace file.
1 unique SQL statements in trace file.
64 lines in trace file.
32 elapsed seconds in trace file. There is nothing fishy in alert logs... Please guide
ThanksThere it is TOP
$ RUMPSHAKER>top
load averages: 6.63, 7.45, 7.88; up 33+12:02:33
3631 processes: 3616 sleeping, 5 zombie, 1 stopped, 9 on cpu
CPU states: 58.6% idle, 18.2% user, 23.2% kernel, 0.0% iowait, 0.0% swap
Memory: 192G phys mem, 92G free mem, 96G swap, 96G free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
13752 ora0005 1 19 0 4243M 4219M sleep 5:21 62.78% oracle
17758 ora0005 1 25 0 1174M 1156M cpu 1:05 37.12% oracle
17923 root 1 57 0 18M 14M sleep 689:07 13.59% ecap_monitor
20777 root 12 58 0 14M 13M sleep 864:33 11.55% OracleAgent
18884 ora0004 1 1 0 830M 813M sleep 0:01 9.54% oracle
12070 ora0004 61 58 0 320M 315M sleep 28.5H 8.29% emagent
20347 root 16 59 0 33M 25M sleep 26.0H 6.34% caiUxsA2
17949 ist0005 1 53 0 7984K 4984K cpu 0:00 3.93% top
1 root 1 59 0 2912K 1288K sleep 32.2H 3.75% init
15035 ora0001 1 46 0 32M 22M sleep 166:43 2.98% tnslsnr
5748 ora0004 11 54 0 516M 496M sleep 389:37 2.78% oracle
20567 ora0004 1 55 0 27M 22M sleep 0:00 2.69% sqlplus
6730 ora0001 1 33 0 632M 616M sleep 0:06 2.67% oracle
20557 ora0004 1 56 0 27M 23M sleep 0:00 2.53% sqlplus
5355 ora0005 1 59 0 1154M 1137M sleep 0:04 2.46% oracleand VMSTAT 2 5
$ RUMPSHAKER> vmstat 2 5
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 sd in sy cs us sy id
6 8 0 143125576 74272080 4628 24012 488 150 149 0 0 4 4 -2 0 25037 192698 65249 38 26 36
1 3 0 162803992 95246464 1989 6989 0 4 4 0 0 6 6 0 0 9170 57822 26434 8 13 79
1 7 0 162801352 95240296 3043 15633 4 9737 9682 0 0 0 0 0 0 11277 73516 38200 16 16 68
3 10 0 162801560 95227920 3326 12729 16 16862 16774 0 0 1 1 0 0 11377 86054 44758 16 17 68
1 10 0 162784520 95186488 9638 48359 24 11682 11626 0 0 13 13 0 0 13484 149366 44205 23 29 47 -
Runtime error(Time limit exceeds)after executing select query
Dear experts, whenever i executing the select query in this zprogram i am getting runtime error that time limit exceeds.i am using inner join and into table.after that also i am geetting error. how can i resolve it??
SELECT LIKP~VBELN LIKP~WADAT_IST LIKP~VEHICLE_NO LIKP~TRNAME
LIKP~VEHI_TYPE LIKP~LR_NO LIKP~ANZPK LIKP~W_BILL_NO
LIKP~SEALNO1 " Seal NO1
LIKP~SEALNO2 " Seal NO2
LIPS~LFIMG
VBRP~VBELN VBRP~VGBEL VBRP~MATNR VBRP~AUBEL VBRP~FKIMG
VBAK~AUART
VBRK~FKART VBRK~KNUMV VBRK~FKSTO
FROM LIKP INNER JOIN LIPS ON LIKP~VBELN EQ LIPS~VBELN
INNER JOIN VBRP ON LIKP~VBELN EQ VBRP~VGBEL
INNER JOIN VBAK ON VBRP~AUBEL EQ VBAK~VBELN
INNER JOIN VBRK ON VBRP~VBELN EQ VBRK~VBELN
INTO TABLE I_FINAL_TEMP
WHERE LIKP~VSTEL = '5100' AND
LIKP~WADAT_IST IN S_WADAT AND
VBRP~AUBEL IN S_AUBEL AND
VBAK~AUART IN ('ZJOB','ZOR') AND
VBRK~FKART IN S_FKART AND
* VBRK~FKART IN ('ZF8','ZF2','ZS1') AND
VBRK~FKSTO NE 'X'.
When I am debugging the select query.the cursor will not go to next step.after 15-20 minutes i am getting runtime error(time limit exceeds).
how can i resolve it for that scenario??Looks like whole SD flow you trying to fetch in single query
First you check the database statistic of these table are upto date in system ( Check with basis team )
if this query was working fine earlier.
Most of table involved are huge volume tables which queried with any primary key
Any secondary index on created for LIKP on VSTEL WADET ?
My suggestion would be split the selection queries and make use of primary or existing secondary index to fetch the desired result if possible. For testing purpose split the queries and find which is taking more time and which needs index by taking squel trace in ST05.
Also take ST05 trace of this query in debugger ( New debugger -> special tool -> trace > ST05/SE30) -
Simple Select Query Taking 5-10s
We have a web server on the same lan as the DB server.
A simple select * from tablename (~100 entries) is taking
anywhere from 30ms to 10 seconds lan. ASP code on the web server
provides instant (30ms) queries. Ping is never <1ms. If I point
to a remote DB server, the same query is never more than 300ms
(which is great for over the internet).
I enabled logging in CFAdmin -> Datasources and shortly
after my select * from tablename I see this:
spy(2009/02/28 16:39:00.539)>>
Connection[2].setReadOnly(boolean readOnly)
spy(2009/02/28 16:39:00.539)>> readOnly = false
spy(2009/02/28 16:39:00.539)>> OK
spy(2009/02/28 16:39:05.726)>> OK (true)
We need to get this up and running ASAP. Please help!!> I'm connecting to SQL Server 2000 on a Win2k3 box.
> The default CF8 Installation.
> Every table this happens for.
OK. I think CF8 runs the most recent JDBC drivers too. It
might pay to
check that though.
> Select * is needed, because we have existing sites we
are migrating a lot of
> which use select *.
Sure. But just for the purposes of experimentation, change
your test code
to specify columns to see if it makes any difference.
It might pay to get hold of FusionReactor to check what CF is
doing with
the queries, under the hood.
Adam -
Need help in optimisation for a select query on a large table
Hi Gurus
Please help in optimising the code. It takes 1 hr for 3-4000 records. Its very slow.
My Select is reading from a table which contains 10 Million records.
I am writing the select on large table and Retrieving the values from large tables by comparing my table which has 3-4 k records.
I am pasting the code. please help
Data: wa_i_tab1 type tys_tg_1 .
DATA: i_tab TYPE STANDARD TABLE OF tys_tg_1.
Data : wa_result_pkg type tys_tg_1,
wa_result_pkg1 type tys_tg_1.
SELECT /BIC/ZSETLRUN AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1 from
/BIC/PZREB_SDAT *******************THIS TABLE CONTAINS 10 MILLION RECORDS
into CORRESPONDING FIELDS OF table i_tab
FOR ALL ENTRIES IN RESULT_PACKAGE***************CONTAINS 3000-4000 RECORDS
where
/bic/ZREB_SDAT = RESULT_PACKAGE-/BIC/ZREB_SDAT
AND
AGREEMENT = RESULT_PACKAGE-AGREEMENT
AND /BIC/ZLITEM1 = RESULT_PACKAGE-/BIC/ZLITEM1.
sort RESULT_PACKAGE by AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1.
sort i_tab by AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1.
loop at RESULT_PACKAGE into wa_result_pkg.
read TABLE i_tab INTO wa_i_tab1 with key
/BIC/ZREB_SDAT =
wa_result_pkg-/BIC/ZREB_SDAT
AGREEMENT = wa_result_pkg-AGREEMENT
/BIC/ZLITEM1 = wa_result_pkg-/BIC/ZLITEM1.
IF SY-SUBRC = 0.
move wa_i_tab1-/BIC/ZSETLRUN to
wa_result_pkg-/BIC/ZSETLRUN.
wa_result_pkg1-/BIC/ZSETLRUN = wa_result_pkg-/BIC/ZSETLRUN.
modify RESULT_PACKAGE from wa_result_pkg1
TRANSPORTING /BIC/ZSETLRUN.
ENDIF.
CLEAR: wa_i_tab1,wa_result_pkg1,wa_result_pkg.
endloop.Hi,
1) RESULT_PACKAGE internal table contains any duplicate records or not bassed on the where condotion like below
2) Remove the into CORRESPONDING FIELDS OF table instead of that into table use.
refer the below code is
RESULT_PACKAGE1[] = RESULT_PACKAGE[].
sort RESULT_PACKAGE1 by /BIC/ZREB_SDAT AGREEMENT /BIC/ZLITEM1.
delete adjustant duplicate form RESULT_PACKAGE1 comparing /BIC/ZREB_SDAT AGREEMENT /BIC/ZLITEM1.
SELECT /BIC/ZSETLRUN AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1
from /BIC/PZREB_SDAT
into table i_tab
FOR ALL ENTRIES IN RESULT_PACKAGE1
where
/bic/ZREB_SDAT = RESULT_PACKAGE1-/BIC/ZREB_SDAT
AND
AGREEMENT = RESULT_PACKAGE1-AGREEMENT
AND /BIC/ZLITEM1 = RESULT_PACKAGE1-/BIC/ZLITEM1.
and one more thing your getting 10 million records so use package size in you select query.
Refer the following link also For All Entry for 1 Million Records
Regards,
Dhina..
Edited by: Dhina DMD on Sep 15, 2011 7:17 AM -
I need to know the proper syntax for my SELECT query, please.
Hello All,
Quick one for you:
Let's say that I have several columns in a table with names such as subject_1, subject_2, subject_3, etc. The table's name is subject_names.
The number in each of the three column name examples is also a value passed along a query string, the user can select choices, 1, 2 or 3. That query string's variable is $qs.
So, what I want is a SELECT query that uses the query string value as follows (KEEP IN MIND, I know this is not the proper syntax):
"SELECT subject_[$qs]
FROM subject_names";
I have tried all sorts of cominations of quotes (single and double), dots, brackets, braces and parenthesis. I just want to know how to include such a variable within this code.
Any and all help is sincerely appreciated!
Cheers,
wordmanWell, I did give you the syntax though.
$query = 'SELECT ' . $qs . ' FROM tbl_name';
I put spaces between the periods this time to make it more clear.
If you put the actual word 'subject' in there and just want your form to name it's options as the numbers available you could do this:
$query = 'SELECT subject_' . $qs . ' FROM tbl_name';
In PHP you can use either single or double quotes around your query string, I always just use single quotes. I see a lot of other use double quotes.
Double quotes would look like:
$query = "SELECT subject_' . $qs . ' FROM tbl_name";
Or when using double quotes you can actually just place the variable right in the string without having to concatenate multiple strings like above.
Since you mentioned that you are good with passing variables I probably don't have to mention that you need to set the value attribute of your option tags (if you are using a select) to the value you want them to pass.
Ex:
<select name="choices">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
If you have that part all figured out then you can use the syntax above for your query string.
Good luck. -
Hi Gurus,
I have a select query as follows:
SELECT
vbap~vbeln
vbap~posnr
vbap~matnr
vbap~arktx
vbap~pstyv
vbap~abgru
vbap~prodh
vbap~netwr
vbap~werks
vbap~kwmeng
vbap~prctr
vbap~ps_psp_pnr
FROM vbap
INTO TABLE i_item_vbap
FOR ALL ENTRIES IN i_reg_vbak
WHERE
vbap~vbeln EQ i_reg_vbak-vbeln AND
vbap~matnr IN s_matnr AND
vbap~werks IN s_werks .
However, when I execute the program, I get the dump saying as:
I get this exception "DBIF_RSQL_INVALID_RSQL", assigned to CLASS "CX_SY_OPEN_SQL_DB"
Please help me in understanding this.
Also, there are only 85 entries in i_reg_vbak, plus not many values are there for s_matnr and s_werks.
I tried executing this query w/o for all entries, but still it gave a dump.
Waiting for your reply, thanks!hello
SELECT
vbap~vbeln
vbap~posnr
vbap~matnr
vbap~arktx
vbap~pstyv
vbap~abgru
vbap~prodh
vbap~netwr
vbap~werks
vbap~kwmeng
vbap~prctr
vbap~ps_psp_pnr
from vbap into corresponding fields of table it_vbap.
if u use any fields of vbap on selection scrren then mention as
eg: where vbeln in s_vbeln etc.
with regards,
sumanth reddy -
How can replace IF condition for a Select query in my reports?
IF s_bukrs-LOW = '4312' OR s_bukrs-LOW = '4313' OR s_bukrs-LOW = '4349' .
ELSEIF s_bukrs-LOW = '4310' OR s_bukrs-LOW = '4311' OR s_bukrs-LOW = '4587'.
ENDIF.
What if I want to use select query in place of IF condition, in my report for a Z -table in which I have made entries of ZZUSEREXIT-my progam name ,VAR1-4310,VAR2-4311,VAR3-4312,VAR4-4313,VAR5-4349,VAR6-4587?HI
U can do this by two ways-
(1) Using Two SELECT statementsie. one for IF statements and second for ELSEIF statements.
Like--
SELECT < field name>,
WHERE s_bukrs-LOW = '4312' OR s_bukrs-LOW = '4313' OR s_bukrs-LOW = '4349'
SELECT < field name>,
WHERE s_bukrs-LOW = '4310' OR s_bukrs-LOW = '4311' OR s_bukrs-LOW = '4587'.
(2) U can do this in using IF with select statements.
This will help u -
Simple select query is taking a lot of time
hi gems...
my table has 7267563 rows...and i am doing a simple select * from table;
but it is taking a lot of time nearly 25minutes but not completed...
when i did select count(1) from table then it gave the result instantly also select * from table where rownum < 10 is also fine...even when i am selecting all the records using rownum i.e. select * from table where rownum < 7267563 is also giving result instantly...
but the entire table is not getting result i.e. select * from table...also there is no lock in the table(though i know that select is nothing to do with lock)..
what may be the issue..please suggest...thanks in advance...
Edited by: user12780416 on Dec 12, 2011 11:08 PMHi;
Please see below thread
query takes too long ...
help in solving long run query
HOW TO: Post a SQL statement tuning request - template posting
Hope it helps
Regard
Helios -
NullPointerException on System.arraycopy command while executing select query in Oracle 10
I'm getting this error below while trying to execute some select query.
java.lang.NullPointerException at java.lang.System.arrayCopy(Native Method) at
oracle jdbc.driver.T4CNumberAccessor.saveDataFromOldDefineBuffers(T4CNumberAccessor.java:276) at
oracle.jdbc.driver.T4CPreparedStatement.saveDefineBuffersIfRequired(T4cPreparedStatement.java:486) at
oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:919) at
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(T4CPreparedStatement:836) at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1124) at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3286) at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329) at
I've already downloaded the latest ojdbc5.jar file to access Oracle 10 database.
This is my java version:
bash$java -version
HEAP_DUMP_OPTIONS= -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../Logs -XX:+PrintClassHistogram
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)
Any idea of what may cause this problem?No one can debug code that they can't see.
You need to SHOW US (not just tell us):
1. WHAT you are doing
2. HOW you are doing it
3. WHAT result you are getting
4. WHAT result you expected to get.
The latest JDBC jar that can access Oracle 10 DBs is the 12.1.0.2 driver and is available here:
JDBC/UCP Download Page -
Short Dump for Dynamic Select Query
Hello all,
I get a short dump for my dynamic select query at the end of the code. The error is "The types of operands "dbtab" and "itab" cannot be converted into one another."
My code looks like below.
FORM get_ccnum_2 USING p_tabname TYPE dd03l-tabname.
DATA: p_table(30) TYPE c.
FIELD-SYMBOLS: <dyn_wa>,
<t> TYPE table.
DATA: it_fldcat TYPE lvc_t_fcat.
TYPE-POOLS : abap.
DATA: it_details TYPE abap_compdescr_tab,
wa_details TYPE abap_compdescr.
DATA: ref_descr TYPE REF TO cl_abap_structdescr.
DATA: new_table TYPE REF TO data,
new_line TYPE REF TO data,
wa_it_fldcat TYPE lvc_s_fcat.
p_table = p_tabname.
ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
it_details[] = ref_descr->components[].
LOOP AT it_details INTO wa_details.
CLEAR wa_it_fldcat.
wa_it_fldcat-fieldname = wa_details-name .
wa_it_fldcat-datatype = wa_details-type_kind.
wa_it_fldcat-intlen = wa_details-length.
wa_it_fldcat-decimals = wa_details-decimals.
APPEND wa_it_fldcat TO it_fldcat .
ENDLOOP.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <t>.
CREATE DATA new_line LIKE LINE OF <t>.
ASSIGN new_line->* TO <dyn_wa>.
wa_cond = 'CCNUM <> '' '' '.
APPEND wa_cond TO tab_cond.
SELECT * INTO TABLE <t>
FROM (p_table)
WHERE (tab_cond)
ORDER BY (tab_ord).
ENDFORM. " GET_CCNUM_2Hi,
I tried to execute the code using table BSEGC and it gave a short dump..
the actual exception that shows in ST22 IS ..UNICODE_TYPES_NOT_CONVERTIBLE..
I think there is something wrong in the internal table creation..
Instead of using the method cl_alv_table_create=>create_dynamic_table to create the dynamic table I used the following and it worked..
CREATE DATA new_table TYPE TABLE OF (p_table).
* Comment begin " Naren
* ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
* it_details[] = ref_descr->components[].
* LOOP AT it_details INTO wa_details.
* CLEAR wa_it_fldcat.
* wa_it_fldcat-fieldname = wa_details-name .
* wa_it_fldcat-datatype = wa_details-type_kind.
* wa_it_fldcat-intlen = wa_details-length.
* wa_it_fldcat-decimals = wa_details-decimals.
* APPEND wa_it_fldcat TO it_fldcat .
* ENDLOOP.
* CALL METHOD cl_alv_table_create=>create_dynamic_table
* EXPORTING
* it_fieldcatalog = it_fldcat
* IMPORTING
* ep_table = new_table.
* Comment End. " Naren
CREATE DATA new_table TYPE TABLE OF (p_table). " New code by naren
Please Try this..
Thanks
Naren -
Problem with SImple Select Query
Hi
I am trying to write a simple Select SQL to a table and find out whether certain data exist or not. I have done this before but now for some reason this one is not working.
I started like this
select single * from ANLH where ANLN1 = rec-Asset
and BUKRS = Comp_Cd.
* Error Handler for non-existent empno in the database
if sy-subrc = 0 or rec-asset = ''.
rec_failed = 'T'.
concatenate 'Asset does not exist' rec-asset into asst_err.
endif.
when i debugged the code i found out that sy-subrc is returning 4 all the time. (i have passes some numbers in rec-Asset which i know doesn't exist in that table.
So i have modified the code to see if its pulling anything.
like this
select single ANLN1 into v_Asset from ANLH where ANLN1 = rec-Asset
and BUKRS = Comp_Cd.
* Error Handler for non-existent empno in the database
if sy-subrc = 0 or rec-asset = ''.
rec_failed = 'T'.
concatenate 'Asset does not exist' rec-asset into asst_err.
endif.
in debug v_asset is always empty (for real number and for the madeup number)
Please help.
Thanks
Edited by: Anwarul Kabir on Apr 3, 2008 9:27 PM
Edited by: Anwarul Kabir on Apr 3, 2008 9:29 PM
Edited by: Anwarul Kabir on Apr 3, 2008 9:30 PMThanks for the answer. But i thought i was doing the same. Anyway I replaced my code with yours but result is the same. I also did this
select single
ANLN1 into v_Asset
from ANLH where
ANLN1 = '20000544'
and BUKRS = '3000'.
I did SE11 and entered the table name and i can see that data.
but on my code i get sy-subrc=4 and v_Asset is blank
again i tried with this madeup number which i know its not in the table
select single
ANLN1 into v_Asset
from ANLH where
ANLN1 = '2056555433544'
and BUKRS = '3000'.
Get sy-subrc=4 and v_Asset is blank...
Is there anything special about the Table?
Maybe you are looking for
-
HP 8600 constantly goes offline on Windows 8
Does anyone have any tips on why my HP 8600 keeps showing that it is offline on Windows 8? I have two machines running Windows 8 and both show the printer offline. I also have a mac, ipad and another computer running Windows 7 - and each of these can
-
Hi, did anybody try to install windows 8.1 on an imac mid 2007?
hi, did anybody try to install windows 8.1 on an imac mid 2007? is it absolutely impossible? Thank you V
-
The precondition on the request for the URL / evaluated to false
Hi, I get error message when connect on secure 443 port: "The precondition on the request for the URL / evaluated to false." Problem in: <Location /> SetHandler weblogic-handler WLExcludePathOrMimeType /DocumentServer </Location> It works in httpd.co
-
HT2523 Word docx file conversion and saving problems
I've recently switched back to Mac after many years as a Windows user. I was delighted to be able to open my Word documents in TextEdit, but have had to reformat certain parts of the documents (specifically, bullets, tabs, and wrap to page) EVERY TIM
-
Set deletion flag for Order before releasing the order
Hi all, can we set the Deletion Flag for an order before release of that order. Regards, Bhanu.