PLSQL: Changing in parameter thru assignment to global variable???
Hi there!
On 10gR2 (10.2.0.3) the following PL/SQL block
declare
glob_val pls_integer := 2;
procedure test_p(x in pls_integer) is
begin
dbms_output.put_line(x);
glob_val := 3;
dbms_output.put_line(x);
end test_p;
begin
dbms_output.enable;
test_p((glob_val));
end;
appears to change the value of the in-parameter x by an assignment to the
global variable glob_val. To verify, just check the dbms_output generated.
This is completely unexpected behaviour, and contrary to my understanding of
PL/SQL's parameter passing mechanisms. If this was the intended behaviour
in 10.2 it would definitely break tons of existing PL/SQL code.
Has anyone run into this problem before? Is this a bug? Is there a workaround
available? Any ideas??
All the best
Michael
Sorry, I cannot accept that statement.
According to the PL/SQL user's guide
<QUOTE>
Using the IN Mode
An IN parameter lets you pass values to the subprogram being called. Inside the subprogram, an IN parameter acts like a constant. It cannot be assigned a value.
You can pass a constant, literal, initialized variable, or expression as an IN parameter.
IN parameters can be initialized to default values, which are used if those parameters are omitted from the subprogram call. For more information, see "Using Default Values for Subprogram Parameters".
</QUOTE>
IN-Parameter were not passed by reference in former versions of PL/SQL.
You may notice that you cannot assign to an in-parameter either; an attempt
to do that will just produce the error PLS-00363.
Similar Messages
-
Global variable are not assigned to other files
Hello
I have defined & assigning some values to Global files in one of the project files, But the same i am not able to read in other files of the same project.
i have defined as 'extern int x ' in one file & also called in other file by defining 'extern int x'
let me know if you more info needed
HussainHello
I am trying to implement this in my program .. but assigning the Global variable is not working
NOTE: I am using LABWINDOWS CVI 5. (Old version)
/////***Test 1 contents****///
extern ViInt32 A= 0; // Assigning ‘0’ to Global variables
extern ViInt32 B= 0;
extern ViInt32 C= 0;
extern ViInt32 D= 0;
if (revision = =1)
A=Confirm Popup (“Verifiy”,"Does this unit also have hardware A”);
///*** end of Test 1 ***//
If I am trying the access above global variable to Test 5 or some other test program within same project
/////***Test 5 contents****///
If (A)
printf (“the Hardware mod is REV A”);
Else
Printf(“NO Hardware mod find”);
//*** end of Test 5 ***//
Now the query is whichever option (YES OR NO) in the confirm POPUP in Test 1. I am getting the output: “NO Hardware mod find”
The reason is the Global Variable is not passing. -
How can i notice the name of global variable ?
When the customizing.fmx calls the standard.fmx, I came accross an error "FRM-41067 Can not find menu Item".
customizing.fmx --> call --> standard.fmx
So, I want to assign a global variable to standard.fmx in the customizing.fmx.
How can i find out the name of global variable ???
Can I catch the name of global variable??
For expamle..
:global.menu_id was not the answer.
:global.mn_id was not the answer.
:global.mnid was not the answer.
HOW!!!!!!!!!!!!!!!!!!!!
Please HELP ME!!!Hi
Can I catch the name of global variable?? yes u can , if u use a message after each type like...
:global.menu_id
MESSAGE (' global.menu_id = ' || global.menu_id );
SYNCHRONIZE; Hope this helps...
Regards,
Abdetu... -
Script for changing InCopy assignment locations globally
I have a book with multiple documents with hundreds of separate stories. I need a script to change the assignment locations globally within the ID document to a single folder. As it stands now, I can only change them one by one using their individual Assignment Options dialogue box in ID. Also, it would be nice to also be able to change the "Assigned to" field to a specific set of person(s).
Someone had written a script a while back for ID2 that did just this but I can't seem to locate it. Not sure it would work with CS3.
Anyone have any ideas?As Andbrowny asked, have you tried using OS X's Locations? See KB 106653, Using network locations in Mac OS X.
If that doesn't give you the power that you need, checkout Location X. -
Hi,
Can we change log_buffer parameter online e.g. when all users are working.. ???
What is relation between redo buffer in sga and log_buffer parameter ?
SQL> show sga
Total System Global Area 3758096384 bytes
Fixed Size 1983152 bytes
Variable Size 553655632 bytes
Database Buffers 3187671040 bytes
Redo Buffers 14786560 bytes
SQL>
SQL> show parameter log_buffer
NAME TYPE VALUE
log_buffer integer 14338048
SQL>
SQL>
If the log_buffer parameter is 14 MB then why redo buffer is no as same size e.g.
14 MB
SSMI am hoping your Oracle Consultant know what he's talking about.
According to Oracle Performance Guide,
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#sthref654
"On most systems, sizing the log buffer larger than 1M does not provide any performance benefit. Increasing the log buffer size does not have any negative implications on performance or recoverability. It merely uses extra memory.
The best method to determine if bigger redo buffer is needed is
SELECT NAME, VALUE
FROM V$SYSSTAT
WHERE NAME = 'redo buffer allocation retries';
The value of redo buffer allocation retries should be near zero over an interval. If this value increments consistently, then processes have had to wait for space in the redo log buffer. The wait can be caused by the log buffer being too small or by checkpointing. Increase the size of the redo log buffer, if necessary, by changing the value of the initialization parameter LOG_BUFFER. The value of this parameter is expressed in bytes. Alternatively, improve the checkpointing or archiving process.
Other than that, hight log file sync event indicate you need faster disk for your redo logfiles. However, please also post your commits per second and redo per second from your AWR report.
100M redo logs might be small for your environment. -
Use global variable to transfer user parameter in some Vi
Hello,
I have troubles when I use a global variable to transfer the parameter to a first Vi (user interface) to a second vi (acquisition interface).
In the first Vi, the user paramater is wrote to my global variable.
In the second Vi, the acquisition parameter is read to my global variable.
This 2 Vis are include to a master Vi who synchronized by the error bus.
The problem :
For the first use, the user parameter is transfer to the global variable but the acquisition vi read the old parameter. In the second use, acquisition vi read the first use parameter.
After I use the IN/OUT parameter subvi and i have too this problem.
Thanks for help.
VIEW THE PROBLEM : (I use event structure
Attachments:
Problem.zip 52 KBLabview uses the dataflow to chain the execution. That is, as soon as one item of data is ready is is presented to the next stage.
Global (or local) variables do not easily fit in there. A variable is always present and ready to give away it's data. It does not matter that you write to it in one vi. Another vi, that is running concurrently is not aware that the content may have changed.
Especially if you reference variables outside of loops, the value is taken just once and never updated. Be aware! If in doubt, use the tracing facilty (the light bulb) to follow the data flow.
Gabi
7.1 -- 2013
CLA -
Change a global variable with a function
HI ALL!
I have the following problem...
I would like to change a global variable with a void function so not like this: variable = function(); .
What do you suggest?
Best regards,
KorcsI have the following problem...
I would like to change a global variable with a void
function so not like this: variable = function(); .
What do you suggest?>
>
I dont quite understand your question but if your variable is a reference to an object then you can certainly have a method to alter the object that the reference is pointing to and/or the reference itself..
otherwise your 'function' will have to return the same type as the variable itself in order to do the assignment as you demonstrated, regardless of wether it's C, C# or Java, AFAIK, WIRNM
HTH -
Org Assignment of global employees in Compensation Management
I have a problem with Compensation Management but it also relates the Org Assignment of global employees
In Comp when I try to submit an employee using transaction HRCMP001, I have an error saying no org assignment exist on 01. 01 .2008.
The business scenario is as follows. EE is hired on 01012008 in UK for e.g. he gets terminated on 31.05.2008 and then gets re-hired in another country using the Global Employee Personnel actions on 01.06.2008. In this county, he becomes eligible to receive the increase but when I try to submit, the error comes up that no org assignment exist for 01.01.2008. I have changed the settings in T582A to u2018copy infotypeu2019, it tries to reference the previous org assign infotype from 01.01.2008(which is correct but the system rejects it and will only accept the new date of the new hire 01.06.2008) thereby not referencing the old org assignment in the new personnel number.? I tried the propose infotype option but it did not do anything. Does any one have any suggestions? Thanks ever so much for your anticipated help.You create the compensation packages using info type 0706. This info type has
Two subtypes; one for home country and one for host country
Check this link
http://help.sap.com/erp2005_ehp_04/helpdata/EN/32/79c73c0c52085be10000000a114084/content.htm -
Team members access thru Assignment rule
When defining the Assignment Rule for Account f.e. the administrator can define the Team Members to be assigned to the account, and their access levels.
My doubts refers to this level of access x the level of access defined thru the user role/access profile. In other words... if thru the Access Profile the user X has a Read-Only access to Account object... and if thru the Assignment Rule - Team Members I give the user X the access Full...
Should I understand that for every other account (except the ones assigned thru assignment) the user X has a Read Only access...and for these accounts assigned thru Assignment the user X has the Full access ?
Txs. for any hints.
AntonioAntonio, your understanding is correct.
-
How change NLS_NUMERIC_CHARACTERS parameter for load external table
Hi,
I use this version:
OWB 11gR2
Database 11gR2
Parameter NLS_NUMERIC_CHARACTERS Database ., Instance ,.
When I created database with wizard and in this moment I don't set spanish language, later I changed this parameters in instance parameters.
Now I want load data from a file to external table, but I've an error when I try load data with decimal point.
why does it use the database parameter instead of instance parameter?
Is possible to change this parameter?
Cheers
MarisolAt this moment , this is not possible . You can see metalink note ID 268906.1.
It says:
Currently, external tables always use the setting of NLS_NUMERIC_CHARACTERS
+at the database level.+
Cheers
Marisol -
Assigning value returned from RFC call to a global variable
If I have an RFC call to SAP how can I assign the value returned to a global variable on my data services job?
Hi,
For now, it seems u haven't specified the destination properly. the call function statement must be suffixed with the 'destination' addition to make sure that the function call is an RFC and the particular function be executed at the desired destination. -
Change of additional acct. assignment in automatically created line items
Hello,
How can we change the additional account assignment of automatically created line items in transaction MIRO. In my case the tax line item is created automatically in MIRO.
I am able to change the account assignment of consumption line item. But not Tax line item.
Best Regards,
TapanBut FBZP is for APP not for Tax line item. Is it possible to change the additional account assignement (from cost center to internal order) in tax line item in MIRO.
Best Regards,
Tapan -
I am working in Numbers and can't seem to change the generic value assigned to the legend. Any advice on how to select the legend and save new values?
Ntenich,
If your table has a Header and your Legend text is in the header, it will be picked up by the table.
Jerry -
Can i pass parameter or global variable in view from 6i form
hi master
sir can i pass parameter or global variable in view from 6i form
i use view for some diff column calculation within the date then i use
where date between data1 and date2
in view but view not create
please give me idea how i pass external value in view
thank
aamirHi Antony!
I feel it may not produce the right results if you
dont include the where clause and using only group by
in view.You felt? Please clear, logical thoughts put here, not feelings.
(It may very well have all the Debit, Credit
for all the Accid where as the user wants only for
r some date range)Data range is determinated in Form by user, so if view should give final data set then you must back
on Ranjana first question: How to pass parameter or global variable to view from 6i form?
And also as Ranjit pointed out, If you have only
accid, sum(debit), sum(credit) in View, wheres this
enddate ??Of course, column entdate (or enddate?) must be included in view...
Cheers! -
Change the status profile assigned to the line item from PROFA TO PROFB
Hi Experts,
The issue we are having relates more to the fact that the code we have written is changing the item category, however the status profile has already been retrieved from configuration based on the original item category and therefore the status selection that we are getting is incorrect.
Item Category A -> Status Profile PROFA
Item Category B -> Status Profile PROFB
For example we have a line item and item category A is determined through config, this then retrieves its associated status profile PROFA. However we have then coded the system to change item category A to item category B. However the status profile still remains PROFA.
We need to find a way to change the status profile assigned to the line item from PROFA to PROFB.
any quick inputs from any one please......
Thanks in advance
hemanthHi
There is perform which moves the values to VBAP field.
This PRCTR field is stored in VBAP (i.e., SO line item table)
USEREXIT_MOVE_FIELD_TO_VBAP
Hope it works.
VVR
Maybe you are looking for
-
Item.SystemUpdate for Client Object Model in sharepoint 2010
I have a javascript that modifies a column/field in the list item when opened. However, this changes the Last Modified By field of the item. is there a SystemUpdate method for Client Object Model? ----------------------- Sharepoint Newbie
-
Keep getting odd server error messages.
Upon restart I keep getting an error message that says cannot connect to server - but each time it has different name like this: myname.apple.com myname2.apple.com myname4.apple.com Then tonight - trying to update iPhone, couldn't update because coul
-
Ical is stuck on the following progress bar "upgrading ical calendars". How to fix?
While attempting to fix syncing this message appeared and has hung up ical indefinitely. I can force quite but cannot fix. Any suggestions?
-
Hello, We are trying to set up the EIC authentication service in ESS where an employee can create/change the answers to the questions maintained on IT 0816. At first it looked pretty straigh forward, so we set up the questions for IT 0816 , and whe
-
I will be traveling quite a bit over the next few months for business in San Juan, Puerto Rico. I was there this past week, and noticed that I was received an "Extended" signal. I also tried to use some Iphone apps and received a notification that