Global Value in PLSQL Code

How to take value of Total Compenations- >Basic -> Global Value in PLSQL Code.
Thanks

The Global values are stored in the table FF_GLOBALS_F, write a cursor in plsql to get the value from this table.
Regards,
Senthil

Similar Messages

  • Display a value from PLSQL code to screen

    How to display a value from PLSQL code to screen without loading or refreshing the page?
    im using ajax to call the javascript to run the PLSQL code. i desire to view some value in the screen when i run the PLSQL code
    skud.

    anything that you print from the PLSQL code(using htp.p, htp.prn etc) with will available in Javascript as the server response. You can parse that string it in javascript and display it on screen or modify page items or create dynamic items/elements using those values.
    A minimal example
    Ondemand PLSQL process : TEST_PROCESS
    begin
      htp.prn('hello world');
    end;Javascript Code
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0);
    ajaxResult = ajaxRequest.get();
    alert(ajaxResult);Will display an alert message "hello world"
    You can construct the string in JSON/XML format in PLSQL to pass complex data structures(or multiple values) or even HTML code, then do the required processing in Javascript, for example extract out item values from it and set items, convert the JSON array to a select list item in the page or put the HTML code with a div element in the page.

  • PLSQL code in a javascript code

    Can i write the PLSQL code in a javascript code?
    Actually i want to pass a value into a PLSQL code. First in javascript code i have to read a value of page item :PX_ITEM, then i have to pass that value in PLSQL code.

    Can i write the PLSQL code in a javascript code?No.
    PL/SQL runs in the database on the server. JavaScript runs in the browser on the client. Never the twain shall meet.
    Passing values between them requires a page submit or AJAX call.

  • Making variable values globally accessible in my code

    I have certain variables, and when I declare their values
    within a function I want the value to be accessible in other
    functions. Right now it's not, so obviously I have a scoping
    problem.
    For this example, I have a function that decides if an avatar
    is too close to the side of the screen, in which case it sets a
    flag var tooClose:Boolean = true; Of course my other functions
    don't see this and aren't getting the message.
    In old 2.0 I would have just said _root.tooClose = true or I
    would have made the variable global.
    Could someone please help me here? Its something I find
    myself needing quite a bit.

    Let me be clearer:
    var myFlag:Boolean = false;
    function resetVariable() {
    var myFlag = true
    function checkVariableValue() {
    trace(myFlag)
    // shows false
    I would like it so when I set the variable myFlag = true in
    the resetVariable function that the global value for myFlag becomes
    "true" and all my other functions are aware of it.

  • How can I have OEM's Metric numbers in PLSQL code?

    Hi,
    I have the following Metric numbers in the web based OEM:
    CPU Used
    Run Queue Length
    Physical Reads (KB)
    Redo Size (KB)
    User I/O
    System I/O
    Network
    Concurrency
    Commit
    I know above Metric numbers come from V$ tables such as: V$SESSION, V$SYSSTAT, V$SESSION_WAIT, V$SYSTEM_EVENT
    Is there anyway that OEM shows me how exactly it gets these numbers, so I can have the very same number in my PLSQL code?
    Thank you,
    Alan

    Hi Justin,
    I just used this query to find the “Run Query Length”:
    select * from v$statname where LOWER(name) like '%queue%'
    It gives me the following result:
    enqueue timeouts     
    enqueue waits     
    enqueue deadlocks     
    enqueue requests     
    enqueue conversions     
    enqueue releases     
    global enqueue gets sync     
    global enqueue gets async     
    global enqueue get time     
    global enqueue releases     
    global enqueue CPU used by this session     
    summed dirty queue length     
    queue update without cp update     
    queue splits     
    queue flush     
    queue position update     
    queue single row     
    queue ocp pages     
    queue qno pages     
    How could I find the relevant rows?
    I am having a similar challenge to find values for “CPU Used” metric
    Thank you,
    Alan

  • How to debug global values in UDF in a graphical mapping

    Hi Every one,
    I  got a situation in PI where i have to use global values in graphical mapping UDF.
    I can't able to get the values in "Display Queue " option.
    Can you please tell me what is the best way of debugging global variable in graphical mapping UDF.
    1. I declare one array list in the global values
    2. store some values using another UDF to the arraylist.
    3. I am traversing the values in the arraylist, but the values are not showing in "Display Queue".
    What is the solution to this.

    Did you try with trace.addInfo?
    https://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/AbstractTrace.html
    Sample code for the setMail UDF (Carrier B2B) - Business Process Expert - SCN Wiki

  • NLS issue in Java/PLSQL code [ using ROWID]

    I have NLS related question regarding the following scenario in Java/PLSQL code ::-
    OracleResultSet ors = (OracleResultSet) stmt.executeQuery("select rowId from t where t.col = 'XX'");
    // The above query could return multiple rowIds.
    String strVal1 = null;
    String strVal2 = null;
    if(ors.next())
    strVal1 = ors.getROWID(1).stringValue();
    if(ors.next())
    strVal2 = ors.getROWID(1).stringValue();
    ArrayList strList = new ArrayList();
    strList.add(strVal1);
    strList.add(strVal2);
    Now I need to pass a list of rowId's from Java to PLSQL function f().
    oracle.sql.ARRAY rowListArr = convertArrayListToRowPointerList(strList, conn) ;
    OracleCallableStatement cstmt = (OracleCallableStatement)
    cstmt.prepareCall("begin f(?); end;");
    cstmt.setObject(1, rowListArr);
    cstmt.execute();
    where:-
    static oracle.sql.ARRAY convertArrayListToRowPointerList(ArrayList arr, Connection conn)
    throws SQLException {
    oracle.sql.ArrayDescriptor stDesc = ArrayDescriptor.createDescriptor
    ("DBUSER.ROWPOINTERLIST", conn);
    oracle.sql.Datum[] keyVals= new oracle.sql.Datum[arr.size()];
    for(int i = 0; i < arr.size(); i++) {
    keyVals[i] = new oracle.sql.CHAR((String) arr.get(i),
    oracle.sql.CHAR.DEFAULT_CHARSET);
    oracle.sql.ARRAY keyArr = new oracle.sql.ARRAY(stDesc, conn, keyVals);
    return keyArr;
    and
    create or replace type DBUSER.ROWPOINTERLIST as table of varchar2(4000);
    Will there be NLS issues in the above code, where I pass the rowId content
    that I obtain from one query, as array of string bind variables to a subsequent PLSQL procedure? --- first approach
    Or
    do I need to pass the rowId list , as a array of oracle.sql.ROWID via bind variables? -- second approach
    The problem I have in second approach is that in the DB we cannot define a type as a table of ROWID's. So currently I have RowPointerList as a table of varchar2's (note the length of list of rowId is not predetermined in my case, so I user table instead of varray).
    However I was wondering if the first approach will have any NLS issues.
    Will appreciate your comments.
    Thanks

    ROWIDs are represented as either hex-encoded values or base64 encoded values. Both encodings use pure ASCII, so there should be no NLS issues.
    I am not very familiar with the oracle.sql.ARRAY type, but unless absolutely necessary, I would avoid the oracle.sql.CHAR datatype (assuming 10g drivers). Using java.lang.String is preferred.
    -- Sergiusz

  • How to call jsp in PLSQL code (to upload a file in IFS)

    Hello,
    We develop our PORTAL (9.0.2) with PL/SQL way.
    We want to make a form to upload file in IFS.
    We create a form like that :
    htp.formOpen(cmethod =>'post',
         cenctype => 'multipart/form-data',
         curl => '/pls/ptlcollab/ptlcollab.GestionDoc_screenbuilder.manipTableIFS',
         cattributes => 'name="ifs"') ;
    htp.TableData(htf.FORMFILE(cname=>'file', cattributes => 'size="25"')) ;
    The manipTableIFS procedure calls a loaded java procedure which called a servlet which work with IFS.
    BUT, modplsql seems to want we directly upload the doc in a table but we want to upload the doc in iFS !!!
    So, the solutiuon seems to call a jsp (or a servlet directly from our plsql code).
    BUT, how could I do that ???
    Any help would be greatly appreciated.
    Regards.
    Luc.

    Something along these lines ought to do what you want:
    <html>
    <body>
    <form name='foobar' action='foobar.jsp'>
    <script language='Javascript'>
    function askim() {
      if (confirm('Is you sure?')) {
        document.foobar.submit();
      } else return false;
    </script>
    <input type='button' value='Submit' onClick='askim()'>
    </form>
    </body>
    </html>
    Your mileage may vary.
    But the idea here is that the Javascript merely submits the form if the user clicks "OK" on the confirmation pop-up. Otherwise, nothing happens. The form is submitted to a JSP file which accepts the request, does something (such as call your Java class), then prints out some HTML in response.

  • Storing and loading global values in JVM...

    Is it possible to store and then read global values from the JVM? If it is possible, could please give me the code fragmant to do this or direct me to some place where I can read more about this.
    Thanks.
    -PV

    You are correct. Although global variables aren't usually good for OOP, I think this is an exception. I have a singleton class which requires DB access. The problem is that I don't want to hardcode the DB properties or the path to the property file. The class isn't a servlet, so I can't get the info out of the configuration file. Instead, I'm loading it into the JVM that way I have access to the data whenever I need it. Although I have to hardcode the name of the file, I don't have to hardcode the path which serves my purpose well. If there is another solution, please don't hesitate to share your idea(s) with me.
    Thanks.
    -PV

  • Passing message from plsql code to page

    Hello Everybody,
    I am trying to pass a 'success message' from plsql code which runs on page processing to the page. This plsql is a insert statement and if statement runs successfully (on submit) then I want to show a success message on the page after summit.
    Your comment and help would be appreciated.
    Thanks,
    Raj.

    Thank you Tony.
    Stored Procedure which I am calling on the page is running in database. So if this procedure runs successfully(or vice versa), how I would know?? Is there a way to pass value from database stored procedure to it's calling page?
    Following is procedure:
    procedure load_stateday_result(key_loc ATM_STATE_DAY_INSP.KEY_LOCATION%type) is
    temp_key_insp ATM_INSPECTION.KEY_ATM_INSPECTION%type;
    temp_key_location number(8);
    temp_dte_schedule date;
    begin
    temp_key_location := key_loc;
    select key_atm_inspection,dte_schedule into temp_key_insp, temp_dte_schedule
    from atm_inspection where
    key_location = temp_key_location and exam_type = 'D' and exam_yr = to_char(sysdate,'yyyy');
    insert into atm_state_day_insp(key_atm_state_day_insp,key_location,key_atm_insp,scheduled_dte)
    values(state_day_insp_seq.nextval,key_loc,temp_key_insp,temp_dte_schedule);
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error :'|| SQLCODE||':'||SQLERRM);
    --ROLLBACK;
    RAISE;
    end load_stateday_result;
    Will appreciate your reply.
    Thanks,
    Raj, NY

  • Plsql code for button.....

    i have a page which contain fields term_id,*term_desc*,*term_condition*
    and some buttons Add,*delete* and save..
    Actually no data in the table..
    when i press Add button the term_id should get increment by '1' .
    where i have to wite the below coding in Edit Add button?
    can i put the coding in Conditional Item Display condition type PLSQL?
    declare
    a number;
    begin
    select max(nvl(term_id,0))+1 into a from term_creation;
    *:P5_TERM_ID*:=a;
    end;
    Edited by: skud on Mar 5, 2011 2:05 AM

    You can submit the page with a request say "MY_REQUEST" and run a conditional PLSQL block(request equal to MY_REQUEST) and add the PLSQL code there.
    If you want to do it without submitting page
    <li>Apex Version 4 : Add an id to button (button attributes, id ="MY_BUTTON" ) and add a Dynamic Action fired on click of DOM element : MY_BUTTON , event type would be PLSQL and write your PLSQL code there(add required page items to be submitted in the field)
    <li>Apex 3.x and 2.x(works iwth apex 4 too), create an ondemand PLSQL process, call the process from a javascript function(add the item values to session using the ajax request handle) and call the javascript function from the button click( action type: redircet to URL , javascript:function_name(parameter1,parameter2) )

  • How to use dynamically column_name and column_name value in plsql procedure

    hi,
    how to use dynamically column_name and column_name value in plsql procedure.
    for example, i have one table with column col1.i want write plsql code with dynamically execute the insert one schema to another schema.
    by
    siva

    DECLARE
    CURSOR C
    IS
    SELECT cc_cd
    FROM TEMP1 WHERE s_flg ='A' AND b_num IN('826114');--,'709537','715484');
    CURSOR D
    IS
    SELECT * FROM cONSTRAINTS_test ORDER BY SRL_NUM;
    STMT VARCHAR2(4000);
    p_target_schema VARCHAR2(30):='schema1';
    p_source_schema VARCHAR2(30):='schema2';
    BEGIN
    FOR REC IN C
    LOOP
    FOR REC1 IN D
    LOOP
    STMT := 'INSERT INTO '||p_target_schema||''||'.'||''||REC1.CHILD_TABLE||' SELECT * FROM '||p_source_schema||''||'.'||''||REC1.CHILD_TABLE||' where '||REC1.COLUMN_NAME||'='||REC.cntrct_cd||'';
    Dbms_Output.Put_Line('THE VALUE STMT:'||STMT);
    END LOOP;
    END LOOP;
    END;
    cc_cd='434se22442ss3433';
    cc_t_ms is parent table-----------------------pk_cc_cd is primary key
    cc_cd is column name
    CONSTRAINTS_test table
    CHILD_TABLE NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME NOT NULL VARCHAR2(30)
    COLUMN_NAME NOT NULL VARCHAR2(400)
    R_CONSTRAINT_NAME VARCHAR2(30)
    CONSTRAINT_TYPE VARCHAR2(1)
    PARENT_TABLE NOT NULL VARCHAR2(30)
    SRL_NUM NUMBER(4)
    CHILD_TABLE     CONSTRAINT_NAME     COLUMN_NAME     R_CONSTRAINT_NAME     CONSTRAINT_TYPE     PARENT_TABLE     SRL_NUM
    a aaa cc_CD     pk_cc_CD     R     cc_t_MS     1
    bb     bbb      Cc_CD     PK_CC_CD     R     cc_t_MS     2
    bb_v     bb_vsr     S_NUM     PK_S_NUM      R     bb_v      3
    cC_HS_MS     cc_hs_CD     cc_CD     PK_CC_CD     R     cc_t_MS     4
    cC_HS_LNK cc_HIS_LNK_CD     H_CD     PK_HS_HCD     R     cC_hs_ms 5
    cC_D_EMP     cc_d_EMP     Cc_CD     PK_CC_CD      R     cc_t_MS     6
    i want insert schema1 to schema2 with run time of column_name and column value.the column_name and values should dynamically generated
    with refential integrity.is it possible?
    can any please quick solution.its urgent
    by
    siva

  • Debug plsql code in sqldeveloper

    Hi all,
    I am new to sql developer, can anyone help me how can i debug a plsql code in sqldeveloper for each step ( each line ) and also i want to view the value of the variables used in plsql code after completion of each line execution.
    Thanks,

    http://www.thatjeffsmith.com/archive/2011/12/the-plsql-debugger-strikes-back-episode-v/

  • Interface using PLSQL code

    Hii...Experts
    I ve written a plsql anonymous block code in database . That code is selecting 2 columns from source and want to implement that code in ODI interface in such a way that the values of two columns should be loaded into target.
    How to do the such interface??
    Please Help..
    Thanks
    Edited by: soumya.rn on Mar 23, 2012 3:54 AM

    If yoru PLSQL code is in a "oracle package" object, you can call this object in an ODI interface
    example :
    your oracle package is called "my_PL_proc" and the parameter requires the source column "ID_PRODUCT"
    in your ODI mapping, you can call it :
    <%=odiRef.getObjectName("L", "my_PL_proc", "D") %>(source_table.ID_PRODUCT)

  • Run PLSQL code by click on button usin javascript

    Hi
    I want to run plsql code
    on click button using javascript
    javascript is ok but code of plsql is not run
    suggest me
    APEX 4.2.1
    Oracle !!XE
    Windows Server
    Firefox 17.0.1
    Theme Cloudy
    thanks in advance
    bUTTON CODE IN PLSQL CODE AND SEND_RMNDE IS PROCEDURE
    '<button type="button" name="button1" onclick="send_rmndr('
    ||NO_DUES_MASTER.CERT_ID
    ||');" value ='
    ||NO_DUES_MASTER.CERT_ID
    ||'> '
    ||'Remind'
    ||'</button>'
    JAVASCRIPT
    <script type="text/javascript">
    function send_rmndr(pThis)
    var params='x= '+pThis;
    var get=new htmldb_Get(null,null,null,&APP_PAGE_ID.,null,'send_reminder',params);
    gReturn = get.get();
    //alert(gReturn);
    alert ('inside script ' +params);
    //get=null;
    </script>
    Edited by: 969091 on Feb 1, 2013 9:13 PM

    send_reminder needs to be defined as an application process
    Alternatively, you can define a dynamic action and do this more declaratively.
    It's easy to define a DA that fires on click of a button that runs PL/SQL, and you can also define which page items are sent to and received from the plsql via session state.
    Scott
    blog: [url grassroots-oracle.com]grassroots-oracle.com
    twitter: [url twitter.com/swesley_perth]@swesley_perth
    -- please mark any useful posts as helpful or correct, in the end it helps us all

Maybe you are looking for