Set value to variable into trigger

Hello all. I am Andrew.
I try to set value variable following code:
create or replace TRIGGER "ITOP".SERVER_TRG
BEFORE INSERT ON SERVER
FOR EACH ROW
BEGIN
SELECT SERVER_SEQ.NEXTVAL INTO :NEW.ID_SERVER FROM DUAL;
(:P4_ID_SERVER) := :NEW.ID_SERVER;
END;
But compile completes with error:
PLS-00049: bad bind variable 'P4_ID_SERVER'
Why ?
Please help me.
Andrew.

Replace
(:P4_ID_SERVER) := :NEW.ID_SERVER;
with
APEX_UTIL.SET_SESSION_STATE('P4_ID_SERVER' ,:NEW.ID_SERVER);

Similar Messages

  • SAP BEX Analyzer Set values for variables

    Please help us out in sorting out this problem,
    We are automating BEx Analyzer for a Testing Project with Quick Test Professional (QTP) a functional automation tool uses VB script.
    Problem:
    There are 5 steps in automation
    Invoke BEx Application
    Log in to BEx server
    Run Query
    Set values for Variables for Query
    Display Report
    We are able to do 1,2,3 steps using BEx API functions and running BEx macros but we struck up with 4th step,
    1. Invoke BEx Application
    ‘Launch Excel
    Dim app
    Set app = createobject("Excel.Application")
    ‘Make it visible
    app.Visible = true
    ‘Attach add-in to Excel file
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SetStart")
    2. Log in to BEx server
    Login to Bex server
    Function logonToBW(app)
    Dim myConnection
    Dim logonToBW2
    On Error Resume Next
    logonToBW2 = True
    ' Create logon to system with following user and system details
    Set myConnection = app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! SAPBEXgetConnection")
    With myConnection
    .client = "600"
    .User = "USERNAME"
    .Password = "Welcom123"
    .Language = "en"
    .systemnumber = "00"
    .System = "BWDCLNT600"
    .systemid = "BWD"
    .ApplicationServer = "156.158.7.161"
    .SAProuter = ""
    .Logon 0, true
         If .IsConnected = 0 Then
               .Logon 0, False
    If .IsConnected <> 1 Then
    MsgBox "Automatic logon failed. Please enter your username and password in the next screen ..."
    Exit Function
    End If
    End If
    End With
    ' Run connection query to see if connected
    app.Run ("'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXinitConnection")
    logonToBW2 = True
    End Function
    3. Run a Query
    app.Run "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'! runQuery", "ZZCCA3_M01_Q0003"
    Till here the script is running fine then the “Select values for Variables” window is displayed.
    This is where exactly we struck up; in this window we need to select values.
    Name of the Fields
         Field Name     Technical name of characteristic     Variable Name     Value
    1     Company Code                     0COMP_CODE     ZM_COMPCODE     1000
    2     Cost Center Hierarchy          0COSTCENTER     ZS_CCTRN     1000MDON
    3     Cost Center Node     0COSTCENTER     ZS_CCTRN     1000COP
    4     Cost Element          0COSTELEMENT     ZS_COELN     1000GDON_6999
    5     Fiscal Year     0FISCYEAR     0P_FYEAR     2007
    To select values for variables, we are trying below code but its giving an error,
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000”, "0COMP_CODE"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000MDON”, " 0COSTCENTER "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000COP”,  "0COSTCENTER"
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “1000GDON_6999”,  "0COSTELEMENT "
    app.Run  "'C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.xla'!SAPBEXSetFilterValue", “2007”,  " 0FISCYEAR"
    Any help highly appreciated, thanks in advance.

    Hi Reinhard,
    Pleas look at this:
    Passing a range to SAPBEX.XLA!SAPBEXSetFilterValue
    Best regards,
    Eugene

  • How to set a bind variable into a vo query from the current vo ?

    I would like to exclude from my list of values defined in a view object the already referenced items in the current view object content.
    Let's say i have dept and emp with a many to many relationships, I would like that the already existing dept for emp not listed (excluded) in the list of values for emp.
    Do i need to define a bind parameters and set it during search or is it possible to use an expression that will refer the current row attribute representing the dept ?
    I didn't find an example or explanation how to set bind parameters defined in a view object query from seach pages or list of values ui components. May be somebody know how to find the info.
    Thank you

    I think that bind variable accessors in the VO class is what you need. You can override the getter method of the bind variable "LocaleCode2" in order to return the first 2 chars from the bind variable "LocaleCode". Have a look at this blog post for details:
    http://jdeveloperandadf.blogspot.com/2011/03/custom-java-bind-variable-in-where.html
    Dimitar

  • Set value of variable in one bean from another bean

    Using JDeveloper 11.1.1.4, I thought this would be simple to do, but I haven't been able to figure out the correct syntax and am just learning java. In my view controller I have one bean set as pageflow scope, and another bean set as a request scope. How do I set the value of a variable in the first bean from the second bean? The first bean has setters and getters, but when I try to reference them in the second bean, it says it isn't allowed. The first bean looks like:
    public class ViewAmtsParameters {
        String asOfDateParam = null;
        public void setAsOfDateParam(String asOfDateParam) {
            this.asOfDateParam = asOfDateParam;
        public String getAsOfDateParam() {
            return asOfDateParam;
    }Thanks in advance,
    Troy

    for ur reference: go through entire docs.
    http://balusc.blogspot.com/2006/06/communication-in-jsf.html
    Edited by: Erp on Oct 7, 2011 9:12 PM

  • Setting the value of an Application Item (setting a global variable);

    In APEX 3.2.0.00.27, I need to initialize a global variable to 0 to implement a variable for testing to see if anything on the page has changed. Will update to 1 when certain select lists on the page are changed. Have read through some similar questions and replies within the forum as well as other blogs and sites. So, I believe what I am doing is the way to go about this. Unfortunately, my initialization of an application item/global isn't happening yet. here's a rundown of what has been implemented:
    1) created an application item, G_CLASSIFICATION_ID_NEW in the shared components;
    2) created Javascript (JS) function called by addLoadEvent in the page html header region so when the page loads, the G_CLASSIFICATION_ID_NEW global/application item should get set to 0 with the following JS and using AJAX and htmldb_GET:
    <script type="text/javascript">
    function initVars()
    alert("before get initvars");
    var get = new htmldb_Get(null,$x('pFlowId').value,null,22);
    get.add('G_CLASSIFICATION_ID_NEW', 0);
    gReturn = get.get();
    if(gReturn){
    alert(gReturn.value);
    get = null;
    alert("after get initvars");
    alert("before call to initpage");
    addLoadEvent(initVars());
    </script>
    I've used the htmldb_Get with success for populating other global variables and running On Demand Processes with onchange JS calls in the html form element attributes within select lists on the page. Afterwards, I can check the globals via the Session window and searching on Application Items. Unfortunately, I'm missing something because my G_CLASSIFICATION_ID_NEW never gets populated when I load the page. The alerts all popup when the page is loaded, so I know the script is being executed when the page loads. the alert(gReturn.value) comes back undefined. And, needless to say, the G_CLASSIFICATION_ID_NEW to 0 is not occurring.
    I've tried the htmldb_Get with it calling an application process and without (set to null). From what I've read, you shouldn't need to call an on demand process to have the get.add set the global variable. Then again, this could be where I'm going wrong. however, as I've mentioned, this works for other functions called from an onchange to populate an application item, but the page has already loaded when the onchange(s) get executed. They may work because the page is already loaded when the onchange is called. My point here is that my other On demand processes are NOT setting or changing the global variables at all. The globals are getting set with the get.add(<app item>, <value>) portion of my other JS functions within the HTML Header region. So, I'm inclined to believe that I don't need the 'application_process=<some_odp>' parameter set, but if that's not true, please let me know. if so, what would need to be in the on demand process--ie, what would be the purpose of the get.add(<application item>, <value>) if I set the global variable in the on demand process because that's the only thing I could think of doing within an on demand process for this?
    If somebody can point out what I'm not understanding or failing to do here, that would be great. I'm doing fine with APEX, but wouldn't consider myself a guru with it just yet. I'm definitely not a JS/AJAX guru, and when things like this go astray, I get bogged down because I'm not sure of the problem. So, I'm hoping you gurus who monitor this forum can get me going in the right direction.
    thanks,
    bob

    Hi Jari,
    Does that javascript work if you place it some of region footer on page 22 ?Yes. I cut it out of the html header of the page, and put it in the footer of the first region on the page. It initializes the variable. Putting it into the footer of the first region on the page should work for me instead of having an extra region on the page that's being picked up from page 0.
    Is your page 22 authentication public ?No. This particular page is set for an ADMINISTRATOR only. That said, I am logged in as an administrator. So, I cannot see why setting authentication should make a difference as long as I have that authentication/authorization. Also, there will be other pages where I want to use this script or a similar script, but again, those pages will not be open to the public. the authentication will be "role" based where a user will not necessarily have to be an administrator, but they will have to have a certain role to access the page. Is there a known problem or something that precludes a html header JS script from doing an addloadevent when authentication is NOT public?
    thank you,
    bob

  • How to reuse a value set in the filter into an LMD process

    Using apex 3.2, I'm wondering how to re-use the value currently set into the filter (interactive report) into a LMD process attached to a button created on the same page.
    The process on Submit - after validations and computations, I presume, should look like to the following statement, but in a dynamic way:
    begin
    insert into table2 select * from table1
    where study = 'ABCD';
    end;
    I tested the following clauses options, which none of them work:
    a) where study = :STUDY
    b) where study = :IR_STUDY
    setting the debbug to on, I could realize that the report was based on (apparently, APEX generates APXWS_EXPR_1 bind variable for the first parameter and APXWS_EXPR_2 if a second parameter is used into the filter, and so on...) :
    where ("STUDY" = :APXWS_EXPR_1)
    and then saw :
    0.28: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="ABCD"
    0.28: IR binding: ":APXWS_MAX_ROW_CNT"="APXWS_MAX_ROW_CNT" value="10000"
    of course, I thought that the clause 'where ("STUDY" = :APXWS_EXPR_1)' could work. Unfortunaltely, not.
    any king of support is welcome.
    Thanks a lot,
    Bruno

    but I don't know how to execute it from putty ? Can some one help me.Use the same command. Just make sure you are logged in as applmgr user and source the application env file before you run the command. Also, make sure you issue the command in a directory where applmgr has read/write privilege.
    How to Load Value Set Values When Using Fndload To Load A Concurrent Program [ID 252853.1]
    Tips About FNDLOAD [ID 735338.1]
    How To Download A Single Flexfield Structure Using FNDLOAD? [ID 745689.1]
    Download Multiple Flexfields From FNDLOAD [ID 316600.1]
    Thanks,
    Hussein

  • AppleScript Excel - Copy value of cells into variables

    I am super new to AppleScript, so please excuse me if I am not good at explaining what I am trying to do. I have an Excel file that has 12 columns and X rows, I need to have B2/C2/D2/etc copied into variables but have the column be a variable instead of a static number so I can write a loop to get all the rows, etc. Here is what I have now, and I know this is far from being correct.
    copy value of cell "B2" to varRow
    I have tried something crazy like this:
    copy value of column colSection of row intRow to varSection
    But that just throws up an error saying the object i am trying to access does not exist. I set the ColSection to "B" and intRow to 2, so I thought it would work. Any ideas or advice I am open! Thanks!

    The following should give you the idea:
    tell application "Microsoft Excel"
    activate
    make new workbook
    set myCol to 3 -- the starting column
    set myBgnRow to 2 -- the starting row
    set myString to "Hello World" -- characters to be inserted into sheet as sample values
    set myChar to 1 -- Points to first character ("H")
    set myEndRow to myBgnRow + (length of myString) - 1 -- the ending row
    -- Now put some values into the cells
    repeat with myRow from myBgnRow to myEndRow
    select (cell myCol of row myRow of active sheet)
    tell cell myCol of row myRow
    set value to character myChar of myString
    end tell
    set myChar to myChar + 1
    end repeat
    -- now get the values back out
    -- note that this is using same myBgnRow and myEndRow as above
    repeat with myRow from myBgnRow to myEndRow
    select (cell myCol of row myRow of active sheet)
    tell cell myCol of row myRow
    set myVal to value
    end tell
    display dialog (myCol as text) & "," & (myRow as text) & " " & myVal
    end repeat
    end tell

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • In OBIEE 11g, how can you set a presentation variable value from javascript ?

    I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?

    SriniVEERAVALLI,
    Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
    I just want to make my post looks simple and focus on the specific problem.
    Anyways, thanks a lot for taking time to reply. Appreciate your help.

  • *SELECT: How to select value from cube into variable?

    Hi,
    I have an application that need lots of complex calculations.  Currently I am facing problem in retrieving a value from BPC application/database (BW cube) into a script logic local variable.  Let's say the application has  these  following dimensions
    1.  FYPD ( fiscal yr period. 200901, 200902 etc)
    2.  REGION ( A, B , C , D etc)
    3.  PRODUCT(Product ID)
    4.  VERSION ( ACTUAL, FORECAST etc)
    5.  AMOUNT (Sales Amount, signed data )
    Now I need to extract the sales amount into a local valriable where REGION = "A" and  PRODUCT = "SMK-1234" and FYPD = "200905"  and VERSION = "ACTUAL"
    What's should be the equivalent SELECT command? I tried but could not figure out. Any help?
    Regards
    DipM

    Hi DipM,
    There isn't really a concept of local variables for values in script logic. Instead, you'll want to use *WHEN, *LOOKUP, or MDX statements.
    For example, this will copy the value you mention into the PLAN version:
    *WHEN REGION
    *IS A
    *WHEN PRODUCT
    *IS SMK-1234
    *WHEN FYPD
    *IS 200905
    *WHEN VERSION
    *IS ACTUAL
    *REC(FACTOR=1,VERSION=PLAN)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    See *WHEN ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/36/339907938943ad95d8e6ba37b0d3cd/frameset.htm]) and *REC ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/25/8d51050c43496887ddff88f13e5f1a/frameset.htm]) documentation for more.
    As mentioned, you can also use *LOOKUP or MDX statements to look up values and drive calculations in *REC(EXPRESSION=....) statements. This functionality is outlined in the SP02 documentation addendum ([link|http://service.sap.com/~form/sapnet?_SHORTKEY=00200797470000088146&_SCENARIO=01100035870000000202&]).
    In the MS Version of BPC, there is a concept of local MDX variables that work with the specialized *GO script logic statement. This statement is not available in the Netweaver version.
    Ethan

  • Trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01

    Hi Experts!
    I have the trouble in BEx Analyzer when try to set values to the variables in ZXRSRU01 on i_step = 1.
    When variable's screen apeares the values is not those what was set in ZXRSRU01. When I try to trace
    this in RSRT I have no this problem, all the values are same as was set in ZXRSRU01.
    Thanks in advance.
    Best regards,
    Andrey Bychkov

    Hi
    Check this
    Documentation about variable types & their processing in i_step = 1, 2 etc.
    It may help you....
    Cheers

  • Select values from table%ROWTYPE variable into a cursor

    I have a stored procedure which has an OUT parameter of table1%ROWTYPE.
    In future we might have to add more OUT parameters of table2%ROWTYPE etc. But at any point of time only one will have values.
    So instead of having table%ROWTYPE as OUT parameter, can I send these single row ( with variable values) in a cursor, so that declaration part atleast will not change.
    Is it possible to select values from table%ROWTYPE variable into a cursor.
    cursorOUT IS
    SELECT * FROM varREC;
    where varREC is table.ROWTYPE variable.
    Or which is the better solution in this situation.
    Thanks.

    SQL> var a refcursor
    SQL> declare
      2   bb emp%ROWTYPE;
      3  begin
      4   select * into bb from emp where rownum = 1;
      5   open :a for select bb.ename ename, bb.empno empno from dual;
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    SQL> print a
    ENAME                                 EMPNO
    SMITH                                  7369Rgds.

  • Using HttpHeader to set value for session variables

    Hi,
    We want to set values for 2 session variables (USER and ROLEID) using HttpHeader in obiee 11g. Has anyone tried this? How can we achieve this?
    I found the below note on the forum for setting value for the USER session variable. how can we set the ROLEID session variable also? is it possible to set values for 2 variables?
    for setting the USER session variable,
    You should add this in $BI_HOME/bifoundation/web/display/authenticationschemas.xml:
    <SchemaKeyVariable source="httpHeader" nameInSource="Proxy-Remote-User" forceValue="SSO"/>
    <AuthenticationSchema name="SSO" displayName="Single Sign On" userID="IMPERSONATE" proxyUserID="NQ_SESSION.RUNAS" options="noLogoffUI noLogonUI">
    <RequestVariable source="httpHeader" type="auth" nameInSource="Proxy-Remote-User" biVariableName="IMPERSONATE" options="required"/>
    </AuthenticationSchema>
    Please suggest.
    Thanks.

    I think maybe your SnmpValue type or value is not corrent.
    1.3.6.1.4.1.7064.201.1.200.100.0 is Enum control type
    when I use
    SnmpValue val = new SnmpString("0");
    It doesn't work, but when I use
    SnmpValue val = new SnmpInt(0);
    It works. I think the JDMK should give some warning message when the type is not correct. :)
    The code is following:
    final SnmpVarBindList setList = new SnmpVarBindList(" set varbind list ");
    SnmpOid oid = new SnmpOid("1.3.6.1.4.1.7064.201.1.200.100.0");
    SnmpValue val = new SnmpInt(0);
    SnmpVarBind valueBind = new SnmpVarBind(oid, val);
    setList.addVarBind( valueBind );
    SnmpRequest setRequest = session.snmpSetRequest(null, setList);

  • Can i store the Result set values as a Session variable

    hai,
    I want the result set values of a query to be used many times and I want the same resultset between different page calls.
    I want all those records fetched from the database to be available in the next page with out refetching from the database.
    can any one help me out. its very urgent.....
    Thanks and regards,
    Ravikiran
    mail to me at : [email protected]

    "can i store the Result set values as a Session variable "
    Practically Yes u can
    but u want be able to accesses it in other pages
    u can try it and see
    the other thing u can do is store the values from the resultset in a object say vector and put vector in seesion and u can use this any where
    for e.g
    Vector v=new Vector();
    While(rs.next())
    v.addElement(rs.getString(1));
    v.addElement(rs.getString(2));
    session.putValue("myVector",v);
    now where u want to get it do this
    Vector myvec=(Vector)session.getValue("myVector");
    do do futher

  • Inserting a variable value from querystring into captivate and out again

    I am using Captivate 4 on a server that uses ASP and I use FrontPage to write my ASP pages.
    I have a database built and hosted at the same location as my captivate file.  I used to launch my captivate and then have the user continue to a form page, enter their information and submit to the database.  This all worked great.
    Now I need to capture completion of several captivate files (modules).  So I want an ASP page that allows the user to see what modules are done (I use a request form to search my database).  It works great.  It comes back and tells the user what needs to be taken.  They, on that same page, can then select the module to complete next (I have the request querystring added to the URL that launchs the captivate file (I changed it from a html page to an asp page).
    It launches fine but I can't figure out how to get that request querystring into captivate as my variable value.  question 1
    Then after that is figured out I need to know how to pass that variable back to an ASP page that will contain form questions that will then travel to the database.  (Thus giving them credit for that module).  question 2
    Any help would be great.  I am not very good at code, but trying.  My database is Access.

    So you want to pass some data into Captivate? This can be achieved with a Flash Widget and FlashVars. Basically you would be able to launch a Captivate project on www.google.com/myProject?myVariable=1 and then get the value of myVariable into a Flash widget. The Flash Widget could then pass this variable into Captivate be populating a custom variable that you have definied within Captivate. From that point on you would be able to use the variable in your Captivate project. Google for Flash Vars to see what can be done with it.
    As for the other way around - Captivate sending information to your ASP script - that would also require a widget (or perhaps calling a JavaScript function). From the Flash widget you would be able to pass along data from Captivate to an external script and then use it any way you want.
    Hope this points you in the right direction.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

Maybe you are looking for

  • Nokia 5800 Questions.

    I posted this in the nokia 5800 problems topic but it actually wasn't a problem and also it got ignored. So I decided to post it in a new topic. I just bought this phone 4 days ago and I am in total love with it Now the pros of this phone are too muc

  • Problem while doing invoice for Credit memo request

    Hi all I very well known that Out boud Delivery is not needed for Credit memo request but after saving the CMR and when i raise the Credit Memo (VF01) system is showing a error message saying "PGI not done for Outbound Delivery 30047402" In CMR docum

  • Problem in Procedure for using sequence...

    Hi, I created a procedure for generating sequence in target using below query SELECT EMP.EMP_SEQ.NEXTVAL FROM DUAL but its working on one system in other system its giving below error... ODI-1228: Task EMP_LOAD_EMP_SEQ_PROC (Procedure) fails on the t

  • Cannot connect to Internet in Windows

    I just installed Boot Camp and when I started Windows and tried to connect to the internet it doesn't recognize anything. I am able to connect in Leopard. Any suggestions. I compared settings to my other PC to see if I could find a difference and cou

  • IR and ID freezes twice a day.

    Hello experts:       Almost twice a day, IR and ID freezes and we have to reboot the server. But when you look at the server, there is enough resources available in CPU and memory. This is a sandbox and there are only 5 users using the system. This i