Issue with FOR loop in Nested BEGIN and END terminals
Hi All,
I am trying to fetch row by row using FOR loop on CURSOR.An i am getting Error attached screen shot:
Below is the logic:
Create Procedure TEST1() LANGUAGE SQLSCRIPT AS
BEGIN
AN01 = Select * from AN.View;
AN02 = SELECT DISTINCT F1,F2,F3 from :AN01 GROUP BY F1,F2,F3;
BEGIN
DECLARE CURSOR ITEM_RULE FOR select F1,F2,F3 from :AN02;
FOR V_ITEM_RULE AS ITEM_RULE DO
SELECT * from TABLE1 where F1 = V_ITEM_RULE.F1;
END FOR;
END;
END;
Here i an getting data from AN01..Then finding the Distinct in AN02.
On AN02 i am applying CURSOR...and for each row i wanted to find an entry in TABLE1 and do a calculation further.
-- But when i am using a FOR loop in the Nested BEGIN i am getting below Error.
-- I tried to Activate successful without FOR Loop.
Any Suggestion on the above issue.
Thanks
kalyan
Hi Kalyan,
Your procedure is incomplete.
Why are you looping to make a select that you do not use? What is the target for ITEM_RULE_GDS selection?
Also, like it is currently exposed a JOIN is highly recommended.
Are you just playing around with procedure or you really have a scope to do ?
Regards, Fernando Da Rós
Similar Messages
-
How do I remove residual frames at the beginning and end of a video?
I'm making a short clip with black slugs at the beginning and end. But there are two or three residual frames from the incoming clip after the black clip that stay at the beginning and end of the video and I can't remove them. I've tried trimming the beginning and end of the video several different ways, and the frames won't disappear. They stay in the video when I make a DVD. The very first and very last frame have sprocket holes in them on the edge of the frame. I'm baffled. Is this an artifact of using the trial version?
chances are they are from a fade. have you zoomed in really really close and checked if there is a small fade in or fade out? happens to me all the time, and with the fade out, you can't do anything to fix it (that I've found) except replacing the clip from your Browser. See my similar question here:
https://discussions.apple.com/thread/3589714
Hope that helps. -
Sync issues with playlists. Not syncing playlists, and now my playlist have disappeared from iTunes. I am Using iTunes 11.1.3 and iOS 7.0.4
Hello surig84,
Thank you for providing the details of the issue you are experiencing when syncing your iPad. I recommend reviewing the following article specifically the section titled "Authorize using the correct account name."
iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
http://support.apple.com/kb/ts1389
Thank you for using Apple Support Communities.
Best,
Sheila M. -
Recently upgraded to a Canon Mark 3 and now having issues with my RAW files in Bridge and Photoshop. I have operating with CS4. Photoshop produces and error " Could not complete your request because photoshop does not recognize this type of file"
Assuming you mean 5D Mark III, Photoshop CS4 cannot directly open raw files from your camera.
Generally speaking, Adobe stopped updating older versions to be able to read raw files from newer cameras when they released a new major version of Photoshop. Photoshop CS4 is no longer receiving Camera Raw updates.
You can double check this yourself:
First you need to determine whether Adobe has released support for your new camera in your version of Photoshop. To do that, look at these two pages. You'll want to find out the earliest version of Camera Raw that can support your camera, then what version of Photoshop can run that version of Camera Raw.
Camera Raw plug-in | Supported cameras
Camera Raw-compatible Adobe applications
If you find your camera is supported by your version of Photoshop, you need to download the latest update for Camera Raw. There's more information on how to do that here:
Keeping Photoshop Up-To-Date
If your version of Photoshop cannot support your camera, you can download and install the latest version of the free Adobe DNG Converter, which can take your raw files as input and put out DNG format files, which your version of Photoshop can open.
Photoshop Help | Digital Negative (DNG)
The DNG converter DOES work, but if you want maximal quality from your raw files (not to mention the convenience and ease of use of directly opening your raw files) you'll want the latest version of Photoshop. Adobe has made substantial improvements in raw conversion quality in recent years.
-Noel -
URL issue with Windows 7 Internet Explorer 11 and SAP NW PI 7.
Hello SAP community,
I am facing a strange issue with Windows 7 - Internet Explorer 11 and SAP NW java services (I hope I am in the correct discussion) ...
When I try to open URL http://sapserver.hosters-name:port it is working so far with Windows 7 and Internet Explorer 11.
But when I click than on NWA (example), I am getting "http 500 server error".
I don't have the issue, when I start-up a VMware Workstation with Windows XP and Internet Explorer 8.
But now the strange part: In our network DNS (Domain Name Service), we can also open the URL by http://sapserver.our-dns:port.
Than it is working without problems with Windows 7 and Internet Explorer.
I would agree to state the comment - it is just a Windows 7/Internet Explorer 11 issue, if it wouldn't work for both URLs (http://sapserver.hosters-name:port = problem URL; http://sapserver.our-dsn:port = working).
We are using a SAP NW PI 7.x system. Some URLs for PI are using http://sapserver.hosters-name:port/java service.
Do you have any hints what is cause the issue - I suspect some with Internet Explorer and Firefox (because with Google Chrome at least the URL for NWA is opened, beside the issue, Google Chrome can't display NWA content)?
Thanks for your help.
Best regards
CarlosHi all,
I think I found the solution.
The reason seems to be, the domain name for http://sapserver.our-dns:port, "our-dns" was already added to the compatibility view settings of Microsoft Internet Explorer.
That seemed to be the reason, why it was working with http://sapserver.our-dns:port.
When I now added for http://sapserver.hosters-name:port the domain "hosters-name" to the compatibility view settings it is now working.
Internet Explorer Options => Settings for compatibility view => Add domain
Best regards
Carlos -
Help on changing array elements with For loop
Hi,
I'm wondering if anyone can help me with this problem. I'd like to be able to modify elements of an array with For loop. In the attached VI, my goal is to have an array of [0 1 2 3 4 5], but instead what I've got is [2 2 2 2 4 5]. I initialized the array with a value of 2 to help me identify which elements are changing. Can anyone help me pointing where my mistake is? Thanks.
Peter
Attachments:
Array test.vi 19 KBIt's a classic issue for LV newbies. In this case you HAVE to use a
shift register otherwise the modifications of previous cicles are lost.
It's all easier than it's seems, see attached vi.
bye,
manga
Attachments:
Array test 2.vi 19 KB -
Making 2 for loops without nested
How to make two for loops without nested like the follwoing
for i in 1.10, j in 1..30 loop
end loop
Please help meFollowing is the closest I could think of...
SQL> ed
Wrote file afiedt.buf
1 declare
2 type myrec is record (ctr1 number, ctr2 number);
3 type tabrec is table of myrec ;
4 v_tabrec tabrec := new tabrec();
5 begin
6 for i in 1..10 loop
7 v_tabrec.extend;
8 v_tabrec(i).ctr1 := i;
9 v_tabrec(i).ctr2 := i;
10 end loop;
11 for i in 11..30 loop
12 v_tabrec.extend;
13 v_tabrec(i).ctr2 := i;
14 end loop;
15 for i in v_tabrec.first..v_tabrec.last loop
16 dbms_output.put_line(v_tabrec(i).ctr1 || v_tabrec(i).ctr2);
17 end loop;
18* end;
SQL> /
11
22
33
44
55
66
77
88
99
1010
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 -
Hi,
I had issues with iPad/iPhone access from external and tried a lot. Now I found my solution I like to share.
I setup a IIS on Windows Server 2012 with ARR 2.5 and Android and Windows Phone could login but not iPad and iPhone.
The IIS Log on the reverse proxy showed:
2013-02-26 12:03:31 <IP> POST /webticket/webticketservice.svc X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=1996c8d7-09d0-4310-8da4-a8dfb7940e28 443 - <ClientIP> Lync%202010/1.6+CFNetwork/609+Darwin/13.0.0 - 401 0 0 124
2013-02-26 12:03:31 <IP> POST /webticket/webticketservice.svc X-ARR-CACHE-HIT=0 443 - <ClientIP> Lync%202010/1.6+CFNetwork/609+Darwin/13.0.0 - 502 3 12018 93
First Request gets a 401 while anonymous. Second try would be with authentication but it never reached the internal front end server.
After I installed a fix for ARR
http://forums.iis.net/t/1195560.aspx/1?ARR+502+3+Bad+Gateway+0x80072ef2+2147954418+The+supplied+handle+is+the+wrong+type+for+the+requested+operation the Apple Devices could login.Hi,
This resolved our problem too!! So happy after 2 weeks of messing around with just about every setting recommended from all types of forums and rebuilding our reverse proxy I was at a loose end.
Our environment is Lync 2013 Enterprise, Lync 2013 Edge, IIS as Reverse Proxy on Server 2012 using ARR 2.5
We had Android and Windows clients working but no iOS devices at all. In the iOS log we were seeing
<h1>Server Error</h1></div><div id="content"> <div class="content-container"><fieldset> <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2> <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3> </fieldset></div></div></body></html>
When the client was trying to retrieve from the webticketservice.svc
2013-04-11 17:19:44.659 Lync[4970:6c61000] INFO TRANSPORT TransportUtilityFunctions.cpp/907:<ReceivedResponse>
POST https://lyncwebext.contoso.com/webticket/webticketservice.svc
Request Id: 0x72cfc18
HttpHeader:Content-Length 1477
HttpHeader:Content-Type text/html
HttpHeader:Date Thu, 11 Apr 2013 16:22:25 GMT
HttpHeader:Server Microsoft-IIS/8.0
HttpHeader:StatusCode 502
Installed the HotFix from here:-
Hotfix for Microsoft Application Request Routing Version 2.5 for IIS7 (KB 2732764) (x64)
Rebooted the Reverse Proxy and iOS clients worked straight away for both Lync 2010 and Lync 2013 on both iPhone 5 and iPad both.
I hope this helps others as I was losing the plot :-)
Cheers
Sam -
I tried playing a you tube video, but received a message prompt to download the latest version of Adobe Flash Player. The link to Adobe stated that there are issues with MAC OS X 10.7 and Flash Player 10.3. The new version did not download. Any Suggestion
Hi Seattle
From Adobe site only!
flashplayer11_b1_install_mac_071311.dmg
Works fine.
Cheers Tomi -
We have been having some issues with Email Notifications not going out and getting hung up in SOST. Can anyone please tell me whether we can use SAP Solution Manager to monitor outbound email?
What version of Solman are you using ? Check in t-code Rz20 >ccms monitor template of satelliate system , there would be option to monitor your outbound mails .You can sutomise your monitorig metrics in solman 7.1 else in 7.01 you use auto reaction methods to monitor .
Regards
Jay -
Inventory Management 0IC_C03: Beginning and ending inventory
Hi Gurus
My report is based on Inventory Management cube and I have a requirement where in I need to show Begining Inventory and Ending Inventory for Plant per Period.
There is no KF for Beginning Invin SAP standard model in inventory management cube (0IC_C03 cube), so I thought to restricting total quantity by Fiscal period and Offset by minus one to get begining inventory.
Here is my report layout:
I have got : Period , Plant in rows and Beginning and ending inventory in Columns.
Desired Output:
Fiscal Period | Plant | | Begining Inventory | Ending Inventory.
03/2009 | 1001 | 100 | 50
Actual Report output
Fiscal Period | Plant | | Begining Inventory | Ending Inventory.
02/2009 | 1001 | 100 |
03/2009 | 1001 | | 50
So basically report is being split on two lines for current and previous (due to restriction in begining period : Offset =-1 on period).
Question is how to achieve both begining and ending inventory for a period in same line.
Thanks in avdance for help and time
SAHI Naveen
Thanks for the reply. Non *** KF are already being used and Standard SAP model is being followed. Problem is not with back end but with frontend. Data coming on the report is fine but problem is how to show them on same line. Remember Beginning inventory for current open is ending inventory for previous month and in SAP content there is no KF called as begining inventory. Basically data from two consecutive periods (current and previous one) needs to be on same row of report, but they are coming on different rows if we have period in drilldown by period. this makes sense but how to overcome this.
This, We have all the correct data but facing issue while displaying that on frontend.
Thanks
Sorabh
Edited by: Sorabh on Mar 23, 2009 5:01 PM -
Using nested BEGIN..END Block....
Hi,
I am unable to use nested BEGIN..ENF Block.See error defined below
BEGIN
BEGIN
SELECT xcod_code INTO v_cmpy_xcod_code
FROM ext_code_type
WHERE xcod_code = sdiStruct.cmpy_xcod_code
AND inst_borg_ind = 'B';
EXCEPTION WHEN NO_DATA_FOUND
THEN
erm := 'CMPY XCOD CODE not found with indicator of B';
RAISE err;
END;
BEGIN
SELECT borg_num,borg_code INTO v_borg_num,v_borg_code
FROM borg_code
WHERE borg_code = sdiStruct.cmpy_id
AND xcod_code = sdiStruct.cmpy_xcod_code;
EXCEPTION WHEN NO_DATA_FOUND
THEN
erm:= 'No borg num or borg code found for CMPY ID and CMPY XCODE CODE entered.';
RAISE err;
END;
EXCEPTION
WHEN err THEN
RAISE_APPLICATION_ERROR(-20001,erm);
END;The ERROR I get is this
LINE/COL ERROR
113/3 PLS-00103: Encountered the symbol "RAISE" when expecting one of
the following:
. ( * @ % & = - + ; < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||If I remove the 2nd nested BEGIN..END BLOCK,It works fine.
Cant I write multiple BEGIN..END BLOCK??The error that you are receiving indicates that it happened on line 113 of your code, so you have obviously left out a whole lot. The portion of the code that you posted works fine, as long as you have all of the correspoinding pieces. I don't know if sdistruct is a package or a row of a cursor or what and I don't know your table structure, so I have just made something up, in order to demonstrate below. In the future, it helps if you include things like complete code and table structure and Oracle version.
scott@ORA92> CREATE TABLE ext_code_type
2 (xcod_code NUMBER,
3 inst_borg_ind VARCHAR2(1))
4 /
Table created.
scott@ORA92> CREATE TABLE borg_code
2 (borg_num NUMBER,
3 borg_code NUMBER,
4 xcod_code NUMBER)
5 /
Table created.
scott@ORA92> CREATE OR REPLACE PACKAGE sdiStruct
2 AS
3 cmpy_xcod_code NUMBER := 1;
4 cmpy_id NUMBER := 1;
5 END;
6 /
Package created.
scott@ORA92> SHOW ERRORS
No errors.
scott@ORA92> CREATE OR REPLACE PROCEDURE your_proc
2 AS
3 v_cmpy_xcod_code ext_code_type.xcod_code%TYPE;
4 v_borg_num borg_code.borg_num%TYPE;
5 v_borg_code borg_code.borg_code%TYPE;
6 erm VARCHAR2(80);
7 err EXCEPTION;
8 BEGIN
9 BEGIN
10 SELECT xcod_code
11 INTO v_cmpy_xcod_code
12 FROM ext_code_type
13 WHERE xcod_code = sdiStruct.cmpy_xcod_code
14 AND inst_borg_ind = 'B';
15 EXCEPTION
16 WHEN NO_DATA_FOUND THEN
17 erm := 'CMPY XCOD CODE not found with indicator of B';
18 RAISE err;
19 END;
20 --
21 BEGIN
22 SELECT borg_num,borg_code
23 INTO v_borg_num,v_borg_code
24 FROM borg_code
25 WHERE borg_code = sdiStruct.cmpy_id
26 AND xcod_code = sdiStruct.cmpy_xcod_code;
27 EXCEPTION
28 WHEN NO_DATA_FOUND THEN
29 erm:= 'No borg num or borg code found for CMPY ID and CMPY XCODE CODE entered.';
30 RAISE err;
31 END;
32 EXCEPTION
33 WHEN err THEN
34 RAISE_APPLICATION_ERROR(-20001, erm);
35 END your_proc;
36 /
Procedure created.
scott@ORA92> SHOW ERRORS
No errors.
scott@ORA92> EXECUTE your_proc
BEGIN your_proc; END;
ERROR at line 1:
ORA-20001: CMPY XCOD CODE not found with indicator of B
ORA-06512: at "SCOTT.YOUR_PROC", line 34
ORA-06512: at line 1
scott@ORA92> INSERT INTO ext_code_type VALUES (1, 'B')
2 /
1 row created.
scott@ORA92> EXECUTE your_proc
BEGIN your_proc; END;
ERROR at line 1:
ORA-20001: No borg num or borg code found for CMPY ID and CMPY XCODE CODE entered.
ORA-06512: at "SCOTT.YOUR_PROC", line 34
ORA-06512: at line 1
scott@ORA92> INSERT INTO borg_code VALUES (1, 1, 1)
2 /
1 row created.
scott@ORA92> EXECUTE your_proc
PL/SQL procedure successfully completed. -
How can I put asterisk in the beginning and end of a search parameter..?
Hi!
I'm developing a program for a user where he wants a search parameter for the description about some purchase orders....
The problem is if the user want to make a search for any word he need to put asterisk in the beginning and end of the word because if the user don't put the asterisk the search will not find anything because the program don't know if the word is in the beginning of the description or in the end or in the middle...
How can I put one asterisk in the beginning and end of the search topic entered by the user internally in the program..? I was thinking using the concatenate function but for this will not work because the program think that the asterisk is part of the word and not..
The search parameter of the Description is in range.. (Select-Options).
Thanks for your help!!Thanks keshav!
OK... and if I concatenate the asterisk latter I can make this search?
In the code desc_search is the select_option that I tell u. I use the DESCRIBE to see first if it is not initial... if desc_search have an entry then access the DELETE to remove all the records that are diferent from desc_search.. This desc_search will have the word with the asterisk... and the question is if it works if I use the concatenate before this... anyway I will try but I think that if I use the concatenate the program confuse and take the asterisk as part of the word..
DESCRIBE TABLE desc_search LINES desc_count.
IF desc_count IS NOT INITIAL.
DELETE core_table WHERE desc NOT IN desc_search.
ENDIF.
Let u know if works!!
Thanks! -
Removing punctuation from the beginning and end of a string
I am working on a project for a "spell checking" program. So far the StringHash class is made, and the dictionary is read into a hash table. Then the document to be checked is specified via command line, the document scans through each word and checks to see if it is in the dictionary, if it is do nothing, if it is not then display it to console. The problem I am having is with a method in the main class. The method (I will post what I have so far) is called removePunct. The method should remove any punctuation from the beginning and the end of the string, nothing from the middle. Here is what I have so far:
public static String removePunct(String word){
StringBuilder wo = new StringBuilder(word);
int x = (word.length()-1);
if(!Character.isLetter(wo.charAt(0)))
wo.deleteCharAt(0);
if(!Character.isLetter(wo.charAt(x)))
wo.deleteCharAt(x);
return wo.toString();
Any help would be much appreciated, I'm pretty certain the solution is either something completely different, or something so simple that I just missed it.The easiest way to do this is to just show you the actual file to be spell checked:
-- outline --
This directory contains Bison skeletons: the general shapes of the
different parser kinds, that are specialized for specific grammars by
the bison program.
Currently, there are only three supported skeletons:
- yacc.c
It used to be named bison.simple: it corresponds to C Yacc
compatible LALR(1) parsers.
- lalr1.cc
Produces a C++ parser class. It is still very experimental, and not
yet supported. Please, subscribe to [email protected].
- glr.c
A Generalized LR C parser based on Bison's LALR(1) tables.
These skeletons are the only ones supported by the Bison team.
Because the interface between skeletons and the bison program is not
finished, we are not bound to it. In particular, Bison is not
mature enough for us to consider that ``foreign skeletons'' are
supported.
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Bison.
GNU Bison is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Bison is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bison; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
What I need the spell checker to do is read each word, and strip any beginning or ending punctuation, e.g. (c) would become c. Pretty much punctuation consists of anything that is not a letter, hence the use of isLetter. I can easily modify the method to remove all punctuation using regular expressions, but I only want the beginning and end characters removed.
Example of words:
-yacc.c would become yacc.c and is not in the dictionary so it would be printed. -
Is there a way I can have my form calculate a total time from beginning and ending time?
Is there a way I can have my form calculate a total time from beginning and ending time?
Sorry, but Formscentral doesn't support either a timer function or any kind of calculation. You might be able to do this if created your form in PDF. For help with PDF form creation in Acrobat I suggest you repost your question to the Acrobat Forum.
Andrew
Maybe you are looking for
-
How to add words from a JTextField to a JList
Im working on my final project for Java programming class using JApplet. Im trying to create a spelling test/wordfind I want to be able to have the user type a word in the JtextField press the "Add" button (Jbutton) and have the word be added to the
-
How to exclude the debit memo & credit memo out of COPA report (KE30)?
As captioned, now the current KE30 default transfers all the data from sales orders interfaces (via VA01), such as common sales order, 3rd party drop shipment, credit memo and debit memo etc. Is there any idea to exclude the quantities display in KE3
-
Financial Reporting is compatible with Windows 7?
Hello everyone, I am working with Hyperion Planning v.11.1.2 and Financial Reporting v.11.1.2.674 and I need to know if Financial Reporting is compatible with Windows 7, and where I can locate more information you may need about the technical require
-
Database access error message????
Hello, Could U please Help?????? I am getting the below error message when running the program. Is there any mistake in the database connection method? I am using MS Access database and below is the connection code java.sql.*; Class.forName("sun.jdbc
-
JPanel help Plzzzzzzzzzzz URGENT!
Hey, I have JPanel filled with images........how to identify the images with mouse clicks...????????????????????