Getting sort Dump on select Query
Hi expert,
I m new in abap i m getting short dump on
*& Report ZREAD_ITAB *
REPORT ZREAD_ITAB .
TABLES : MARC,MARA,MAKT.
SELECT-OPTIONS S_MATNR FOR MARC-MATNR .
PARAMETER P_WERKS LIKE MARC-WERKS.
DATA T_MARC LIKE MARC OCCURS 0 WITH HEADER LINE.
DATA T_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
DATA T_MAKT LIKE MAKT OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
MBRSH LIKE MARA-MBRSH,
MEINS LIKE MARA-MEINS,
MATKL LIKE MARA-MATKL,
MAKTX LIKE MAKT-MAKTX,
SPRAS LIKE MAKT-SPRAS,
END OF ITAB.
SELECT MATNR WERKS LVORM FROM MARC INTO CORRESPONDING FIELDS OF TABLE
T_MARC WHERE MATNR IN
S_MATNR AND WERKS = P_WERKS.
IF T_MARC[] IS NOT INITIAL.
*this line)- SELECT MATNR MBRSH MEINS MATKL FROM MARA INTO T_MARA
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR.
endselect.
SELECT MATNR MAKTX SPRAS FROM MAKT INTO CORRESPONDING FIELDS OF
T_MAKT FOR ALL ENTRIES IN T_MARC WHERE MATNR =
T_MARC-MATNR.
endselect.
LOOP AT T_MARC.
READ TABLE T_MARA WITH KEY MATNR = T_MARC-MATNR.
MOVE :
T_MARC-MATNR TO ITAB-MATNR,
T_MARC-WERKS TO ITAB-WERKS.
READ TABLE T_MAKT WITH KEY MATNR = T_MARC-MATNR.
MOVE :
T_MARA-MBRSH TO ITAB-MBRSH,
T_MARA-MEINS TO ITAB-MEINS,
T_MARA-MATKL TO ITAB-MATKL,
T_MAKT-MAKTX TO ITAB-MAKTX,
T_MAKT-SPRAS TO ITAB-SPRAS.
ENDLOOP.
ELSE .
WRITE:/ 'NO DATA FOUND'.
ENDIF.
Please solve.
Regards ,
Ashish
Hi,
In addition to above code, you need to place the mandatory check when using for all entries for checking the driver table is initial or not. If T_MARC[] IS INITIAL, all the entries from MARA will be selected.
IF NOT T_MARC[] IS INITIAL. "Mandatory check
SELECT MATNR MBRSH MEINS MATKL FROM MARA INTO CORRESPONDING FIELDS OF TABLE T_MARA
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR.
SELECT MATNR MAKTX SPRAS FROM MAKT INTO CORRESPONDING FIELDS OF TABLE T_MAKT
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR AND SPRAS = SY-LANGU.
ENDIF.
Thanks,
Vinod.
Similar Messages
-
Hi Experts ,
The following select query creates a dump called time out error, May be this is taking long time to execute . Please tell me how to fine tune this select query?
select v1vbeln v2matnr
v2werks v1fkdat
v1knumv v1fkart
v1sfakn v2posnr
v2vgbel v2ntgew
v2gewei v1land1
v2autyp v1vbtyp
v1~vkorg
v1~vtweg
v1~spart
into table i_billing
from vbrk as v1 inner join
vbrp as v2 on
v1vbeln = v2vbeln
where v1~vbeln in so_vbeln
and v1~vkorg in so_vkorg
and v1~vtweg in so_vtweg
and v1~spart eq p_spart
and v1~fkart in so_fkart
and v1~fkdat in so_fkdat
and v1~vbeln in so_vbeln
and ( v1~vbtyp eq '5'
or v1~vbtyp eq '6'
or v1~vbtyp eq 'M'
or v1~vbtyp eq 'S'
or v1~vbtyp eq 'N'
or v1~vbtyp eq 'O' )
and ( v2~vgtyp eq 'J'
or v2~vgtyp eq 'T' )
If is a kit o a dis only get positions
and ( ( v2~zzkit eq '' and
v2~zzdis eq '' )
or ( ( v2~zzkit ne '' or
v2~zzdis ne '' ) and
( v2~uepos <> '000000' ) ) ).
Thanks in advance .hi,
post it on ABAP forum and not on PI forum
Regards,
Michal Krawczyk -
Getting Time-Out at Select Query
Dear All,
I am getting Time-Out at particular Select Query.
This error i am getting since last 3 days, before it was working fine. And there is no any change made to program in last 3 days.
select a~qmnum
matnr
kunum
iwerk
spart
into corresponding fields of iviqmel
from ( qmih as a
inner join qmel as b on b~qmnum = a~qmnum )
for all entries in i_tab
where qmart in ('FS', 'ZP')
and iwerk = i_tab-iwerk
and matnr = i_tab-matnr
and kunum = i_tab-kunum
and spart = i_tab-spart.
append iviqmel.
endselect.
In Program table QMEL also using the proper Index.
Can you please give me any suggestion that how to come out from this issue.
Regards,
DharmeshHi Rob,
I run the SQL Trace also, Query is using correct Index.
and I had also chenge the select query.
if not i_tab[] is initial.
select a~matnr a~kunum a~spart
b~qmnum b~iwerk
into corresponding fields of table iviqmel
from qmel as a inner join
qmih as b
on a~qmnum = b~qmnum
for all entries in i_tab
where a~qmart in ('FS', 'ZP')
and a~matnr = i_tab-matnr
and a~kunum = i_tab-kunum
and a~spart = i_tab-spart
and b~iwerk = i_tab-iwerk.
endif.
even its geving time out error.
Regards,
Dharmesh -
How to get result of select query from oracle in VC
Dear All ,
I have a application in oracle which insert the data in the oracle database table.
Now i want to show all the data that has been inserted into the database table in my VC application but i don't know how to handle select query in VC.
Regards
KrishanHi Goivndu
Thanks for your reply .
I know all those things.
I have created the system & alias for my backend oracle system.
I can also see all the stored procedure that are there in my oracle system.
I just want to know how to write a select query in a stored procedure .
you can insert data , Update data through oracle procedure but i don't think there is any way to get the result of select query in stored procedure .
If you know any way to do that please do let me know .
Regards
Krishan -
Problem in SAP SET while firing select query
Hi Experts,
please check my code below
DATA: BEGIN OF ibsis OCCURS 100,
ebeln LIKE bseg-ebeln,
ebelp LIKE bseg-ebelp,
bsis LIKE bsis,
ldgrp TYPE fagl_ldgrp.
DATA: END OF ibsis.
TYPES : BEGIN OF TY_ZFINITEMCAT,
pstyv TYPE vbap-pstyv,
END OF TY_ZFINITEMCAT.
DATA : GT_ZFINITEMCAT TYPE STANDARD TABLE OF TY_ZFINITEMCAT.
FIELD-SYMBOLS : <fs_ZFINITEMCAT> TYPE TY_ZFINITEMCAT.
DATA: l_item_catecory TYPE pstyv.
SELECT VALFROM
INTO TABLE GT_ZFINITEMCAT
FROM SETLEAF
WHERE SETNAME EQ 'ZFIN_ITEMCAT'.
LOOP AT ct_ibsis[] ASSIGNING <ibsis>.
"Check if we can find one item of the wrong category, if so then we remove the documents.
SELECT SINGLE pstyv INTO l_item_catecory
FROM vbap
WHERE vbeln = <ibsis>-bsis-zuonr
AND pstyv NOT IN GT_ZFINITEMCAT. "getting error here (The line structure of the table "GT_ZFINITEMCAT" is incorrect.)
IF sy-subrc = 0.
DELETE ct_ibsis[] WHERE bsis-zuonr = <ibsis>-bsis-zuonr.
ENDIF.
ENDLOOP.
fetching data from SET(GS01) but while activating i am getting error in another select query(The line structure of the table "GT_ZFINITEMCAT" is incorrect.),
please provide your valuable suggestion.
Regards,
Subhanshu ShrivastavaWhen using IN you must use a range table afterwards.
Try this :
DATA: BEGIN OF ibsis OCCURS 100,
ebeln LIKE bseg-ebeln,
ebelp LIKE bseg-ebelp,
bsis LIKE bsis,
ldgrp TYPE fagl_ldgrp.
DATA: END OF ibsis.
DATA: gt_zfinitemcat type range of vbap-pstyv,
FIELD-SYMBOLS : <fs_ZFINITEMCAT> TYPE any.
DATA: l_item_catecory TYPE pstyv.
SELECT VALFROM AS LOW
INTO CORRESPONDING FIELDS OF TABLE GT_ZFINITEMCAT
FROM SETLEAF
WHERE SETNAME EQ 'ZFIN_ITEMCAT'.
LOOP AT GT_ZFINITEMCAT ASSIGNING <fs_ZFINITEMCAT>.
<fs_ZFINITEMCAT>-SIGN = 'I'.
<fs_ZFINITEMCAT>-OPTION = 'EQ'.
ENDLOOP.
LOOP AT ct_ibsis[] ASSIGNING <ibsis>.
"Check if we can find one item of the wrong category, if so then we remove the documents.
SELECT SINGLE pstyv INTO l_item_catecory
FROM vbap
WHERE vbeln = <ibsis>-bsis-zuonr
AND pstyv NOT IN GT_ZFINITEMCAT. "getting error here (The line structure of the table "GT_ZFINITEMCAT" is incorrect.)
IF sy-subrc = 0.
DELETE ct_ibsis[] WHERE bsis-zuonr = <ibsis>-bsis-zuonr.
ENDIF.
ENDLOOP. -
Problem in standard select query in fagll03
Good Morning frndz,
I m facing a problem while runnin fagll03. when executed it gives timeout error.
When I debug it , it gets stuck in a select query
SELECT SINGLE * FROM t800m INTO CORRESPONDING FIELDS OF ls_b
WHERE totable = ls_t800a-ntable
AND fromtable = 'ACCIT_GLX'
AND tofield = id_glflex_fieldname
AND seqnr = space.
The content in variable ls_t800a-ntable was FAGLFLEXA and in id_glflex_fieldname was USNAM.
When I cheked in table t800m, the entry could not be found. But in the report instead of setting
sy-subrc = 0 , it is stuck in the select query itself....kindly suggest y it is happening so
Regards,
VincyRe: Problem in my Select query
Krishna kumar Jun 9, 2014 7:52 AM (in response to Ramakrishnan Murugan)
Hi Ramakrishnan,
Can you just try the below Select Query,
SELECT zzreq_id
nachn
vorna
INTO TABLE lt_select_list
FROM ZTABLE
WHERE ( zzreq_id LIKE lv_pattern and
nachn LIKE lv_last_name and
vorna LIKE lv_first_name ) and
zzstatus = lv_workflow_status.
Cheers,
Krishnakumar B.
I think the above suggested query is same as your solution. -
Hi guys
i am getting problem in my select query which is creating one long string, it is working fine without order by but when i run this with order by it get hanged. this query using on function to concatenate multiple strings in one string as well
Please help me what i am doing wroing.
select
regexp_substr(pe.emp_id,'[0-9]+$') ||'|'||
p.title ||'|'||
cdt.text||'|'||
j.tit||staff_pcb.host_pub_tit ||'|'||
jou.vol ||pcb.vol||pcp.vol ||'|'||
jou.journal_number||'|'||
substr (jou.pages||pcb.pages||pcp.pages, 1, instr (jou.pages||pcb.pages||pcp.pages, '-')-1)||'|'||
substr (jou.pages||pcb.pages||pcp.pages, instr (jou.pages||pcb.pages||pcp.pages, '-')+1)||'|'||
pcb.st||jou.st||pcp.st||'|'||
concat_aut(p.id)
from pub p,journal j,caa c,person pe,class_t cdt,
(select pcj.pub_id,pcj.vol,pcj.pages,pcja.st
From pub_C_j_a pcja,pc_j pcj
where pcja.pub_c_j_id = pcj.pub_id)jou,
(select pcb.pub_id,pcb.host_pub_tit,pcb.pages,pcb.vol,pcba.st
From pub_c_b pcb,pub_c_b_a pcba
where pcba.pub_c_b_id = pcb.pub_id)pcb,
(select pcp.pub_id,pcp.vol,pcp.pages,pcpa.st
From pub_c_p pcp,pub_c_p_a pcpa
where pcpa.pub_c_p_id = pcp.pub_id)pcp,
where
p.id = c.pub_id
and c.person_id = pe.id
and p.t_c_id = cdt.c_id
and p.journal_id = j.id(+)
and p.id = jou.publication_id(+)
and p.id = pcb.publication_id(+)
and p.id = pcp.publication_id(+)
and substr(regexp_substr(pe.emp_id,'[0-9]+$'),1,2) in('77','78')
and pcb.st||jou.st||pcp.st='1' order by pe.emp_id
;Not sure about why it's only hanging on order by but looks like your query causing full table scan because of this in WHERE clause:
and pcb.st||jou.st||pcp.st='1'
I would change it to something like:
and ((pcb.st='1' and jou.st = '' and pcp.st = '') or (jou.st='1' and pcb.st = '' and pcp.st = '') or (pcp.st='1' and jou.st = '' and pcb.st = '') ) -
Friends,
I need to select some fields from two different tables which doesnot contain any field in common.How to Get this using a select query..
But there is a field X in table 1 which is equalient to eight char of another field y in table 2.I tried using offset but it is giving error.
Thanks in Advance
Regards
YaminiHello,
You can use a subquery
SELECT * FROM SFLIGHT AS F INTO WA_SFLIGHT
WHERE SEATSOCC < F~SEATSMAX
AND EXISTS ( SELECT * FROM SPFLI
WHERE CARRID = F~CARRID
AND CONNID = F~CONNID
AND CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK' )
AND FLDATE BETWEEN '19990101' AND '19990331'.
WRITE: / WA_SFLIGHT-CARRID, WA_SFLIGHT-CONNID,
WA_SFLIGHT-FLDATE.
ENDSELECT.
or simply query the first table and then the second table with select endselect.
select * from table a.
select * from table b into output_table
where b-field1 eq a-field2.
endselect.
or read the data into one internal table loop at it and then query the other table.
Regards,
Shekhar Kulkarni -
Select Query Results to a .csv file????
Hello All,
I have a question in Oracle, if anyone knows how to do this. Please help me.
How can I get the results of select query in Oracle loaded into a Excel file (.csv) file.
Thanks in Advance,
Sarada.Hi Sarada,
as a csv is nothing more than a list of Comma Separated Values your best shot is to simply read do this with your values. read each value in an iteration add them to a string / stringbuffer and add a "," between them. When you read then next line in the ResultSet you just add a carriage return to the end. Depending on what format you want your csv list in.
After you written all of this into a String you write this out to a file (unless you want to do it slower and write them line by line whenever you read them).
Hope this helps,
Kalle -
I am getting dump error while running one report in one select query
Hi,
While running a report program, I am getting a dump error in one select query. So could you please correct the select query so that I can't face the dump error.
SELECT vbeln parvw kunnr INTO CORRESPONDING FIELDS OF TABLE l_t_vbpa
FROM vbpa
FOR ALL ENTRIES IN l_t_backorder_item
WHERE vbeln = l_t_backorder_item-vbeln AND
( ( parvw = c_we AND kunnr IN rng_shipto ) OR ( parvw = c_ag AND
kunnr IN rng_soldto ) ) .
<removed by moderator>
Best Regards,
BDP
Edited by: Thomas Zloch on Apr 30, 2010 12:31 PMHi Bansidhar,
It would be helpful if you could tell what type of dump it is.
If it is a timeout you should check whether l_t_backorder_item is empty - in this case ALL document numbers are selected. f you get the timeout with a populated table consider converting the l_t_backorder_item table into one ore more ranges tables - the select with ranges tables is way quicker than 'for all entries'. But take care the ranges table has not to many entries - the SAP SQL converter puts this into one huge SQL statement and this might become too big to be handled by the database (depends on the actual underlying database).
I would also consider splitting the SELECT into two (2nd one with 'appending into table') to make the code easier to understand It also helps the database system determining a strategy for the select.
Regards,
Gerd Rother -
Getting Dump from a select query
Dear All,
Am selecting records from KEKO and storing into E1KEKO internal table. But am getting dump error. I need to send those E1KEKO records as idoc. Kindly help me out how to fix this dump.
SELECT * INTO CORRESPONDING FIELDS OF e1keko
FROM keko
WHERE keko~matnr = p_matnr
AND keko~werks = p_werks
AND keko~bwtar = 'Z06'
AND keko~bwvar = 'Z06'.
CLEAR t_idoc_data.
t_idoc_data-segnam = c_segnam_e1keko.
t_idoc_data-mandt = sy-mandt.
t_idoc_data-sdata = e1keko.
APPEND t_idoc_data.
CLEAR e1keph.
endselect
Thanks in advance.
AnandhanHi,
If i use the below select query in a test program, that time also am getting the same dump.
DATA: e1keph TYPE e1keph,
e1keko TYPE e1keko.
SELECT * INTO CORRESPONDING FIELDS OF e1keko
FROM keko
WHERE keko~matnr = '000000000010801071'.
endselect.
(code}
The dump showing the below message
The reason for the exception is:
In a SELECT access, the read file could not be placed in the target
field provided.
Either the conversion is not supported for the type of the target field
the target field is too small to include the value, or the data does no
have the format required for the target field.
Thanks in advance
Anandhan -
Hi all,
i am getting a below error whenever executing the below select query....
some times it will show dead lock detected while waiting for resource and terminated...
some times it executes and gives result..
but all the time it writes an alert to alert log
Plesae suggest how to resolve the issue..........
Thanks in advance
Env: Linux / Oracle 11.2.0.3.3
Error from alert log:
Errors in file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc:
ORA-00060: deadlock detected while waiting for resource
ORA-10387: parallel query server interrupt (normal)
Trace file info... bdrdb_p017_6076.trc:
Trace file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oracle/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: bdrdb.cteplindia.com
Release: 2.6.18-308.el5PAE
Version: #1 SMP Fri Jan 27 17:40:09 EST 2012
Machine: i686
Instance name: bdrdb
Redo thread mounted by this instance: 1
Oracle process number: 92
Unix process pid: 6076, image: [email protected] (P017)
*** 2013-11-04 23:18:57.915
*** SESSION ID:(423.59970) 2013-11-04 23:18:57.915
*** CLIENT ID:() 2013-11-04 23:18:57.915
*** SERVICE NAME:(bdrdb) 2013-11-04 23:18:57.915
*** MODULE NAME:() 2013-11-04 23:18:57.915
*** ACTION NAME:() 2013-11-04 23:18:57.915
*** 2013-11-04 23:18:57.915
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
PS-00000001-00000011 92 423 S 33 128 S X
BF-2ed08c01-00000000 33 128 S 92 423 S X
session 423: DID 0001-005C-00081126 session 128: DID 0001-0021-00067D23
session 128: DID 0001-0021-00067D23 session 423: DID 0001-005C-00081126
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
PS-00000001-00000011 92 423 S 33 128 S X
BF-2ed08c01-00000000 33 128 S 92 423 S X
session 423: DID 0001-005C-00081126 session 128: DID 0001-0021-00067D23
session 128: DID 0001-0021-00067D23 session 423: DID 0001-005C-00081126
Rows waited on:
Session 423: no row
Session 128: obj - rowid = 00021DC1 - AAAh3BAAVAAAQL/AAA
(dictionary objn - 138689, file - 21, block - 66303, slot - 0)
----- Information for the OTHER waiting sessions -----
Session 128:
sid: 128 ser: 46176 audsid: 1836857 user: 102/DBLOCAL
flags: (0x8000041) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x40009) -/-/INC
pid: 33 O/S info: user: oracle, term: UNKNOWN, ospid: 31611
image: [email protected]
client details:
O/S info: user: masked, term: masked, ospid: 5924:568
machine: masked program: Toad.exe
application name: TOAD background query session, hash value=526966934
current SQL:
application name: TOAD background query session, hash value=526966934
current SQL:
SELECT DISTINCT B_FP_TEST.TEST_ID
FROM B_FP_TEST,
B_USER_INFO,
J_FP_INVESTIGATOR,
L_TEST_STATUS,
L_ATMS_TEST_TYPE,
j_op_test_anml
WHERE B_FP_TEST.TEST_ID = J_FP_INVESTIGATOR.TEST_ID
AND B_FP_TEST.TEST_TYPE_ID = L_ATMS_TEST_TYPE.ATMS_TEST_TYPE_ID
AND B_USER_INFO.B_USER_INFO_ID = J_FP_INVESTIGATOR.INVESTIGATOR_ID
AND B_FP_TEST.STATUS_ID = L_TEST_STATUS.STATUS_ID
AND B_FP_TEST.IS_DELETED = :"SYS_B_00"
AND B_FP_TEST.TEST_NUM NOT IN (:"SYS_B_01", :"SYS_B_02", :"SYS_B_03")
AND L_ATMS_TEST_TYPE.IS_DELETED = :"SYS_B_04"
AND J_FP_INVESTIGATOR.is_pi = :"SYS_B_05"
AND L_TEST_STATUS.STATUS IN (:"SYS_B_06", :"SYS_B_07", :"SYS_B_08")
AND j_op_test_anml.test_id = B_FP_TEST.TEST_ID
----- End of information for the OTHER waiting sessions -----
*** 2013-11-04 23:18:57.916
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=3, mask=0x0)
----- Error Stack Dump -----
ORA-00060: deadlock detected while waiting for resource
ORA-10387: parallel query server interrupt (normal)
----- SQL Statement (None) -----
Current SQL information unavailable - no cursor.
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
More......
Query:
SELECT DISTINCT B_FP_TEST.TEST_ID
FROM B_FP_TEST,
B_USER_INFO,
J_FP_INVESTIGATOR,
L_TEST_STATUS,
L_ATMS_TEST_TYPE,
j_op_test_anml
WHERE B_FP_TEST.TEST_ID = J_FP_INVESTIGATOR.TEST_ID
AND B_FP_TEST.TEST_TYPE_ID = L_ATMS_TEST_TYPE.ATMS_TEST_TYPE_ID
AND B_USER_INFO.B_USER_INFO_ID = J_FP_INVESTIGATOR.INVESTIGATOR_ID
AND B_FP_TEST.STATUS_ID = L_TEST_STATUS.STATUS_ID
AND B_FP_TEST.IS_DELETED = 0
AND B_FP_TEST.TEST_NUM NOT IN (1, 2, 99)
AND L_ATMS_TEST_TYPE.IS_DELETED = 0
AND J_FP_INVESTIGATOR.is_pi = 1
AND L_TEST_STATUS.STATUS IN ('Scheduled', 'In-Progress', 'Completed')
AND j_op_test_anml.test_id = B_FP_TEST.TEST_ID
AND ( (j_op_test_anml.end_date BETWEEN TO_DATE ('28-Oct-2013') - 1
AND TO_DATE ('04-Nov-2013') + 1)
OR (j_op_test_anml.start_date BETWEEN TO_DATE ('28-Oct-2013') - 1
AND TO_DATE ('04-Nov-2013') + 1)
OR (TO_DATE ('28-Oct-2013') BETWEEN j_op_test_anml.start_date
AND j_op_test_anml.end_date)
OR (TO_DATE ('04-Nov-2013') BETWEEN j_op_test_anml.start_date
AND j_op_test_anml.end_date))
AND L_ATMS_TEST_TYPE.IS_DELETED = 0
AND B_FP_TEST.DATASOURCE_ID = 9
Query Exp plan:
Plan hash value: 3398228788
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 1501 | 102K| 1929 (1)| 00:00:24 | | | | | |
| 1 | HASH UNIQUE | | 1501 | 102K| 1929 (1)| 00:00:24 | | | | | |
| 2 | CONCATENATION | | | | | | | | | | |
| 3 | PX COORDINATOR | | | | | | | | | | |
| 4 | PX SEND QC (RANDOM) | :TQ30005 | 241 | 16870 | 800 (1)| 00:00:10 | | | Q3,05 | P->S | QC (RAND) |
|* 5 | HASH JOIN | | 241 | 16870 | 800 (1)| 00:00:10 | | | Q3,05 | PCWP | |
| 6 | PX RECEIVE | | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,05 | PCWP | |
| 7 | PX SEND HASH | :TQ30004 | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,04 | P->P | HASH |
|* 8 | HASH JOIN | | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,04 | PCWP | |
| 9 | PX RECEIVE | | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,04 | PCWP | |
| 10 | PX SEND HASH | :TQ30003 | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,03 | P->P | HASH |
|* 11 | HASH JOIN | | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,03 | PCWP | |
| 12 | BUFFER SORT | | | | | | | | Q3,03 | PCWC | |
| 13 | PX RECEIVE | | | | | | | | Q3,03 | PCWP | |
| 14 | PX SEND BROADCAST | :TQ30000 | | | | | | | | S->P | BROADCAST |
| 15 | NESTED LOOPS | | | | | | | | | | |
| 16 | NESTED LOOPS | | 485 | 20855 | 781 (0)| 00:00:10 | | | | | |
| 17 | TABLE ACCESS BY GLOBAL INDEX ROWID| J_OP_TEST_ANML | 485 | 10185 | 296 (0)| 00:00:04 | ROWID | ROWID | | | |
|* 18 | INDEX RANGE SCAN | IDX$$_2D190001 | 485 | | 4 (0)| 00:00:01 | | | | | |
|* 19 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 20 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 21 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q3,03 | PCWC | |
|* 22 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q3,03 | PCWP | |
| 23 | BUFFER SORT | | | | | | | | Q3,04 | PCWC | |
| 24 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q3,04 | PCWP | |
| 25 | PX SEND HASH | :TQ30001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 26 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
| 27 | BUFFER SORT | | | | | | | | Q3,05 | PCWC | |
| 28 | PX RECEIVE | | 30 | 150 | 3 (0)| 00:00:01 | | | Q3,05 | PCWP | |
| 29 | PX SEND HASH | :TQ30002 | 30 | 150 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 30 | TABLE ACCESS FULL | L_ATMS_TEST_TYPE | 30 | 150 | 3 (0)| 00:00:01 | | | | | |
| 31 | NESTED LOOPS | | | | | | | | | | |
| 32 | NESTED LOOPS | | 3 | 210 | 329 (1)| 00:00:04 | | | | | |
| 33 | NESTED LOOPS | | 3 | 195 | 329 (1)| 00:00:04 | | | | | |
|* 34 | HASH JOIN | | 2 | 114 | 325 (1)| 00:00:04 | | | | | |
| 35 | NESTED LOOPS | | | | | | | | | | |
| 36 | NESTED LOOPS | | 6 | 258 | 322 (1)| 00:00:04 | | | | | |
| 37 | PARTITION RANGE SINGLE | | 6 | 126 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 38 | TABLE ACCESS FULL | J_OP_TEST_ANML | 6 | 126 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 39 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 40 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
|* 41 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 42 | TABLE ACCESS BY INDEX ROWID | J_FP_INVESTIGATOR | 1 | 8 | 2 (0)| 00:00:01 | | | | | |
|* 43 | INDEX RANGE SCAN | FI_TEST_ID_PK | 1 | | 1 (0)| 00:00:01 | | | | | |
|* 44 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 45 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | | | |
| 46 | PX COORDINATOR | | | | | | | | | | |
| 47 | PX SEND QC (RANDOM) | :TQ20003 | | | | | | | Q2,03 | P->S | QC (RAND) |
| 48 | NESTED LOOPS | | | | | | | | Q2,03 | PCWP | |
| 49 | NESTED LOOPS | | 33 | 2310 | 399 (2)| 00:00:05 | | | Q2,03 | PCWP | |
|* 50 | HASH JOIN | | 33 | 2145 | 397 (2)| 00:00:05 | | | Q2,03 | PCWP | |
| 51 | PX RECEIVE | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,03 | PCWP | |
| 52 | PX SEND HASH | :TQ20002 | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,02 | P->P | HASH |
|* 53 | HASH JOIN | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,02 | PCWP | |
| 54 | BUFFER SORT | | | | | | | | Q2,02 | PCWC | |
| 55 | PX RECEIVE | | | | | | | | Q2,02 | PCWP | |
| 56 | PX SEND BROADCAST | :TQ20000 | | | | | | | | S->P | BROADCAST |
| 57 | NESTED LOOPS | | | | | | | | | | |
| 58 | NESTED LOOPS | | 66 | 2838 | 382 (1)| 00:00:05 | | | | | |
| 59 | PARTITION RANGE SINGLE | | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 60 | TABLE ACCESS FULL | J_OP_TEST_ANML | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 61 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 62 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 63 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q2,02 | PCWC | |
|* 64 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q2,02 | PCWP | |
| 65 | BUFFER SORT | | | | | | | | Q2,03 | PCWC | |
| 66 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q2,03 | PCWP | |
| 67 | PX SEND HASH | :TQ20001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 68 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 69 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | Q2,03 | PCWP | |
|* 70 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | Q2,03 | PCWP | |
| 71 | PX COORDINATOR | | | | | | | | | | |
| 72 | PX SEND QC (RANDOM) | :TQ10003 | | | | | | | Q1,03 | P->S | QC (RAND) |
| 73 | NESTED LOOPS | | | | | | | | Q1,03 | PCWP | |
| 74 | NESTED LOOPS | | 33 | 2310 | 399 (2)| 00:00:05 | | | Q1,03 | PCWP | |
|* 75 | HASH JOIN | | 34 | 2210 | 397 (2)| 00:00:05 | | | Q1,03 | PCWP | |
| 76 | PX RECEIVE | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,03 | PCWP | |
| 77 | PX SEND HASH | :TQ10002 | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,02 | P->P | HASH |
|* 78 | HASH JOIN | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,02 | PCWP | |
| 79 | BUFFER SORT | | | | | | | | Q1,02 | PCWC | |
| 80 | PX RECEIVE | | | | | | | | Q1,02 | PCWP | |
| 81 | PX SEND BROADCAST | :TQ10000 | | | | | | | | S->P | BROADCAST |
| 82 | NESTED LOOPS | | | | | | | | | | |
| 83 | NESTED LOOPS | | 66 | 2838 | 382 (1)| 00:00:05 | | | | | |
| 84 | PARTITION RANGE SINGLE | | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 85 | TABLE ACCESS FULL | J_OP_TEST_ANML | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 86 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 87 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 88 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q1,02 | PCWC | |
|* 89 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q1,02 | PCWP | |
| 90 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
| 91 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q1,03 | PCWP | |
| 92 | PX SEND HASH | :TQ10001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 93 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 94 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | Q1,03 | PCWP | |
|* 95 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | Q1,03 | PCWP | |
Predicate Information (identified by operation id):
5 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
8 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
11 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
18 - access("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
19 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
20 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
22 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
26 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
30 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
34 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
38 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
39 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
40 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
41 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
42 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
43 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
44 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
45 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
50 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
53 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
60 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-04
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND (LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27
00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
61 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
62 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
64 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
68 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
69 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
70 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
75 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
78 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
85 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-28 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-10-28
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27
00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
(LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
86 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
87 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
89 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
93 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
94 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
95 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)Excellent piece of follow-up on my first suggestion.
I nearly made a comment about how the plan doesn't show Bloom filter pruning either - and then I realised why not. The plan you've shown us comes from Explain Plan with literal values present; the trace file shows bind variables with names that are generated when cursor_sharing is set to force or similar - so the run-time plan and the plan from explain plan are almost guaranteed to be different.
Oracle support will need you to supply the plan you get from trying to run the query and then making a call to dbms_xplan.display_cursor() - dbms_xplan in 10g | Oracle Scratchpad If you do this I think you'll find that the pstart/pstop columns contain entries like :BF0000, and you may even find operations link PX JOIN FILTER CREATE / PX JOIN FILTER USE
A couple of generic notes:
if a query does sufficient work to merit parallel execution, then it's usually better to supply the best possible information to the optimizer, which means using literals rather than bind variables - you could try executing the query with the hint /*+ cursor_sharing_exact */ to stop Oracle from turning your literals into binds; it might be the presence of bind variables that's making the optimizer choose a path that has to include bloom filter pruning in your case.
Where you have the to_date() call you've used a four-digit year - which is a very good thing and helps the optimizer - but it's also a good idea to include an explicit format string as well: with a four-digit year this probably won't make any difference, but it avoids any risk of ambiguity for the optimizer.
I made a comment about the P->S stage and bottlenecks - I spent a couple more minutes looking at the plan, and I see the optimizer has used concatentation: in effect it has run three query blocks one after the other and fed the results to the query co-ordinator - in this case the P->S would make no difference to the end-user response time there's always a final P->S to the coordinator, you just happen to have three of them.
Regards
Jonathan Lewis -
Select query written on view giving dump
Hi All,
I have written the following query on COAS view in my code:
SELECT aufnr bukrs INTO TABLE gt_aufnr
FROM coas
WHERE
aufnr IN r_aufrm AND
auart IN s_auart AND
autyp = c_autyp_01 AND
kokrs = c_kokrs_mbca.
When records in range r_aufrm are too many like 6000 or so it gives me a run time error on this query - DBIF_RSQL_INVALID_RSQL. Error description says size of select query is large.
Question : Is this bug coming because I am using the view. If i select the records on table AUFK (only table on which the view is created), will it rectify the problem?? I am asking this because it's in production and I cant make any change and test then and there.
Note: the range r_aufrm contains two types of records for AUFNR - 1. with sign GE and others with sign LE. So I cannot use for all entries. If I still can, please tell me how?
Thanks a looot!
Waiting for the response,
NavitaThanks All!!
I think, this range limit has caused the problem. Range limit is 999 records.
Just one question I have. At runtime when I check the number of entries in r_aufrm in the query, I get 6000 entries. So, does it allow 6000 records to enter the range variable even if it has a limit of 999. Is it the case that, in select query only it will throw a dump if records in range exceed 999??
SELECT aufnr bukrs INTO TABLE gt_aufnr
FROM coas
WHERE
aufnr IN r_aufrm AND
auart IN s_auart AND
autyp = c_autyp_01 AND
kokrs = c_kokrs_mbca.
Please clear my doubt.
Thanks a lot for ur help!!!!
Navita -
Hi All,
I am getting a dump & the dump says " TIME LIMIT EXCEEDED". The code as below:-
LOOP AT it_gen1 INTO wa_gen1.
SELECT vbelv posnv
FROM vbfa
INTO TABLE li_vbfa
WHERE vbeln = wa_gen1-bil_number
AND posnn = wa_gen1-itm_number.
DESCRIBE TABLE li_vbfa LINES gv_count .
READ TABLE li_vbfa INDEX gv_count .
IF sy-subrc = 0 .
MOVE: li_vbfa-vbelv TO gv_vbelv1,
li_vbfa-posnv TO gv_posnv.
ENDIF .
CALL FUNCTION 'SD_DOCUMENT_PARTNER_READ'
EXPORTING
i_parvw = 'ZS'
i_posnr = gv_posnv
i_vbeln = gv_vbelv1
IMPORTING
e_vbpa = li_vbpa
e_vbadr = li_vbadr
EXCEPTIONS
not_found = 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.
MOVE li_vbpa-kunnr TO wa_gen2-kunnr .
MOVE-CORRESPONDING wa_gen1 TO wa_gen2.
APPEND wa_gen2 TO it_gen2 .
ENDLOOP.
If I use Function Module CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' before ENDLOOP this will overcome the error says one of my friend.
Is this a feasible solution for this error?
Thanks in dvance....Hi All,
Thanks for all your inputs. This issue is resolved now. I have used ranges in the select query & removed FOR ALL ENTRIES construct. The select query is working very fastly now with correct data.
The code with the changes as below :-
LOOP AT it_gen1 INTO wa_gen1.
CLEAR r_bil_number.
CLEAR r_itm_number.
r_bil_number-option = 'EQ'.
r_bil_number-sign = 'I'.
r_bil_number-low = wa_gen1-bil_number.
COLLECT r_bil_number.
r_itm_number-option = 'EQ' .
r_itm_number-sign = 'I'.
r_itm_number-low = wa_gen1-itm_number.
COLLECT r_itm_number.
ENDLOOP.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
vbtyp_v
FROM vbfa
INTO TABLE li_vbfa
WHERE vbeln IN r_bil_number
AND posnn IN r_itm_number
AND vbtyp_n = c_m.
Regards
Abhii. -
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
Maybe you are looking for
-
Hello, I'm running into a problem with a couple programs. 1 Program needs to be running in 8-bit colors while another program needs to be running in 24-bit colors. These programs need to be ran at the same time so it causes a little bit of a problem.
-
Hi all, we have a requirement to send PO details when new po is crated in SAP, but we need to send only 13 fields from PO , so how to reduce the fields and how map the fields, the below are the fields needs to send to legacy system. EBELN WERKS LGORT
-
Updating a remote Oracle table
I need to query about 20 tables on one server to get data that updates 1 table on a different table. How do I reference the remote table in SQL? Do I need any links to the remote table?
-
G4 17" aluminum on 10.4.11, what's the newest OS version it can use?
I have an old powerbook g4 and it's been on 10.4.11 for a long time, there's a few things I wanted to run but they won't run on the old OS, what's the newest I can upgrade too? Anyway to find out if my applications will function above 10.4.11? If not
-
Hi,All. I am chinese,and recently I have joined a project using occi.In our project,there are three major tires:database,server program,and client program.Our Oracle Databe 10.1.0.2 will run on Red Hat Linux Advanced Server 3,server c++ program ,whic