Apex- global variable declaration

Dear Friends
I am very new to Oracle applicaiton express,
Please let me how to declare global variable in an applcation. The variable should be accessible throught ot all the pages in that applicaion. Any one can help?

Hi,
use an application item for that purpose.
Just navigate to Shared Components->Application Items and create what you need.
Regards,
Moritz

Similar Messages

  • How to go to java section global variable declaration

    Hi all
    i am following this scenario
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID0446700150DB10376299506581707969End?blog=/pub/wlg/11287
    in this scenario 3rd screen shot is about global variable declaration:
    In order to build the content of the attachment (for this particular requirement) we use a global variable declared and initialized in the global sections :
    can any body tell me how to go to this java section screen , as i am unable to find this java screen....
    Thanks
    sandeep

    even i cant see this edit java section
    i am working on PI 7.1. has this feature been removed in pi 7.1
    this is replaced in PI7.1 ... check this blog on how to use the "global" variable in PI7.1:
    /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    Regards,
    Abhishek.

  • Apex Global Variable like D2K

    HI,
    Previously my application was develop in d2k6i where i use global variable to keep user_id available in every forms...
    is it posbile to declare global variable in Apex ?
    Thanks
    Engr.M.K Chowdhury

    Just to extend Andy's point a little further, you may want to look at some of the built in Substitution Strings that APEX offers you right out of the tin:
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BEIFGFJF
    You may find that Oracle provide you with the global value you need but follow Andy's advice for creating your own.
    Duncs

  • Unit Testing and APEX Global Variables

    We've recently started to unit test our database level PL/SQL business logic.
    As such we have a need to be able to simulate or provide output from PL/SQL APEX components in order to facilitate testing of these components.
    Some of the most obvious portions that need simulation are:
    1. The existence of a session
    2. The current application ID
    3. The current page ID.
    We currently handle requirement #1 by using apex_040100.wwv_flow_session.create_new
    We handle 2 and 3 using the apex_application.g_flow_id and g_flow_step_id global variables.
    I'm just wondering, how safe is it for us to use wwv_flow_session.create_new to simulate the creation of a session at testing time for those things which need a session?
    I've also noticed that there are apex_application.get_application_id and apex_application.get_page_id functions whose output is not tied to the global variables (at least in our current version).
    Is it safe for us to expect that we can set these global variables for use in testing or is apex moving to get_application_id and get_page_id functions away from global variables?
    Will there be corresponding set_application_id and set_page_id functions in the future?
    Sorry for the question bomb. Thanks for any help.

    My first question would be why do you need to establish a session to test your PL/SQL?
    wwv_flow_session is a package internal to APEX, and you should probably leave it be.
    The get_application_id procedure you refer to is in apex_application_install, which is used for scripting installation of applications - not get/set of page ID like you're describing.
    If you're uncomfortable using apex_application.g_flow_id, you can use v('APP_ID') or preferably pass the app_id/page_id as parameters to your procedures.
    Your question seems to have a few unknowns, so that's the best I can describe.
    Scott

  • Global Variables declaration in PI 7.1

    Hi All,
    In message mapping where can I declare global variables in PI 7.1.
    Thanks and regards
    Uma

    Hi Sarvesh,
    Thank you for the response.
    The blog given by you is on PI 7.0, But icon(Java Sections) is not present in PI 7.1 mapping editor .
    Please guide me how can I proceed further.
    Thanks & regards
    Uma
    Edited by: Uma Balasubramanya on Mar 20, 2009 1:11 PM

  • Global Variable declaration in Custom Infotype

    Hi All,
    I need to validate a custom infotype field, where i need to check for execution times. I need to override the field value only during first time of the run(PAI logic) and there after user can choose a value of his choice.
    I was looking out for Global variable to check if its first run. Can you please tell me how do i create global variable in custom infotype? The top include specified in the program is not editable, being standard (MPH5ATOP).
    Thanks,

    >
    Sachidanand B wrote:
    > Hi All,
    >
    > I need to validate a custom infotype field, where i need to check for execution times. I need to override the field value only during first time of the run(PAI logic) and there after user can choose a value of his choice.
    > I was looking out for Global variable to check if its first run. Can you please tell me how do i create global variable in custom infotype? The top include specified in the program is not editable, being standard (MPH5ATOP).
    >
    > Thanks,
    The system will generate an include with the naming convention ZP<Custom Infotype number>10(This program will be included in the custom infotype main program ZP<Customeinfty number>00). You can use this include for your data declarations.
    Ex: if the number of the custom infotype is 9010 the generated include name will be ZP901010.
    For more details check the link below
    http://help.sap.com/saphelp_47x200/helpdata/en/4f/d525ad575e11d189270000e8322f96/content.htm
    Regards
    Rajesh:

  • Global Variable Declaration in PI 7.1 EHP 1

    Hi Experts
    How can I declare the Global Variables in PI 7.1 EHP 1 , please let me know if there is any blog in Enhancement Pack 1
    Thanks
    PR

    On PI7.1 global variables have been removed.
    You can try one of the following:
    1. Create a global variable within an UDF;
    2. Use the solution from the blog below:
    /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable

  • Global Variable Declaration in ProcessRequest Method

    Hi All,
    i need to declare a variable(Global) in Process request Method and then i need to pass this variable value in ProcessRequest Method of Another Page.
    it is possible to declare a Global Variable in ProcessRequest Method.
    Process Request Method:
    if(pageContext.getSessionValue("varBatchID")!=null && pageContext.getSessionValue("varCustomerID")!=null)
    System.out.println("Second Else From Drill Down");
    String strCustID=pageContext.getSessionValue("varCustomerID").toString();
    String strBatchID=pageContext.getSessionValue("varBatchID").toString();
    System.out.println("CustomerID:"+strCustID);
    System.out.println("strngBatchID:"+strBatchID);
    Serializable[] parameters={strCustID,strBatchID};
    OAMessageStyledTextBean oamessagestyledtextbean=(OAMessageStyledTextBean)createWebBean(pageContext,"strCustID");
    oamessagestyledtextbean.setText(pageContext,"strCustID");
    pageContext.getApplicationModule(webBean).invokeMethod("backTocusttrxn",parameters);
    pageContext.removeSessionValue("varCustomerID");// Here i need to close this session Value and at the same time i need to pass this session value to another page PR Method. SO For that i need to Declare a variable(Global) and pass that variable value to another page.
    pageContext.removeSessionValue("varBatchID");
    Could you please any one give me the solution for this.
    Thanks,
    Mallik.

    Hi ,
    Create transaction variable and pass your value into that and get the same in other CO using below code,
    pageContext.putTransactionValue("IrcSelectedPersonId",value)
    pageContext.getTransactionValue("IrcSelectedPersonId");
    Regards,
    Vijay Reddy.

  • Global variable declaration in form routines

    Hi All,
    i am new of the smartforms, i have a small problem in smartforms.
    i need to display the one text based on the condtions, already i have putted the condtions in the condition tab for the text, i need to compare the one more condtion, the condtion is TB_INFORMATION IS NOT INITIAL.
    the code was devaloped in the formroutines , i need to implement the one condtion in the form routines,
    the condition is if TB_INFORMATION IS NOT INITIAL is not initial
                                  va_information = x.
                                endif.
    already i declared the variable in the global defination ,but i am getting the error.
    where can i declare the global variable in form routines.
    Please help me,
    Thanks & Regards
    charan

    declare in global data and it will be visible and available in form routines too.

  • Static used on global variable declaration

    I have inherited a CVI project that contains a single .C file and a couple of .UIR files with their associated .H files.
    Many of the global variables have STATIC in their declaration - I believe this is due to the fact the original developer originally had them inside various functions and at some point changed strategy to make them global, leaving the STATIC keyword in place when copy/pasting.
    As I understand it the ONLY implication of STATIC on a global variable would be to keep its visibility only to the .C file in which it is declared. In this instance that is moot since there is only one .C file in the project.
    Is there anything about LabWindows/CVI which I might not be aware of that makes this use of STATIC cause something different than if STATIC were not used?
    Thanks for any input you might have since I'm new to CVI

    Roberto and menchar said it well:
    "static variables are declared at compile time and survive when their block of code terminates. If declared at function level, their value survives from one call of the function to another, so that they can be used over time to store permanent values locale to the function. If declared at module level, they are common to all functions in the module and are allocated outside the stack so that their values are not lost during program life. In every case they can be accessed and modified in values by functions in the program. If arrays, they cannot be dinamically changed in size."
    "The static keyword can be used with a function name also, meaning the function name isn't exported to the linker, and the function is in scope only to code within the module."

  • Global variable declaration

    Hi all,
    can u please tel me hoe to declare the variable globally in abap report so that i can use it in any of my include program in that report.
    thanx....

    >
    MONIKA DHUMAL wrote:
    > Make all Data Declarartions in TOP include.
    >
    > like
    >
    > REPORT  ZSDR_INV_INR.
    >
    > include ZSDR_Di_TOP.
    > include ZSDR_DI_FORM.
    >
    > START-OF-SELECTION.
    >
    > PERFORM get_sales_data.
    > perform get_delivery_data.
    > perform process_data.
    > perform refresh_tables.
    > perform get_sales_data_ZIO2.
    > perform get_delivery_data_ZIO2.
    > perform process_data_ZIO2.
    > *Perform Filter_Fieldcat.
    > perform display_report_DI.
    >
    >
    > Here make all ur data declarartions in ZSDR_Di_TOP .
    >
    > THEN U CAN USE ALL VARIABLES GLOBALLY.
    and if i also  have some standard includes with them, but im not making any changes to them
    like.
    std incl
    std incl
    Z    incl
    std incl
    Z   incl
    like this .
    still will it be work in this condition??
    thanx..

  • APEX :-Global Variable

    HI,
    Can someone please let me know the steps how to handle below requirment.
    Our requirement is when we select language in the select list in HOME page, the value need to pass global, because few of the LOV’s are using this variable.
    EG: DE,FRA,EN (Showing in the select list)
    LOV Query:
    case when :sprache = 'fra'
    then 'Afficher tout'
    else 'Alle anzeigen'
    end as text
    from dual
    Thanks in advance.
    Prabhat

    Create an application-level Item
    See http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldapp_item_app.htm#HTMDB29095

  • APEX: Declare global variable in APEX

    Hello All,
    Can anyone tell me how to declare global variable in Process(Pl/sql code) in Oracle APEX.
    Thanks,
    Jiten

    There is nothing like Global Variable that can be declared in Process in Apex.
    Look up Shared Components > Application Item. Maybe that is something that meets your requirement.
    Alternate, use Page 0 items.
    Regards,

  • Use global variable in reports which is declared in forms

    Hi All,
    I have declared and used a global variable in Forms and after that I'm running a report and I want to use the same variable in reports.
    How can I use that.
    Regards
    Praveen Kr. Arora

    Hi Rizwan,
    Thanks for prompt reply.
    Can you explain in more detail with example.
    Though I'm calling report from menu item and I have created report file with three parameters.
    In menu item I have created a parameter list with same three parameters but whenever I tried to run then it gives Invalid ID error for all three parameters.
    Regards
    Praveen Kr. Arora

  • Apex 3.2 - Global Variables loosing value!

    Hello Everyone,
    I am using Oracle Apex version 3.2. I am using global variables in my queries.
    I found that some times but not always these global variables loosing their
    value. How I can resolve this issue?
    All replies will be appreciated. Thanks in advance for your replies.
    -Parveen

    Hi, thanks for your answer.
    The king of caché I was talking about is something like this:
    * I get a table record (rowtype) from a query accesing the table by PK.
    * I store the value of my PK and the record I got in PL/SQL and go back to the app.
    * Then, if I need to get another record from my table accesing by PK I compare the PK value I got in memory:
    - It is the same value: return the record (in this way I don't have to query my table).
    - It isn't the same value: query the table with the new value and store the record and the PK value.
    It is easy to do this in applications like Forms or .NET, but can I do it with APEX?
    Thanks.
    Johann Alexander Quintero
    Cali, Colombia.

Maybe you are looking for