Problem regarding passing variable in sdo_ordinate_array
I want to pass user selected points in sdo_ordinate array and return result in an array . I have created two varrays in oracle called ALLPOS and LSTPOS.ALLPOS is output array . I get the desired output when i hard cord the values of sd0_ordinate_array but i am not able to pass any variable parameter in sdo_ordinate_array . If i try to pass a string variable i get invalid number exception . If i pass a varray called LSTPOS i get following exception.
FUNCTION FOO(lstpos in LSTPOS) RETURN ALLPOS
AS
POS_DATA ALLPOS := ALLPOS();
CURSOR c_pos is
SELECT cust_id FROM T_S_CUSTOMERS
WHERE SDO_RELATE(geometry,
SDO_GEOMETRY(2003, 8307, NULL,
SDO_ELEM_INFO_ARRAY(1,1003,1),
SDO_ORDINATE_ARRAY(lstpos)),'mask=inside querytype=window') = 'TRUE';
BEGIN
FOR pos_rec IN c_pos LOOP
POS_DATA.extend;
POS_DATA(POS_DATA.count) := pos_rec.cust_id;
END LOOP;
RETURN POS_DATA;
END;
i get following compilation error
Error(9,24): PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got BATUSER.LSTPOS
Thanks and Regards
Nidhi
Hi!
I would like you using following with MDSYS.SDO_ORDINATE_ARRAY
definition: [CREATE TYPE mdsys.sdo_elem_info_array AS VARRAY (1048576) of NUMBER]
CREATE OR REPLACE FUNCTION FOO(lstpos in MDSYS.SDO_ORDINATE_ARRAY)
RETURN MDSYS.SDO_ORDINATE_ARRAY AS
POS_DATA MDSYS.SDO_ORDINATE_ARRAY := MDSYS.SDO_ORDINATE_ARRAY();
CURSOR c_pos is
SELECT cust_id FROM T_S_CUSTOMERS
WHERE SDO_RELATE(
geometry,
MDSYS.SDO_GEOMETRY(2003, 8307, NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
lstpos
),'mask=inside querytype=window'
) = 'TRUE';
BEGIN
FOR pos_rec IN c_pos LOOP
POS_DATA.extend;
POS_DATA(POS_DATA.count) := pos_rec.cust_id;
END LOOP;
RETURN POS_DATA;
END;
--call the function
declare
-- Non-scalar parameters require additional processing
result mdsys.sdo_ordinate_array;
lstpos mdsys.sdo_ordinate_array := mdsys.sdo_ordinate_array(1,2,3,4);
begin
-- Call the function
result := foo(lstpos => lstpos);
end;regards, Andreas
Similar Messages
-
Problem with passing variable into subroutine
Applescript newbie stumped again...
for some reason when call the subroutine below from my code, I get an error message on the bolded variable.
Error is:
Can't make "test" into type integer.
I am calling the subroutine like this:
createFolder(folderCreationPath, appFolderName)
And am passing in two variables that I have concatenated folder name & path name.
on createFolder(folderLocation, folderName)
tell application "Finder"
if (the folder folderName of folderLocation exists) then
display dialog folderName & " already exists."
else
make new folder at folderLocation with properties {name:folderName}
end if
end tell
end createFolder
When I display the variables inside the subroutine, both appear to be strings.
Any help would be appreciated.
Thank you.If I knew how to upload a file to the forum I would do so...
Copy & paste into script editor would reformat.
Here's the full script:
---SubRoutines------------------------------------------------------------------ ------------------------------------------------------------------
on createFolder(folderLocation, folderName)
display dialog "FolderName: " & folderName & "
Folder Location: " & folderLocation & "
" & folderLocation & folderName
tell application "Finder"
if (the folder folderName of folder folderLocation exists) then
display dialog folderName & " already exists."
else
make new folder at (folderLocation as alias) with properties {name:folderName}
end if
end tell
end createFolder
---Main Code--------------------------------------------------------------------------- ------------------------------------------------------------
set projectName to "Project " & the text returned of (display dialog "What is the name of your Project?" default answer "")
set projectLocation to choose folder
---create root project folder
createFolder(projectLocation, projectName)
---create subFolders
--List of Folder names:
set FolderMediaType to {"Project", "Media & Imports", "Exports"}
set projectApplication to {"FCP", "Soundtrack", "LiveType", "Motion", "DVD Studio Pro", "Web Videos"}
set projectLocation to projectLocation & projectName --Set's project location to include project folder
repeat with iProjectApplication from 1 to count (projectApplication)
set folderCreationPath to ((projectLocation as string) & ":") --set's folderCreation to include project folder
set appFolderName to ((iProjectApplication as string) & "-" & (item iProjectApplication of projectApplication))
createFolder(folderCreationPath, appFolderName)
set folderCreationPath to projectLocation & ":" & appFolderName & ":"
repeat with iFolderMediaType from 1 to count (FolderMediaType)
set mediaFolderName to iFolderMediaType & "-" & (item iFolderMediaType of FolderMediaType)
createFolder(folderCreationPath, mediaFolderName)
end repeat
end repeat -
Problem with passing variable to restful uri's.
I have a restful URI in the format http://localhost/functionname/{itemID}. I use this URI to retrieve JSON formatted information. Through Flash Builder 4 data services I create an operation that makes use of this URI and I also hame itemID a URL parameter. The problem is that whenever I call this function from my program Flex uses the following URI instead " http://localhost/functionname/%7BitemID%7C" in other words it doesnt replace the "{itemID}" with my variable. I am using SDK 3.4 to compile. Is this a known bug and if yes how can I circumvent it? Please notice that the project needs to compile using SDK 3.4 no matter what. Thank you for reading.
Depending on how you set it up, it isn't clear that the compiler will see
as a binding expression. What does your code look like that sets
it up? -
Passing variable values to the navigation block
Hi WAD Experts,
I have a requirement regarding passing variable values to the navigation block. User requirement is first give the selections on the selection screen and then after executign output should display in browser. In the output page we have a navigation block. So when user gives selections those selections should also populate in the navigation block. Your help will be appreciated.
Prasad.Hi,
if your variable is 'Changeable at Query Navigation' the chosen values will appear in the Navigationblock.
Variables which are 'Not Changeable at Query Navigation'
will not appear.
You can set this Property when you create a Variable.
Kind Regards,
Alican Polat -
Passing variables from one swf to another
I am facing problem to pass variable from one swf to another.
I am using loadMovie to load another swf. how can I pass a variable
value to another swf. Can anyone help me plz? It is somewhat
urgent.
thanx in advance.first of all:
this is the Flash Media Server and your problem is not
related to FMS....
second thing related to the "somewhat urgent" :
we, users on this forum, are not there to do your job... so
calm down otherwise no people will answer your question. This forum
is a free support forum that community of Flash developer use to
learn tricks and to solve problems.
Possibles solutions:
If the two swf are seperate you can use LocalConnection to
establish a connection between different swf.
If you load a second swf into the first one you can interact
like a standard movieClip(only if there from the same domain or if
you a policy file on the other server)
You can use SetVariable(via Javascript) to modify a root
variable on the other swf and check with an _root.onEnterFrame to
see if the variable had changed in the second swf.
* MovieClipLoader will do a better job, in your specify case,
than the loadMovie. Use the onLoadInit event to see when the swf is
really totaly loaded into the first one otherwise you will have
timing issues.
My final answer(lol) is the solution 2 with the
notice(*) -
Regarding passing memory variable to transaction
Hi All,
I have issue regarding passing memory variable to transaction CO02.
Here i have to create a program in that i have to
<b>1.</b> <b>Create a memory variable, ZPPI0601_SOL and set it to X</b>.
2. <b>Then i need to call transaction CO02, here this transaction will hit one USER-EXIT. in that program
i need to do following</b>
3.<b>Activate the user exit for transaction CO01, CO07, CO10, CO40 and CO41 or if (memory variable, ZPPI0601_SOL = X and Transaction code = CO02)</b>
then some code will be there that will be processed.
and then
<b>4.If (memory variable, ZPPI0601_SOL = X and Transaction code = CO02): SAP does not provide the values in the user-exit, so we need to get these from the tables:</b>
<b>i)For RESB-RSNUM = HEADER_TABLE-RSNUM and RESB-XLOEK = and RESB-KZEAR = and RESB-BDMNG > 0, get RSPOS, MATNR and BDMNG (these are fields the user-exit gets which corresponds to C04 to C06 in the spreadsheet). Pass these fields thru the same routine as the user-exit (ex: to convert the MATNR to legacy part#).</b>
Then after finishing USER-EXIT part as above i need to come back to my main program and do following.
<b>5.After all records have been processed, set memory variable, ZPPI0601_SOL = . Exit</b>
Can any body tell me how can i do the above.
Thanks in advance.
Thanks & Regards,
Rayeez.Hi Shaik,
export Sy-TCODE TO MEMORY ID 'ZTCODE'.
Then in use the following in the user exit.
Data: ZTCODE type SY-TCODE.
import ZTCODE FROM MEMORY ID 'ZTCODE'.
If you want to activate your user exit only in Change/Display mode.
You can try
IF T180-TRTYP <> 'H'.
Endif.
Lanka
Message was edited by: Lanka Murthy -
Problem to pass Oracle variable to Unix
11gr2
Problem to pass Oracle variable to Unix
refer to echo $x
in korn shell
$cat /tmp/x.sh
"/tmp/x.sh" 11 lines, 208 characters
#!/bin/ksh
x=`sqlplus -s myacc/myacc <<endl
set echo off verify off feed off termout off pages 0
SELECT p.spid
FROM v$session s, v$process p
WHERE s.paddr = p.addr
AND s.sid =2;
exit
endl`
. /tmp/x.sh
$ echo $x
FROM v s, v p check_logfiles._var_adm_kernlog.seek csn.16 myspid.sh pw_management ssh-BbLO7942 x.sh ERROR at line 2: ORA-04044: procedure, function, package, or type is not allowed hereuse sqlplus
sql> select p.spid
2 FROM v$session s, v$process p
3 WHERE s.paddr = p.addr
4 AND s.sid =2;
SERVER
PID
22965Edited by: jmft2012 on Mar 23, 2013 9:23 PMjmft2012 wrote:
$cat /tmp/x.sh
"/tmp/x.sh" 11 lines, 208 characters
#!/bin/ksh
x=`sqlplus -s myacc/myacc <<endl
set echo off verify off feed off termout off pages 0
SELECT p.spid
FROM v$session s, v$process p
WHERE s.paddr = p.addr
AND s.sid =2;
exit
endl`
. /tmp/x.sh
$ echo $x
FROM v s, v p check_logfiles._var_adm_kernlog.seek csn.16 myspid.sh pw_management ssh-BbLO7942 x.sh ERROR at line 2: ORA-04044: procedure, function, package, or type is not allowed hereuse sqlplus
sql> select p.spid
2 FROM v$session s, v$process p
3 WHERE s.paddr = p.addr
4 AND s.sid =2;
SERVER
PID
22965
since the here script is being processed by the command line interpreter, it resolves "$session" & "$process" to be null values.
You need to be smarter than the tools you are (ab)using.
Handle: jmft2012
Status Level: Explorer (65)
Registered: Nov 13, 2009
Total Posts: 355
Total Questions: 74 (32 unresolved)
I extend my condolences to you since you rarely get answers to your questions here. -
Problem with application-variables - CFLOCK?
Hi,
i have a problem with my application. It is a multi-user
application with 100 parallel-users and CFMX 7.
The problem wich occures is with application variables. These
are mainly structs wich get filled onApplicationStart(). The
problem is, that the variables suddenly disappear, they are empty.
I have read about CFLock and found out, that it is necesseary
to use cflock. And i found out, that onApplicationStart does
correct locking automatically. That is where i do not understand
the problem. The variables get intialized correctly and in further
they only get read-access. Why can they be corrupted?
My other question about that is, wheather i need cflock for
all Read-Access to Application and Session-Variables, even if there
happens no writing to the variables?
Best Regards,
Andreas> ?The element of position 2, of dimension 2, of an array
object used as part of
> an expression, cannot be found.?
> The array is in this case the struct.
Well, OK, that could be a problem. Arrays are not structs:
they are two
different things, are not interchangeable, and have
completely different
sets of functions to utilise them. You cannot treat a struct
as an array.
If CF is claiming your "struct" is an array, then it actually
*is* an
array, not a struct.
What's the line of code which is generating that error?
I suppose one could get this error if you have an array of
structs thus:
myArray
.key1
myArray.key2
(etc)
and you're trying to reference it with a numeric key rather
than by key
name, eg:
myArray
[n]
When n is an integer value, rather than a string (which
corresponds to the
name of the key).
> > Have you trapped the error, done a <cfdump>
of the application scope and
> > checked to see if it's the whole lot going awry, or
just some values?
> I have not used cfdump for it, because the server had to
be immediately
> restarted for our customers. But i think, that it is
not completely empty,
> because the index runs to pos2 of dimenstion2.
So does this not happen in your dev / testing environment?
> Will
> onApplicationStart() be called before? Or only if
onRequestStart() returns true?
I would ***-u-me that the application one would be called
before the
request one. It's pretty easy for you to test this though, I
should think?
(Sorry: for reasons beyond the scope of this conversation,
we're still
forced to use Application.cfm in our software, so I've only a
passing
knowledge of how Application.cfc works).
> Here is the code from onRequestStart()
> <cffunction name="onRequestStart"
returntype="boolean">
> <cfargument name="Requestedpage" required="yes" />
> <cfscript>
> var lFile = "/cargorent/Login.cfm";
> var iPosn = ListFindNoCase( lFile,
Arguments.Requestedpage );
> if( iPosn gt 0 )
> return true;
>
> if( NOT IsDefined( "session.user.Loginname" ) or
session.user.Loginname eq
> "" )
> {
> WriteOutput( "<p><p> The current user is no
longer valid, please log in
> again.</p></p>" & chr(10) & chr(13)
> WriteOutput( "<script
language=""javascript"">parent.location = ""
http://"
> & CGI.HTTP_HOST &
"/Login/Login.cfm"";</script>" );
> return false;
> }
>
> return true;
> </cfscript>
> </cffunction>
One thing I will say here is that I really think you should
be separating
your processing from your display. A function should do
processing. it
should pass that processing back to a CFM template which
should handle
whatever needs to be displayed on the browser. Although
that's nowt to do
with your current issue.
Adam -
Problem with passing dashboard prompts
Hi All,
I have a problem with passing dashboard prompts.
Scenario:
I have a report with country(column interaction),amount sold and two prompts.when the user selects the particular country, i need to navigate to other detailed dasboard with 2 prompts and country.
with the column interaction, am able to navigate to other dashboard with all the prompts only when the target dashboard prompts, defaults to presentation variable.
but when the user directly opens the target dashboard, i have to display the report with the default values which am not able to achieve.
All the prompts are customized prompts.
Any suggestions would be greatly helpful.
Thnx in AdvanceHi,
When you drill down, corresponding filter values get added to your report. So next time when you change the prompt values It does not give you proper data.
So before you change the prompt values, you comeback to the default report. and try changing the prompt values.
Otherwise you can do one thing, Do not enable drill in place for the report section. So when you try to drill down in the report, it takes you to the new page.
And in the main page even if you change prompt values, It will work perfectly.
Regards,
TKB -
Passing variable val to UPC_BUNDLE_EXECUTE_STEP program in prc chain
Hi
i have a problem regarding background sheduling of Global Planning Sequence using Process chain.This Global sequence should run for different values of a char.In my level i restricted that Char with a variable which is ready for input.In process variant i maintained the values of Char to be Executed.When i am running the Process chain it is giving the following Error message.
Characteristic XS_CRCLR must be ready for input in package XPPWLN05 .
I tried to remove the variable in level and made it as selection and tried to select a variable in Packge .It is not allowing me to select a variable.
1.Is there any way to Solve this Problem?
2.and i am thinking of passing variable value through ABAP program in process chain after every execution. will this work?
Is there any document regarding Background scheduling of global Sequence?
any suggestions will be appreciated.
Thanks
SureshHi Suresh,
I felt links may be better useful fro you...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/help/sdn_nw04/saphelp_nw04/helpdata/en/80/a22130f6fc4264a822e9895468f3f5/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/forums/sdn_jive_forums/thread{74687265616449443d3534353238}.jspa
Thanks,
Raj -
Passing variable value as a prompt
Hi All,
I have one problem related to passing variable through prompt. let's discuss whole situation. Suppose I have 5 interface having variable say user_id in each interface. And 5 packages for each interface. Now I have generated scenario for these packages. I am using these scenario to create one master package. Also I have created scenario for master package. Now I want to do something like this. When I execute scenario of this master package there should be one prompt asking value for user_Id value and that value should pass to all packages and interface and same value should be inserted in target table. I can bring prompt but can not insert that value in database.
Request you to help me out in this case.
Thanks and Regards
-PallavHi Pallav,
Not sure how are you trying to insert the variable value in the database but you can create an ODI variable to capture the user entered data from the scenario UI and you can pass the same variable to the underlined package/interfaces.
Could you elaborate a bit more on the inserting the variable value in the database.
Thanks -
Passing variable from one template to another
We have problems in the BI7 environment with passing variables across from one web template to another.
In BW3.x there was a Java Script Command SAP_BW_URL_Get used to construct URLs.
(Please also see the SAP documentation: http://help.sap.com/saphelp_nw04/helpdata/en/b4/0fa239cec06b40e10000000a11402f/content.htm)
In BI7 this command seems to be not existent.
But as it is such a basic functionality I cant believe that is not available anymore.
I guess it is replaced by another command.
Could you help us to find a functionality that replaces the SAP_BW_URL_Get command?Hi Andrew,
Did you manage to find any solution for this one?
Currently we are also facing the same problem.
Thank you in advance.
Best regards,
Fen -
HI,
I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
regards,
krisHi,
here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
1st:in the query designer at key figure coloumn create
one local formula.in that local formula create formula
variable with replacement path.in that take reference character
notification completion.in the next tab take replace ment
as key.in the last tab select "date".
2nd: do the same thing for the notification creation date.
3 rd : create 3 rd local formula and do the substraction
for the first 2 local formulas.
4th:create codition on the difference which u have find with
on that condition u can create one user entry varibale.
5th:while u defining the query put these 2 dates,i,e
notification completion, notification creation date in the character block.
If not system will ignore the formula variable which u created in
above steps.
Hope this wil help u.
regards....KP -
Problem in Passing on the Incoming Excise Invoice Amount
Dear All,
My client is a manufacturer but he is purchasing the rawmaterial from the Trader.
Now within the G R PO he enters the Qty , Unit Price of the Trader and the Accessable Value of the Product. The same he copies it to the Incoming Excise Invoice and then copies the same to the A/P Invoice.
Item no. Qty Price Accessable Value Total TaxCode Tax Amt
M1 2160 53.00 45.11 114480 BED+ VAT 18630
The Breakup of Tax Amt is as below.
BED 14% on 97437.60 ( 45.11 * 2160) = 13641
Ecess 2% on 13641 = 273
HSCess 1% on 13641 = 136
VAT 4% on 114480 ( 53 * 2160) = 4580
Hence Tax Amt Total = 13641 + 273 + 136 + 4580 = 18630
Above is the Scenario which is done in SAP B1.
But my Clients requirement is he does not want to post the BED Amount to the Trader as the Trader has just passed the Excise Amount from the Manufacturer to my Client.
Hence Following Posting in G/L Accounts is done in SAP B1
Vendor ( Trader ) 133110 [ 114480 + 18630(Tax) ]
VAT 4% (Receivable) . 4579
BED 14% Incoming 13641
Ecess 2% Incoming 273
HSCess 1% Incoming 136
Stock 114480
Now my Client requires that the BED Amount should not be added to the Vendor bill i.e he wants the Vendor to be cr. by only (114480 + 4579) = 119060 and the BED amt of 14050 should not be accounted to the Vendor.
Please guide me to solve this problem. As this problem is regarding Passing of the MODVAT.
Regards
Hitesh Parsawala
Edited by: Hitesh Parsawala on Nov 15, 2008 8:34 AMHi Hitesh,
You mean to say, you don't even want to debit your accounts for Excise?
In this case, you have to click orange arrow of Tax Amount. You can manually put the tax amount, you want. So, just make the excise i.e. BED , ECess & SHECess tax amount to zero.
Hope this will help you in your issue.
Regards,
Abhishek -
Error when executing query without passing variable selection
Hi Gurus
I am getting an error while executing a query with out passing values for variables
When executing the query by passing the filter values report returns the data
When executing the query with out passing variable selections the error message is
Unknown error in SQL interface
Error reading the data of Info Provider ZCRM_O08
Error while reading data; navigation possible
System error in program SSAPLRS_EXCEPTION and form
RS_EXCEPTION_TO_MESSAGE
No Data Available
can any one please help me in resolving this
Thank youHi Srini
Thanks for your quick response
When i am executing the query with selection it is returning the data
giving error when executing with out passing the selection
is there any other cause for this problem
like any particular info object causes this sort of problem
Thank you
Maybe you are looking for
-
I just installed LION and no Power PC Apps work. HP says there are updates for Lion from MAC APP store for the HP 3210 PhotoSmart All in Printer and provided instructions. I followed these but no updates were visible or installed. Any idea why? Is
-
I can't install Windows 8.1 on my Imac with Mavericks using Bootcamp. Why?
I can't install Windows 8.1 on my Imac 27" with Mavericks using Bootcamp. Why? I first did all the software updates needed, downloaded the driver software to a 32Gb flash drive formatted as FAT32, fired up Bootcamp Assistant, inserted the Windows 8.1
-
Adding one setting to multiple files?
I am new to Compressor. Is there a way to add one setting to multiple files in the batch area without having to go into each file seperately? Thanks
-
[Urgent] How to let FileAdapter to read next file after a customized period
Dear friends, We are using SOA Suite 11.1.1.5 and use FileAdapter in BPEL Process to read files. The file adapter in BPEL Process need to handle 14 inbound different files every batch time. And we want to let File Adapter to start reading next file a
-
My ipad mini is now being diagnosed and might be replaced. I was wondering if the replacement unit is brandnew as in the units that you'll get when you buy a new one or just a refurbished ipad? If it's a refurbished ipad, will it look like a brand ne