Runtime error in SELECT statement
While defining a structure for join in my program it has two fields both date of type erdat one from table vbak and other from custom table. If i use data element erdat to define two dates as date1 type erdat, date2 type erdat its giving a dump, but if i define it as date1 type vbak-erdat and date2 type ztable-erdat its working fine. I would like to know the reason behind.
Thanks,
swarna
Moderator Message: Please use more descriptive subject for your question.
Edited by: Suhas Saha on Aug 18, 2011 1:56 PM
Hi,
check the data declarations of both VBAK-ERDAT and ZTABLE-ERDAT. My best guess is that there is a difference in format (length, type).
Roy
Similar Messages
-
Runtime error at select statement in RFC_READ TABLE FM
Dear All,
I have copied the standard FM RFC_READ_TABLE to incorporate the customer needs. Below is the select query which I have written in this FM.
SELECT (po_search_text-column_text) INTO <wa> FROM ekko
INNER JOIN ekpo ON ekko~ebeln = ekpo~ebeln
INNER JOIN eket ON ekpo~ebeln = eket~ebeln AND ekpo~ebelp = eket~ebelp
INNER JOIN lfa1 ON ekko~lifnr = lfa1~lifnr
INNER JOIN lfm1 ON ekko~lifnr = lfm1~lifnr AND ekko~ekorg = lfm1~ekorg
INNER JOIN lfb1 ON ekko~lifnr = lfb1~lifnr AND ekko~bukrs = lfb1~bukrs
INNER JOIN t024 ON ekko~ekgrp = t024~ekgrp
INNER JOIN zatscsng_status ON eket~ebeln = zatscsng_status~po_number
AND eket~ebelp = zatscsng_status~po_line
AND eket~etenr = zatscsng_status~po_sched_line
INNER JOIN adrc ON zatscsng_status~delivery_addr = adrc~addrnumber
WHERE (po_search_text-cond_text)
ORDER BY (po_search_text-sort_text).
Here, posearch_text-column_text_ will have the fields to be selected at runtime and posearch_text-cond_text_ is the where condition. It is running fine in this case.
But when I try to select Item Category ( EKPO-PSTYP), if data is present for this category, it is returning the values but if data is not there for the particular item category in the where clause, it is giving a RUNTIME ERROR at the select statement.
Here is the ERROR ANALYSIS:
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
not caught in
procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", 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 current ABAP program has tried to execute an Open SQL statement
which contains a WHERE, ON or HAVING condition with a dynamic part.
The part of the WHERE, ON or HAVING condition specified at runtime in
a field or an internal table, contains the invalid value "<L_LINE>-PSTYP".
Edited by: Rob Burbank on Mar 17, 2010 5:09 PMNow that's what I call a join statement...
You probably have a bug in how you build po_search_text-cond_text, the content must be a syntactically correct where clause. It seems that in your example there is just "<L_LINE>-PSTYP" without a condition, so try omitting it altogether.
Debug the content of po_search_text-cond_text before it hits the select statement.
Thomas -
Performance Tuning 'Runtime Error' on Select statement
Hi Experts,
Good Day!
I would like to ask some help regarding a custom program that will encounter 'Runtime Error' on the below codes on how to perform performance tunning especially number 1.
1.
SELECT A~VBELN A~ERDAT A~AUART A~VKORG A~VTWEG A~SPART A~VDATU
A~KUNNR B~POSNR B~MATNR B~ARKTX B~ABGRU B~KWMENG B~VRKME
B~WERKS B~VSTEL B~ROUTE
FROM VBAK AS A INNER JOIN VBAP AS B ON A~VBELN EQ B~VBELN
INNER JOIN VBEP AS C ON A~VBELN EQ C~VBELN
AND B~POSNR EQ C~POSNR
INTO CORRESPONDING FIELDS OF TABLE I_DATA_TAB
WHERE A~VBELN IN S_VBELN
AND A~VKORG IN S_VKORG
AND A~AUART IN S_AUART
AND A~VTWEG IN S_VTWEG
AND A~SPART IN S_SPART
AND A~VDATU IN S_VDATU
AND A~KUNNR IN S_KUNNRD
AND B~MATNR IN S_MATNR
AND B~KWMENG IN S_KWMENG
AND B~VRKME IN S_VRKME
AND B~WERKS IN S_WERKS
AND C~EDATU IN S_VDATU.
2.
SELECT VBELN FROM LIKP INTO LIKP-VBELN
WHERE LFDAT IN S_VDATU
AND VKORG IN S_VKORG
AND LFART EQ 'YSTD'
AND KUNNR IN S_KUNNRP
AND KUNAG IN S_KUNNRD
SELECT VBELN POSNR LFIMG MATNR WERKS
FROM LIPS INTO (LIPS-VBELN, LIPS-POSNR, DISPLAY_TAB-DEL_QTY,
LIPS-MATNR, LIPS-WERKS)
WHERE VBELN EQ LIKP-VBELN
AND MATNR IN S_MATNR
AND VTWEG IN S_VTWEG
AND SPART IN S_SPART
AND WERKS IN S_WERKS.
ENDSELECT.
ENDSELECT.
4.
SELECT DELIVERY POSNR MATNR PODLFIMG FROM T9YPODI INTO
(T9YPODI-DELIVERY, T9YPODI-POSNR, T9YPODI-MATNR, T9YPODI-PODLFIMG)
WHERE MATNR IN S_MATNR
AND PODDATE IN S_VDATU.
Answer's will be a great help.
~Thank You,
Lourd
Edited by: Lourd06 on Oct 23, 2009 10:32 AM
Moderator message - Welcome to SCN.
Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting. You're in the driver's seat here. It's up to you to do some analysis before expecting that people can halp you. - post locked
And please use code tags.
Edited by: Rob Burbank on Oct 23, 2009 9:13 AMHi All,
We've checked the transaction ST22 it is TIME OUT. I really need your help on this the program will dump in number 1 Select statement. Can you help me perform a performance tunning.
In transaction ST22
Runtime Errors TIME_OUT
Date and Time 21.10.2009 08:51:33
Short text
Time limit exceeded.
What happened?
The program "ZV0PSR10" has exceeded the maximum permitted runtime without
interruption and has therefore been terminated.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
After a specific time, the program is terminated to make the work area
available to other users who may be waiting.
This is to prevent a work area being blocked unnecessarily long by, for
example:
- Endless loops (DO, WHILE, ...),
- Database accesses with a large result set
- Database accesses without a suitable index (full table scan)
The maximum runtime of a program is limited by the system profile
parameter "rdisp/max_wprun_time". The current setting is 1200 seconds. If this
time limit is
exceeded, the system attempts to cancel any running SQL statement or
signals the ABAP processor to stop the running program. Then the system
waits another 60 seconds maximum. If the program is then still active,
the work process is restarted.
~Thank you
Lourd
Edited by: Lourd06 on Oct 23, 2009 11:22 AM
Edited by: Lourd06 on Oct 23, 2009 11:33 AM -
Runtime error for SELECT statement
Hi All,
I have written a SELECT statement as follows in my code.
select budat pernr aufnr vornr from AFRU
into corresponding fields of table it_vornr
for all entries in it_cats_tmp
where budat = it_cats_tmp-workdate
and pernr = it_cats_tmp-pernr
and aufnr = it_cats_tmp-rnplnr.
The table IT-CATS_TMP is having around 3000+ lines.
When control moves to this statement, the system is throwing Runtime error or its taking around 30 minutes time to execute.
If i query the same table (AFRU) in SE11 for the same set of conditions, the table displays relevent data immediately.
What might be the reason for this delay/Runtime Error?
Shall i need to change the syntax for better performance?
Your guidelines are highly appreciated......
Regards
PavanHi
1. Try to put WHERE conditions for KEY FIELDS.
Solution: Create a RANGE for the key fields & put that in SELECT Query.
DATA: gr_rueck TYPE RANGES OF afru-rueck.
SELECT .. WHERE rueck IN gr_rueck.
2. Avoid using CORRESPONDING FIELDS OF TABLE in SELECT.
Solution: Change internal table fields ORDER.
TYPES:
BEGIN OF TY_VORNR,
budat TYPE ..
pernr TYPE ..
aufnr TYPE ..
vornr TYPE ..
... " Other fields
END OF TY_VORNR.
SELECT .. INTO TABLE IT_VORNR ... -
ABAP runtime error in selection
Hey,
I have an old program with some select options fields. Inside the program, some select options fields are going to be filled, if they are initial at the beginning.
When using this select options field in my SQL selection, I´m getting a runtime error. How many entries are allowed in select options? In this case, I have about 3800...
CheersHi,
From SAP note 635318;
"When the SQL statement is generated at runtime, you should check the
following restrictions and divide or reduce the statement if necessary.
The static length (in the ABAP editor) of any ABAP command must not
exceed 28672 characters.In Open SQL commands with dynamic subclauses
(WHERE, GROUP BY, ORDER BY, and so on), the subclauses cannot contain
more than 28672 characters."
It could be that your select statement is too long, rather than specifically the number of entries in the select-option.
Regards,
Nick -
Portal runtime error while selecting page layout in WPC editor
Hello,
in web page composer, editing page, when i click on "select page layout" I have a portal runtime error popup.
The logfile shows the following :
#1.5 #005056834112005E0000000C00000FA800048E28A94966CC#1282205196819#com.sap.portal.prt.runtime#sap.com/irj#com.sap.portal.prt.runtime#1016#149##n/a##7ff9c93eab6811dfa9c70000003307de#SAPEngine_Application_Thread[impl:3]_15##0#0#Error##Java###10:06_19/08/10_0010_3344350
[EXCEPTION]
#1#com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: Error occurs during the rendering of jsp component
Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: Error in java compiling
Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: E:
usr
sap
EPD
JC00
j2ee
cluster
server0
apps
sap.com
irj
servlet_jsp
irj
root
WEB-INF
portal
portalapps
com.sap.netweaver.bc.util
lib
bc.util.public_api.jar(com/sapportals/wcm/WcmException.java):24: class WcmException is public, should be declared in a file named WcmException.java
(source unavailable)
1 error
I have the same by clicking on "check assignments"
Any help ?
ThanksHello Jego.
We faced the same issue after upgrade to EHP1 SP07 last week and managed to solve it by modification of layout.jsp and com.sap.nw.wpc.layoutmanager.LayoutBean within com.sap.nw.wpc.designtime.par. SAP's code requires an additional catch handler, so it is better to rise an OSS message.
As a workaround you may change a default layout for wpc main page (good for new pages) or manually edit output.xml for existing pages.
Best regards,
Aliaksandr Zhukau -
Error in select statement in CMOD
Hi Friends
I am enhancing a data source with some fields and in the CMOD i am writing the code.
My delcaration is as follows
begin of ty_dfkkzp,
SELW2 type dfkkzp-SELW2,
BLART type dfkkzp-BLART ,
BUDAT type dfkkzp-BUDAT ,
BLDAT type dfkkzp-BLDAT ,
TBETR type dfkkzp-TBETR ,
ZZRECEIPT type dfkkzp-ZZRECEIPT ,
ZZPAYCAT type dfkkzp-ZZPAYCAT ,
ZZPAYSRC type dfkkzp-ZZPAYSRC ,
ZZPAYTYPE type dfkkzp-ZZPAYTYPE ,
ZZTENDER type dfkkzp-ZZTENDER ,
end of ty_dfkkzp.
Following is my SELECT statement.
select
SELW2
BLART
BUDAT
BLDAT
TBETR
ZZRECEIPT
ZZPAYCAT
ZZPAYSRC
ZZPAYTYPE
ZZTENDER
into corresponding fields of table lt_dfkkzp
from dfkkzp
for all entries in it_data
where SELW2 = it_data-VTREF.
I am getting an error in the where clause. This is becuase VTERF ( Contract) is of type CHAR and length 20, where as SELW2 is of type CHAR but Length 35. I know the length and type should be the same. But this table DFKKZP strangely has SELW2(Contract) has length 35.
Can someone please suggest me how to handle this inorder for me to get this correct?.
Thanks in adv.
Regards
BNHi,
try this and let me know if it works.
Declare another internal table and work area like it_data1 type it_data as shown below.
Begin of it_data1_wa,
......... type........,
......... type .......,
SELW2 type dfkkzp-SELW2,
end if it_data_wa1.
data: it_data1 like standard table of it_data_wa.
data: it_data_wa type it_data
include all the fields inside the table.
loop at it_data into it_data_wa.
move corresponding lt_data_wa to it_data1_wa.
it_data1_wa-SELW2 = it_data_wa-VTREF.
append it_data1_wa to it_data1.
end loop.
now write the same select statement for all entries in it_data1 instead of it_data.
Regards,
Anusha -
Sql Error in Select statement when doing subquery
Hi,
I am trying to see what the error is in the subquery part of the select statement.
Subquery should be fetching the safety_stock_quantity based on the MAX(effectivity_date).
Any suggestions?
SELECT kbn.last_update_date,itm.segment1,itm.description,kbn.kanban_card_number,kbn.kanban_size,
(SELECT msc.safety_stock_quantity
FROM mtl_safety_stocks msc
WHERE msc.effectivity_date = (select MAX(msc2.effectivity_date)
from mtl_safety_stocks msc2
where msc2.inventory_item_id = itm.inventory_item_id
and msc2.organization_id = itm.organization_id)
AND msc.inventory_item_id = itm.inventory_item_id
AND msc.organization_id = itm.organization_id
FROM mtl_system_items_b itm
,mtl_onhand_quantities_detail moqd
,mtl_safety_stocks msc
,mtl_kanban_card_activity kbn
WHERE itm.inventory_item_id = kbn.inventory_item_id
AND itm.organization_id = kbn.organization_id
AND itm.inventory_item_id = moqd.inventory_item_id
AND itm.organization_id = moqd.organization_id
AND moqd.subinventory_code = kbn.source_subinventory
AND kbn.card_status = 1
AND kbn.supply_status = 5
AND msc.inventory_item_id = itm.inventory_item_id
AND msc.organization_id = itm.organization_id
GROUP BY
kbn.last_update_date,itm.segment1,itm.description,kbn.kanban_card_number,kbn.kanban_size;
Thanks
PravnHi, Pravn,
Remember the ABC's of GROUP BY:
When you use a GROUP BY clause and/or an aggregate fucntion, then every item in the SELECT clause must be:
(A) an <b>A</b>ggregate function,
(B) one of the "group <b>B</b>y" expressions,
(C) a <b>C</b>onstant, or
(D) something that <b>D</b>epends entirely on the above. (For example, if you "GROUP BY TRUNC(dt)", you can "SELECT TO_CHAR (TRUNC(dt), 'Mon-DD')").
There's a GROUP BY clause in your main query, so every item in the main SELECT clause must be one of the above. The last item, the unnamed scalar sub-query, is none of the above.
How can you fix this problem? That depends on your data, the results you want, and perhaps on your Oracle version. If you'd like help, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Always say which version of Oracle you're using.
You may have noticed that this site normally doesn't display multiple spaces in a row.
Whenever you post formatted text (including, but limited to, actual code) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing. -
Sequence error in select statement
Does anyone know why I get the following error when I run the code below. If so, how can it be fixed.
Thanks in advance,
John C
ORA-02287 sequence number not allowed here
INSERT INTO PROMO_STAGE.NAC_OFFER (CMPGN_KEY, OFFER_KEY, CREATIVE)
SELECT DISTINCT A.CREATIVE,
B.CMPGN_KEY,
PROMO_STAGE.SEQ_NAC_OFFER_KEY.NEXTVAL@DSTAGE
FROM PROMO_STAGE.CAMPAIGN@DSTAGE B,
ROCEONOF.NACQ0211_2_FINAL@OGD A
WHERE B.CMPGN_ID = 'NAC_'|| to_char(add_months(SYSDATE,-1),'YYYYMM');John
It is the DISTINCT which is causing the trouble. How about:
INSERT INTO PROMO_STAGE.NAC_OFFER (CMPGN_KEY, OFFER_KEY, CREATIVE)
SELECT COL1, COL2, PROMO_STAGE.SEQ_NAC_OFFER_KEY.NEXTVAL@DSTAGE
FROM
(SELECT DISTINCT A.CREATIVE COL1, B.CMPGN_KEY COL2
FROM PROMO_STAGE.CAMPAIGN@DSTAGE B,
ROCEONOF.NACQ0211_2_FINAL@OGD A
WHERE B.CMPGN_ID = 'NAC_'|| to_char(add_months(SYSDATE,-1),'YYYYMM'));
Incidentally, judging by the column names, it appears that the columns in your insert statement are not listed in the same order as in the select statement, which of course they should be. -
I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web, I came up with this code inside my service:
[WebGet]
public IQueryable<Entity> GetEntitiesByParameterId(int parameterId)
return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable();
Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId=1 executes
the stored procedure and returns entities that should be returned. No problem there.
Everything works well until I try to use $select OData option ie. ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name.
Upon debugging, the method above runs without any error but it returns an Operation could destabilize the runtime error upon reaching the
client. After so much research, apparently it is a very general error pointing to a lot of different causes. I haven't found one that really matches my particular problem. Closest are
http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
https://social.msdn.microsoft.com/Forums/en-US/d2fb4767-dc09-4879-a62a-5b2ce96c4465/for-some-columns-entity-properties-executestorequery-failed-with-error-operation-could?forum=adodotnetdataservices
but none of the solutions worked on my end.
Also, from the second article above:
This is a known limitation of WCF DS. ...
Second is that some of the queries won't work correctly because LINQ to EF needs little different LINQ expressions than LINQ to Objects in some cases. Which is the problem you're seeing.
It has been posted on 2012. If it its true, are there still no updates on this? And is there any other workaround to get the $select working on the stored proc call?
What works:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$top=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$skip-5
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$filter={filter query}
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$expand=SomeNavigationProperty
What doesn't work:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name
Tech details:
EntityFramework 5, WCF Data Service 5.0, OData V3
*I've also tried upgrading to EF6 and WCF 5.6.2 and it still didn't work.
Any help would be appreciated. Thanks!Someone from SO replied to my question there and said that $select is still not supported though I couldn't find any definitive documentation about it.
From what I gather and observed, $select breaks the stored procedure call because it tries to alter the data shape already gotten from the database and attempts to return a dynamic entity instead. Something about the stored proc returning an ObjectResult might
be messing it up. As I have said, these are merely my observations.
Workaround: I found a simple and elegant workaround for it though. Since my stored procedures are only getting data from the database and does
not alter data in any way (INSERT, UPDATE, DELETE), I tried using table-valued functions that returns a table equivalent to the entity on my EF. I've found that calling this function on the Service Operation method returns an IQueryable<Entity> which
is basically what is needed. $select also works now and so does other OData query options.
Steps:
Create a function on the database
Update EDMX -> Add function
Add new Function Import with Entity return type
Create service operation in WCF Data Service that calls CurrentDataSource.<FunctionName>()
Test in fiddler.
CODES
Database Function:
CREATE FUNCTION GetEntities(@parameter)
RETURN @entites TABLE(
[Id] [int],
[Name] [nvarchar](100),
AS
BEGIN
INSERT INTO @entities
SELECT [Id], [Name], ... FROM [EntityTable]
RETURN
END
WCF:
[WebGet]
public IQueryable<Entity> GetEntity(int parameter)
return CurrentDataSource.GetEntity(parameter);
It doesn't really solve the stored procedure problem but I'm marking this as answer until someone can provide a better one as it does solve what I'm trying to do.
Hope this helps others too. :) -
Hi All,
I am getting the error 'Comma without preceding colon (after SELECT ?).' with the following select statement. Can someone help me with the error.
select single actdate_from actdate_to
into ( lv_actdate_from, lv_actdate_to )
from zsdcoop
where kunnr = wa-kunnr and pfnum = wa-pfnum.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Endif.
Thanks,
Veni.Typically, on statements like this, you want to use AND instead of OR. Google "truth tables" for a detailed explanation of why.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Should probably be:
if ( lv_actdate_from NE wa-actdate_from ) AND ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'. -
Error in Select statement from DBLINK
Hi,
I have created a DBLink DBLNK206 as below:
CREATE PUBLIC DATABASE LINK DBLNK206
CONNECT TO BIO
IDENTIFIED BY BIO
USING '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.60.201)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))';
But when from the local schema I execute the select statement
select * from BNK_FRHNBK@DBLNK206;
ORA-12170 - TNS:Connect timeout occurred
But when directly connecting the same schema through sqldeveloper or toad
and executing the
select * from BNK_FRHNBK ;
I am getting the desired output.
Any help regarding this will be greatly appreciated.
Thanks In Advance
AshwiniMake sure tnsping to ORCL database is working fine and use tns alias name like using 'orcl.world'; insted of full description.
>
USING '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.60.201)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))';
>
http://www.dba-oracle.com/t_how_create_database_link.htm
Edited by: %bala% on May 2, 2013 1:12 PM -
Regarding error in select statement
Hello CRM Gurus,
i have 2 questions to ask from you all:-
1. i am getting a problem of overlapping of values fetched by select statement.. so any idea what shall i do?
2. practically when we use for all entries in select statement if possible explain through a buisness scenario?
anhiyta ..HI Anhitya,
1. for select statement are you using both the select statement in 1 loop or in 1 condition?
2. we use for all entries when we require to compare on basis of all the entries present in a table
for example if u have to fetch address of a bp partner then u wiill select bp from but000 into itab
and den u will write select addr from butadr for all entries in itab.
i hope this may help
saloni -
Hello experts,
i am quite new to forms and i am trying to do a select based on a condition. but its giving me and error
post_query
begin
if :EFT_EXCLUSION.retailer_num <> null and :EFT_EXCLUSION.bank_acct = null
select retailer_name
into :EFT_EXCLUSION.retailer_name
from retailers
where retailer_num = :EFT_EXCLUSION.retailer_num;
else if :EFT_EXCLUSION.bank_acct <> null
select retailer_name
into :EFT_EXCLUSION.retailer_name
from retailers
where bank_account_id = :EFT_EXCLUSION.bank_acct;
end if
end;error
encountering the symbol SELECT when expecting one of the following
i'm not too sure if my code is okif :EFT_EXCLUSION.retailer_num is NULL and :EFT_EXCLUSION.period_id is NULL thenTry to check you this statement i mean THAT :EFT_EXCLUSION.retailer_num and :EFT_EXCLUSION.period_id are NULL or not to make sure create one message before calling this procedure to check the values of these fields.
EFT_EXCLUSION.SAVEAlso confirm the name of this button i mean block and button name are same as you defined.
For the debug create message before calling this procedure like
MESSAGE(':EFT_EXCLUSION.retailer_num='||:EFT_EXCLUSION.retailer_num||' :EFT_EXCLUSION.period_id='|| :EFT_EXCLUSION.period_id);
MESSAGE(':EFT_EXCLUSION.retailer_num='||:EFT_EXCLUSION.retailer_num||' :EFT_EXCLUSION.period_id='|| :EFT_EXCLUSION.period_id); place these lines before calling the procedure you created so it will be sure that both the fields are NULL and for the items ENABLE/DISABLE we use the same code which i gave you before. Problem is in you IF condition.
-Ammad -
i am getting the following error after executing the below mentioned statements
ORA-00904: "BR"."MPR_ID": invalid identifier
00904. 00000 - "%s: invalid identifier"
select 'insert into FRP_MD_VALUES(FRPDES_ID,MPR_ID,VALUE) values (1,' || BR.mpr_id ||',' || BD.wert_num ||');'
from BERICHTSDATEN BD, BERICHTE BR
where
BD.STAND_DAT = TO_DATE('072010','MMYYYY') and
BD.brg_id = 4146
AND BD.BRT_ID=BR.BRT_ID
AND BR.MPR_ID Is not null
union all
select 'insert into FRP_MD_VALUES(FRPDES_ID,MPR_ID,VALUE) values (3,' || BR.mpr_id ||',' || -BD.wert_num ||');'
from BERICHTSDATEN BD, BERICHTE BR
where
BD.STAND_DAT = TO_DATE('072010','MMYYYY') and
BD.brg_id = 4166
AND BD.BRT_ID=BR.BRT_ID
AND BR.MPR_ID Is not null
ORDER BY BD.FRDES_ID;
but if i am excluding the order by br.mpr_id statement i am not getting any error ,
could u please help is there any prob with the syntaxHi,
Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements) so people can re-create the problem and test their solutions.
user13375778 wrote:
i am getting the following error after executing the below mentioned statements
ORA-00904: "BR"."MPR_ID": invalid identifier
00904. 00000 - "%s: invalid identifier"Are you sure thie error message above is being caused by the query below?
If you would post some sample data, we wouldn't have to guess, and you'd get a good answer sooner.
>
>
select 'insert into FRP_MD_VALUES(FRPDES_ID,MPR_ID,VALUE) values (1,' || BR.mpr_id ||',' || BD.wert_num ||');'
from BERICHTSDATEN BD, BERICHTE BR
where
BD.STAND_DAT = TO_DATE('072010','MMYYYY') and
BD.brg_id = 4146
AND BD.BRT_ID=BR.BRT_ID
AND BR.MPR_ID Is not null
union all
select 'insert into FRP_MD_VALUES(FRPDES_ID,MPR_ID,VALUE) values (3,' || BR.mpr_id ||',' || -BD.wert_num ||');'
from BERICHTSDATEN BD, BERICHTE BR
where
BD.STAND_DAT = TO_DATE('072010','MMYYYY') and
BD.brg_id = 4166
AND BD.BRT_ID=BR.BRT_ID
AND BR.MPR_ID Is not null
ORDER BY BD.FRDES_ID;
but if i am excluding the order by br.mpr_id statement i am not getting any error ,
could u please help is there any prob with the syntaxDon't use table names or aliases (like BD or BR) in the ORDER BY clause of a UNION.
In a UNION, unlike most other queires, you can only ORDER BY columns in the output.
That means you can't say "ORDER BY <b>BD.</b>FRDES_ID", because the output column is called FRDES_ID.
That would explain why you would get an error
ORA-00904: <b>"BD"."FRDES_ID"</b>: invalid identifier. If you're getting the error
ORA-00904: <b>"BR"."MPR_ID"</b>: invalid identifier, then either you don't have a column by that name in that table, or you're running a query other than the one you posted, perhaps one that has "<b>BR.</b>MPR_ID" in the ORDER BY clause.
Maybe you are looking for
-
Premier Pro CC 2014 update error U43M1D204
I've been trying to update premiere for a day or so and each time I get this error code (I'm on an iMac, Yosemite, Creative Cloud). I've tried emptying the AAMUpdater folder in the library (~/Library/Application Support/Adobe/AAMUpdater/1.0/) but it
-
I just got an iPod shuffle yesterday and I have downloaded the latest update for iTunes (10.7) and when I plugin it in it says that I have not got the correct software for the iPod
-
My IPod 5 shut down and wont turn back on. people say to hold down home and lock button but my home button doesn't work. what do I do?
-
Print button moved when opening PDF in Firefox 26
I use Firefox with a company made website that allows me to create FedEx shipping labels. When I create the label, it opens in a pop up window as a pdf file. In Firefox 25 and previous versions, there was a button at the top that I could click for "p
-
Hi Experts, I required help on the following process which we follow for issuing out loan items to our customers: We are distributors of IT products selling to dealers, any time a new product is launched in the market we need to provide few top custo