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..

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.

  • 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."

  • 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

  • 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

  • How to declare global variables using another global variable in ODI

    I am declaring a gloabal variable using another global variable.
    say for example:
    I have a global variable empid.
    I am decalaring another global variable empname in refreshing tab of global variables and the select statment is
    select empname from emp where empno = #GLOBAL.empid -------if i write like this i am getting error as invalid character.
    select empname from emp where empno = '#GLOBAL.empid'-------if i write like this i am getting error as invalid number.
    I have kept the datatype as numeric and action as non persistent
    Please help
    Thank you in advance.

    Hi,
    You cant test/refresh empname standalone.
    You need to create a new package drag and drop both variables and make them as refresh variable and execute that package and test.
    Flow,
    empid----> empname
    Thanks,
    Guru

  • Syntax for declaring global variable in report

    Hello all,
    Kindly let me know syntax for declaring global variable in report?
    Thnks,
    SUnny

    Hi Sunny,
    All data declaration in the main program is global.
    Only if you do some data declaration withtin the subroutines then the scope of the variable is limited to that FORM ....ENDFORM.
    As you read in the above reply for a global variable in FM you need to declare in the top include.
    This means that you want this variable to be made available to all the Function Modules in that Function Group.
    If you want to make the variabe be available only within that FM then do the declaration in the source code itself.
    hope this explaination helps,
    Taher.

  • Declare global variable and retrive?

    Hi,
    we are working in live project in webtool, we wants to create global variable,
    calling that variable in a required pages, our questions is that where to declare global variable and how to declare in which page we have to declare?   pls guide us its very urgent and send the code.
    Regards
    Kannan.D
    Edited by: kannan desikan on Jan 14, 2008 8:07 AM

    Hi Kannan,
    I would suggest using a comma delimied list or putting it in the database.
    ArrayList myList = new ArrayList();
    myList.Add("one");
    myList.Add("two");
    myList.Add("three");
    string comma = "";
    // store the array in the session state
    foreach (string s in myList){
      Session["persistedArray"] += comma + s;
      comma = ",";
    To get the array back
    if (Session["persistedArray"] != null){
      ArrayList myList = Session["persistedArray"].ToString().Split(new char[1] {','});
    If your array is storing objects, you should use the database.

  • I am passing my itab data to variable declared in global declaration.

    Dear All,
                  I am passing my itab data to variable declared in global declaration, i am getting column one data in all eight variables declared. but column two data having 8*10=80 data i.s. for 1 entry of column there is 10 entries of column two of field two ,
    but when i am passing that data to a variable i am getting only 1st entry of column 2 instead of 10 entries, plz help me in solving this query. i am working on Smartform.

    Definetly you will get only one record...
    instead of variable decalre and internal table of type variable definition in the global defination and append the values into it..
    now you will get all the entries which you want..
    Regards
    Satish Boguda

  • 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,

Maybe you are looking for