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.

Similar Messages

  • BADI for BI  Global Variables in Reporting

    Hi all,
    We have requirement in our project like, we want to write BADI for all BI Global Variable. As already Customer exit is available for all the BI global variable , but as there is limitation of IF-ENIF Statements in Include program of Customer Exit Function module , So we are planning to go BADI. Does any one have idea on BADI for BI global variable.
    Thanks in advance

    Kindly check below link for your kind information.
    http://www.scribd.com/doc/40764652/SAP-BI-Global-Report-Variable-User-Exit-Modularization
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c?quicklink=index&overridelayout=true
    How to declare Global variable in BADI
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30de01e0-b6f5-2b10-fba1-b9193b82da2a?quicklink=index&overridelayout=true
    Re: virtual keyfigure using BADI
    Regards,
    Kamruz

  • Syntax for using a variable in an equation.

    Hi all,
    Simple question here.  What is tha appropriate syntax for using a variable in a calculation equation.  Specifically, I am taking an established curve fitting equation from my channels and trying to calculate it over a lineargenerated data set to extend the curve  beyond the original data sample.  Here is the small portion of script I have that will not work.  Thanks for any help.
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

    Hi Gloorious,
    I am using diadem script.  In my example above, for the equation, if I substitue a,b,and c with numerical values, the script runs just fine and the formula executes as desired.  Is there a way to place the variables there instead as I have tried to do (I was hoping it was just a syntax issue) or do I have to approach it a completely different way?
    This script will execute just fine:
    Call Calculate("Ch(""[5]/Air Consumption LG"")= 4 + Ch(""[5]/LinearGenerated"")*5+6*ch(""[5]/LinearGenerated"")^2")
    but this will not:
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

  • Write the syntax for declaring table control in dialog programming?

    1) Write the syntax for declaring table control in dialog programming?
    2) Write the syntax to call a selection screen in a modal dialog box?

    hi,
    check this code for table control.
    DIALOG PROGRAMMING
    TABLE CONTROL
    IN SE51
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITVBAK WITH CONTROL TABCTRL. ##  TABLE CONTROL NAME
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    LOOP AT ITVBAK.
    ENDLOOP.
    IN PAI FLOW LOGIC
    PROGRAM YMODULE_PR4 .
    TABLES : KNA1, VBAK.
    DATA : BEGIN OF ITVBAK OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           ERDAT LIKE VBAK-ERDAT,
           ERNAM LIKE VBAK-ERNAM,
           NETWR LIKE VBAK-NETWR,
           END OF ITVBAK.
    CONTROLS : TABCTRL TYPE TABLEVIEW USING SCREEN '0100'.
    TO ACTIVATE SCROLL BAR
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN SPACE.
          SELECT VBELN ERDAT ERNAM NETWR
            FROM VBAK
            INTO TABLE ITVBAK
           WHERE KUNNR = KNA1-KUNNR.
          TABCTRL-LINES = SY-DBCNT.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT

  • Syntax for defining a variable  with size in changing parameters

    hi,
    syntax for defining a variable  with size in changing parameters in the form statement.

    Hi prasad,
    1. one option is to type it as an data element.
    eg.
    form abc changing myvar type char10.
    endform.
    where char10 is a data element with length 10 characters.
    regards,
    amit m.

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

  • Syntax to declare a variable in native sql

    Hi Experts,
    Please let me know the syntax to  declare a variable in Native SQL.
    Vivek Gupta

    Hello
    Check this link: http://help.sap.com/saphelp_47x200/helpdata/en/7b/0bdea252d746429420007a69bd06c7/frameset.htm
    There is example of native SQL.
    Also read this:
    http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/a3/74caa1d9c411d1950e0000e8353423/content.htm

  • 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

  • Global Variable in report

    i am working with some global variables in all of my application including forms and reports. the global variables are created in the when new-form-instance trigger of the main form. the global variables are accessible throught the forms but i d,not know how i can access the same global variables in my reports. pls some one help me to solve the problem.

    If you only want to read the global parameters in Reports, you can pass them as parameters. Otherwise, you must put your global variables into a database table, for forms and reports are not sharing the same session.

  • 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

  • How to get value for a global variable from an exel file?

    Hallo all,
    I am a beginner in LabVIEW and I have  a problem in reading datas from an exel file . I would like to import a group of data with timestamps from exel file to a global variable. for ex. speed, acceleration and position of 4 different sensors to each of its global variable.
    It will be very nice if anyone can give me some ideas.
    Thanking you in advance

    ...continued here

  • Why does Labview create a .vi for each global variables?

    Hello,
    I wrote an Labview application which use several global variables (almost 30 variables). All the variables are of variable type "single process". For each of these variables, Labview creates a vi.
    For example, for the variable "_TS.Measures.channes", Labview creates a vi named "TS_'_TS.Measures.channels'.vi". Which means, I have almost 30 "name of variable".vi files: this is confusing!
    All my VI are inside library (.llb). When I try to put the VI of a global variable in a library, Labview can't find them anymore.
    May be can somebody explain me, why LabVIEW does create these VI and how is it possible to put them in a library.
    Cheers,
    Risotto

    Hi everybody,
    Thank you for your answers, I get a lot of informations.
    Yes, I use the new shared variables in LabVIEW8, which I am using like sort of global constants. Now I am understanding what guys are telling me all this about global variables in LabVIEW7.1. Sorry, I forgot to say I was using LabvVIEW8.
    I will have a look on the tutorial too.
    But yet one point about the library collecting all the shared variables in the windows explorer and in the project explorer: When I create a shared variable in my LabVIEW project - for example "test1" as double/single process - the variable doesn't appear in my file directory, but it appears in the project explorer in a library (.lvlib).
    When I drag/paste my shared variable on the block diagramm of my VI, then a file "Math_test1.vi" appears in my file directory. There is no extra .llb created to contain my shared variable vi.
    If I drag/paste the file "Math_test1.vi" in the Math.llb (see picture), then the file is moved in the llb and disapeared from the directory.
    If I created another shared variable "test2" as double/single process and put it on the VI, then LabVIEW creates2 files in the directory: "Math_test1.vi" and "Math_test2.vi". So that I get 2 vi for the "test1" variable now (one in the llb and one in the directory).
    I use several library in the project explorer. But the  library in the project explorer seems to create file with other extension (.lvlib) than the sdtandard LabVIEW library (.llb).
    Cheers,
    Risotto
    Attachments:
    picture.jpg ‏223 KB

  • ZXRSRU01 (RSR00001 BI: Enhancements for Global Variables in Reporting)

    Hi,
    we are using Userextit RSR00001 to define partproviders of a multiproviders by using variables and a custom table because our multiproviders contain more than 60 partproviders
    i_step = 1
    SELECT * FROM zvar_cube_userex INTO wa_zvar_cube_userex " 
          WHERE     bex_variable EQ i_vnam.                  
          IF sy-subrc EQ 0.                                   
            l_s_range-low    = wa_zvar_cube_userex-infoprovider.
            l_s_range-sign   = 'I'.                            
            l_s_range-opt    = 'EQ'.                           
            APPEND l_s_range TO e_t_range.                     
          ENDIF.                                              
        ENDSELECT.                                      
    At the end of  i_step = 1   in I_T_VAR_RANGE we get following entries
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG01
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG02
    ZINP_CP2     0infoprov   I  EQ  ZCPCRAG03
    Now our question.
    Cubes ZCPCRAG ZCPCRAG01 and so on are yearly cubes, devided by 0fiscalper. Now we think about,  additional to our 0infoprov determination ( depending on query) using SAP standard possebility "Logical multiprovider partitioning" via table RRKMULTIPROVIDERHINT. 
    - Is that possible ?
    - Is ther somebody who used it in the same way?
    Harald

    Thanks rakesh&sangeetha
    In my senario
    I created one report,on report I created on custmor exit varible
    for calday
    when I execute the report in 3.x analyzer Iam getting break point screen(I will take u to cmod)
    If I execute same report in BI.7 It,s not displying  break point?
    (with out asking the variable values ,its directly executing the report)
    why like this ?

  • Best practice for mutable global variables

    I have read around a couple of posts regarding the topic and still haven't come to any with just the right answer for the best way to work with a variable which everybody other object needs to read and/or write? I have read about multiple ways for immutable variables but not quite sure what to do with mutable ones.
    I prefer to declare them in a global.h file
    extern NSString *currentUserName;
    and then in the global.m file
    NSString *currentUserName = @"none";
    in this scenario a user can login or logout at any time so every object throughtout the program should be able to change the username.
    Any inputs as to why thise shouldn't be done like this? Any other ideas?
    Message was edited by: rnieves_liberty, changed tags for code

    Is this a multithreaded application? If it is, then you will need to use some sort of locking on it. I prefer the "@synchronized" directive.
    The proper way to handle something like this is with a singleton. Ideally, that singleton should be a UserNameController. It, and only it, should be able to update the user name. Anyone else has read access only.

Maybe you are looking for

  • Latest Firefox (23.0.1) won't install

    Firefox crashed (not uncommon) so I went through the restart routine. It decided to install the latest version, got as far as "Checking Compatibility of Add Ons" and sat with the 'scanning green bar' sliding happily grpm end to end. After 6 hours I g

  • Icon Size in Word

    I posted this in the Office Discussion Group at Microsoft.com, but after three days there were no replies. So I'm hoping that this much more reliable forum will be of help. I have recently installed Office 2004 for Mac. When a new blank Word document

  • How to copy my jpeg email signature into mail

    I am desperate to copy my company email signature into  my iPad mail

  • Is there a tutorial on how to work in the TV Script templates?

    There are several templates, I am currently trying to use the UK (template 1), but I am finding it rather confusing and difficult to create a cohessive script/pilot. I am new to tv writing, experienced in film writing though. I can't imagine there is

  • HELP, problems with my icloud email

    Hello, I Tried to change my icloud password but i can't receive it because i forgot my security questions and the e-mail adres that is linked to it doesn't excist anymore, so it is impossible to receive a new password. How can i reset it because my I