Doubt on constants ans variables

I've got an application with sheets, forms and modules. I would like to create constant or public variables to store the index of each column of the sheets so that I can use them along of the code instead of writting the numbers everytime. So, I created
a Public Integer Variable for each column, such as SHT1_ColSuppliers, SHT3_ColVendors and so on, on the workbook domain, and initialized each of them in the event workbook_open. However, I am debugging the code line by line and I see that the variables are
actually null. Would anyone have a solution for where to declare the variables and make it all work out?
Jorge Barbi Martins ([email protected])

I guess I have tried that, however, after the event Workbook Open is over the values of the variables are set to 0 back again aren't they?
Any variable has a limited life time, variables declared inside a sub are gone when the sub ends.
Global declared variable are gone when the project is reset, e.g. when you debug a sub and you click the Reset button within the VBA editor.
A
common mistake is
to declare a variable with the same name
several times in different modules.
Read also this article:
https://support.microsoft.com/KB/141693
Anyway,
this is not an outcome. The solution is to use a Property instead of a variable.
The Property should be static and store the value into a local variable, so when the property is called and the stored value is zero, it can determine the value again.
Furthermore for the column number, resp. heading in your case, I suggest to use a dictionary to store the numbers.
Andreas.
Option Explicit
Public Static Property Get ColumnNumber(ByVal Heading As String) As Integer
Dim Dict As Object 'Scripting.Dictionary
Dim R As Range
Dim Key As String
'Dictionary intialized?
If Dict Is Nothing Then
'Create it
Set Dict = CreateObject("Scripting.Dictionary")
'Ignore spelling
Dict.CompareMode = vbTextCompare
'Collect the headings in the top row
For Each R In Range("A1", Cells(1, Columns.Count).End(xlToLeft))
'Get the value as key
Key = R.Value
'Only add unique keys
If Not Dict.Exists(Key) Then Dict.Add Key, R.Column
Next
End If
'Return the number if the header exists
If Dict.Exists(Heading) Then ColumnNumber = Dict(Key)
End Property
Sub Test()
Debug.Print ColumnNumber("WhatEver")
End Sub

Similar Messages

  • What is the difference between Constant Window, Variable Window,Main Window

    hello all
    what is the difference between 1) Constant Window
                                                2) Variable Window
                                                3) Main Window   in SAP SCRIPT

    Hi,
    Window Types
    When defining a form window, you must select a window type for the window.
    You can choose between three types:
    Constant Windows (CONST)
    Variable Windows (VAR)
    Main Windows (MAIN)
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR.
    Therefore, if you create a new window, always use type VAR.
    Variable Windows (VAR) 
    The contents of variable windows is processed again for each page, on which the window appears.
    The system outputs only as much text as fits into the window. Text exceeding the window size is truncated;
    the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike.
    The only difference is that constant windows have the same size throughout the form.
    Main Windows (MAIN) 
    Each form must have one window of type MAIN. Such a window is called the main window of the form.
    For SAPscript forms, the main window has a central meaning:
    It controls the page break.
    It contains the text body that may cover several pages.
    It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to
    output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form.
    The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page.
    This page must not call itself as subsequent page (recursive call), since this would produce an endless loop.
    In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    go through this links:
    In Scripts Variable window and constant wind difference?
    Main Window
    Re: Main Window in SAP Script
    What is the difference between Constant window and variable window?
    Regards
    Adil

  • Stage height and width in private const or variable

    Hello, everyone I've got problem with this code.
    I need stage size in const or variable because of some resize reasons.
    ok so, code below works but it's static and I need dynamicaly get stage size.
    private const LIST_HEIGHT          :uint = 800;
    private const LIST_WIDTH            :uint = 1200;
    with(_mask)
    graphics.beginFill(0);
    graphics.drawrect(0, 0, LIST_WIDTH, LIST_HEIGHT);
    graphics.endFill();
    and if I change constants to this:
    private const LIST_HEIGHT          :uint = stage.stageHeight;
    private const LIST_WIDTH           :uint = stage.stageWidth;
    it's not work
    also this not work
    private var _listH          :uint = stage.stageHeight;
    private var _listW         :uint = stage.stageWidth;
    and this:
    private var _listH          :String = stage.stageHeight;
    private var _listW         :String = stage.stageWidth;
    not work means that I get this error
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.filebrowser::FilesList()[/Users/Peter/Desktop/projectfl/projectfl beta 0.6/as3/com/filebrowser/FilesList.as:14]
              at flash.display::Sprite/constructChildren()
              at flash.display::Sprite()
              at flash.display::MovieClip()
              at com.filebrowser::FileBrowser()[/Users/Peter/Desktop/projectfl/projectfl beta 0.6/as3/com/filebrowser/FileBrowser.as:51]
    Thanks in advance for all replies, all help is very appreciated.

    ps. I should add this information.
    this is code for external swf.
    if it's alone it works but if I load it to main swf it's not working.
    and my only problem is this:
    this is working
    private const STAGE_HEIGHT:uint = 800;
    and this not
    private const STAGE_HEIGHT:uint = stage.stageHeight;

  • Difference between Constant and Variable window

    Hi all,
    What is the difference between Constant window and Variable window.I am not observing difference between them.I created two pages(page1 and page2) with 3 WINDOWS(Main,const11 and var11) and I inserted 8 lines of text on each window.But all the 3 windows are capable of holding 4 lines of text only.I included all those above 3 windows in both pages(Page1 and Page2).In page attributes for Page1,I included 'Page2' for next page and for page2 I included 'page2' for next page.
    when I executed the form.I am getting constant texts in windows Const11 and Var11 for all output pages.I got 4 pages as output.
    But what I learnt is constant windows contains constant text in all form pages and Variable windows contains variable contents in all form pages, in which they appear.But to my surprise variable window also contains constant text like constant window.That means the texts on both constant and varilable are same on all ouput pages( 4 pages of output).
    Rgds,
    Balaji

    hi,
    Contents in Variable window are regenerated for each and every page hwere as contents in Constant window are generated only once and same is displayed for every page.
    SAPscript does not distinguish between the two window types, although both types are mentioned in the SAPscript documentation.
    This means that, for better performance, windows that contain different information on different pages must be VAR; all others are CONST. The content of the window is defined in the SAPscript editor.
    Regards,
    Sailaja.

  • Doubt in creating a variable in Crystal Report 2008 SP3

    Hi,
    I am new to Crystal Reports, I need to create a variable with the below logic.
    No of Subscriptions Pending: COUNT(SUBSCRIPTION_ID) WHERE FCT_SUBSCRIPTION_ACTION.SUBSCRIPTION_ACTION_STATUS IN
    (SELECT SUBSCRIPTION_ACTION_STATUS_CODE FROM LKM_SUBSCRIPTION_ACTION_STATUS WHERE
    FINAL_STATUS_FLAG = 'T')
    My data source is an universe where I have SUBSCRIPTION_ID, SUBSCRIPTION_ACTION_STATUS, SUBSCRIPTION_ACTION_STATUS_CODE & FINAL_STATUS_FLAG objects.
    I have pulled all the required objects from the universe into the Crystal Query.
    As we don't have the option to use Where condition in CR (As per my knowledge), I want to know how to write the above logic using "If" or some other function.
    Thanks in Advance,
    Mitch.

    Hi Jamie,
    Thanks for your reply & sorry for the late reply, I was away for Christmas.
    I tried your formula but it is not working properly.
    If I use  "IF FINAL_STATUS_FLAG = 'T' THEN SUBSCRIPTION_ID" then it is giving all the subscriptions count instead of pending ones.
    We need count the Subscription_ID's based on the Flag Status & the Action_Status & Action_Status_Code as per the formula.
    No of Pending Subscriptions: COUNT(SUBSCRIPTION_ID) WHERE FCT_SUBSCRIPTION_ACTION.SUBSCRIPTION_ACTION_STATUS IN
    (SELECT SUBSCRIPTION_ACTION_STATUS_CODE FROM LKM_SUBSCRIPTION_ACTION_STATUS WHERE
    FINAL_STATUS_FLAG = 'T')
    But your method is not taking Status Codes into consideration (correct me, if I am wrong)
    While checking against the Database I found the following results
    1) SELECT DISTINCT SUBSCRIPTION_ACTION_STATUS_CODE FROM LOOKUP.LKM_ORDER_ACTION_STATUS
         Result: AM, BA, CA, DC, DE, DO, FI, FU, IN, NE, NO, OH, RE, TC
    2) SELECT DISTINCT SUBSCRIPTION_ACTION_STATUS FROM FACT.FCT_ORDER_ACTION
          Result: DC, TC, AM, IN, DE, NE, CO, DO, NO, BA, CA
    Values in SUBSCRIPTION_ACTION_STATUS & SUBSCRIPTION_ACTION_STATUS_CODE differ. &
    3) SELECT ORDER_ACTION_STATUS_CODE FROM LOOKUP.LKM_ORDER_ACTION_STATUS WHERE
    FINAL_STATUS_FLAG = 'T'
          Result: CA, DC, DO
    4) SELECT ORDER_ACTION_STATUS_CODE FROM LOOKUP.LKM_ORDER_ACTION_STATUS WHERE
    FINAL_STATUS_FLAG = 'F'
          Result: AM, BA, DE, FI, FU, IN, NE, NO, OH, RE, TC
    Any other way of doing this.
    Thanks,
    Mitch.

  • How can I hide constant variable value in class file?

    hi,everybody.
    I am having a problem with constant variable which define connectted with database(URL,username,password).
    when I used UltraEdit to open class file, I can see constant variable value.
    Thanks!

    OK, let's see. Firstly, if I may correct your terminology, the phrase "constant variable" is a paradox (I think that is the right word). You have either one of the other. You declaration is either 'constant' or 'variable' (ie: it can change at run-time or it doesn't). People often use the term 'variable' and 'declaration' interchangably which is where the confusion lies.
    Anyway, onto the real problem. It seems that you want to protect your connection details (in particular the password, I would guess). Unfortunately, Java compiles not to machine-code, but byte-code which is semi-human-readable. So people, if they are inquisitive enough, will always be able to see it if they try hard enough.
    You can do one of two things:
    (1) Get an 'obfusticator'. An obfusticator is something that you run over Java source files and it completely messes it up (without modifying functionality). You then compile and the original source is such gibberish that the byte-code is very difficult to understand. However, the password will still be in there somewhere.
    (2) Don't put sensitive information into your source. Have this kind of info in external files (encrypted) and allow your class to read this file, decrypt, and use it.
    Hope that helps.
    Ben

  • In Scripts Variable window and constant wind difference?

    In Scripts Variable window and constant window  difference?pls help me

    Hi
    VAR - Window with variable contents. The text can vary on each page in which the window is positioned. Variable windows are formatted for each page.
    CONST - Window with constant contents which is only formatted once.
    CONSTANT WINDOW
    A window of type CONST has the same contents and size on all layout set pages, on which a corresponding page window is defined. This allows the processing of the window contents to be optimized internally.
    Page windows whose allocated window is of type CONST must have the same size throughout the layout set. If a window of type CONST is full, all remaining text the application program wants to output in this window, is lost. Constant windows do not trigger a page break. In other words: all text exceeding the window size is simply truncated.
    VARIABLE WINDOW
    The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different layout set pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike. The only difference is that constant windows have the same size throughout the layout set.
    Edited by: Jyothsna M on Feb 20, 2008 7:48 AM

  • Problems with variable speed

    problems with clips switching from constant to variable speed.

    Could you be more specific? What are you doing exactly and what is happening when you do it? Which version of FCP?

  • View alarm status of shared variable

    Hello:
    I need to know the alarm status (I mean, if the shared variable is currently alarmed) of some shared variables hosted in a Compact Fieldpoint Controller.
    I've seached for options on how to do this (like searching for a property through a property node of the SharedVariableIO class) but haven't found a succesful method to do it.
    Anybody knows how to do that?
    Thanks in advance!
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0

      Hola Robst, para ver las propiedades de una variable lo que necesitas hacer es habilitar el porperty node para que acepte como entradas las constantes de Variables Compartidas. Para que property node acepte esta referencia como entrada tienes que decirle que en clase es una variable compartida. Para seleccionar la clase da clic derecho sobre el nodo, y ahí aparece en el menu class. Después selecciona Shared Variable. Una vez que tengas la Shared Variable vas a tener todas las propiedades, sin embargo aquí no hay una propiedad que diga si está o no activa la alarma este nodo más bien te permite saber la configuración de la alarma y modificarla.
    Aquí hay tres opciones sencillas para sacar esto. La primera es utiliza solo una variable y conectala al Read Alarms, o Alarm Status a partir de aquí puedes saber si existe o no alarmas.
    Con el de Read Alarms si el arreglo regresa vacio es que no hay alarmas. Con el de alarm Status hay una elemento del Cluster que te indica que si hay alguna alarma.
    Ahora otra opción es utilizar Read Alarms y de ahí extraer cuales son las alarmas.
    Saludos
    Message Edited by BeCeGa on 12-18-2008 05:43 PM
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD
    Attachments:
    Alarmas2.PNG ‏21 KB
    Alarms Variables.vi ‏22 KB

  • How to Access Variables defined in the PopUpWindow

    Hi Friends
    I am building a flex site using flex builder 2.....
    Here I need your help.....
    My Problem is how to store a variable from a popup window
    I have this problem while in the login window comes as popup
    while clicking login button in the page a popup where user
    can enter username and password...
    after submitting if the login is successufl the popup
    vanish...
    After a successful login I need to store the logged user name
    in the main index page but I am not able to store
    At first I created a variable 'loggedUsername' in the popup
    panel and after success log i assigned the username to it ... after
    it i am not able to get the loggedUsername..
    doubting I defined the variable in the main index.mxml page
    but this variable is not accessible from the loginwidow.mxml page
    where the popup will function...
    Heip me
    how to store the name if the user login is success..
    thanks
    Chintu...

    Lets say you have a public property in your application like
    public var name:String = "John Smith";
    to access this using an inline item renderer:
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:TextInput text={outerDocument.name} />
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    To access variables of the applicaton you can use
    Application.application.name (for example) to reference "global"
    variables, so you might also use this technique. With an inline
    item renderer, the outerDocument property will refer to the
    component which contains the renderer.

  • Presentation Variable Optional Format Mask

    Hi,
    On page 45 of the Answers documentation at
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31767.pdf
    It says that you can specify an optional format mask for a presentation variable:
    ##Start Of Extract##
    @{variables.<variableName>}{<value>}\[format] - for presentation variables
    For example, @{variables.myFavoriteRegion}{Central} - inserts the value of the
    presentation variable myFavoriteRegion.
    ❏ variables - prefix that is required when you reference a presentation variable in a request.
    ❏ variableName - a reference to an object available in the current evaluation context. For example: @{variables.myFavoriteRegion}.
    ❏ value - (optional) - a constant or variable reference indicating a value to be used if the variable referenced by the variableName isn't populated (is undefined).
    ❏ format - (optional) - a format mask dependent on the data type of the variable. For example: #,##0, MM/DD/YY hh:mm:ss, and so on.
    ##End Of Extract##
    Has anyone got this optional format mask to work? I've tried things like:
    @{pv_my_date}{01/01/2009}\[YYYY-MM-DD]
    hoping that it would render the 01/01/2009 into 2009-01-01 format but to no avail. Annoyingly there are no examples of a format mask being used, and I can't see any examples in Paint or Sales either, so maybe the documentation is wrong.
    But wouldn't it be great if it did work - render dates into exactly the format you want, regardless of what locale the user is using!

    Try to look into that prompt column to see why you are getting different date format.
    If it is not correct as per you application then I would suggest to correct it using column->Data Format and then Save.
    I would suggest to convert the filter to SQL format to handle it, you may get it after Filter... button add date and then use Advanced button. using SQL you have options to do it.
    Thanks
    Edited by: Srini VEERAVALLI on Apr 12, 2013 7:47 AM
    What is Print Date?!! Is that available column in Subject Area? If you dont know why its like that investigate.
    Edited by: Srini VEERAVALLI on Apr 12, 2013 8:10 AM

  • Are PL/SQL Package Body Constants in Shared Area or Private Area

    Based on this it not clear to me if PL/SQL Package Body Constants are stored in shared area or private area.
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/memory.htm
    "PL/SQL Program Units and the Shared Pool
    Oracle Database processes PL/SQL program units (procedures, functions, packages, anonymous blocks, and database triggers) much the same way it processes individual SQL statements. Oracle Database allocates a shared area to hold the parsed, compiled form of a program unit. Oracle Database allocates a private area to hold values specific to the session that runs the program unit, including local, global, and package variables (also known as package instantiation) and buffers for executing SQL. If more than one user runs the same program unit, then a single, shared area is used by all users, while each user maintains a separate copy of his or her private SQL area, holding values specific to his or her session.
    Individual SQL statements contained within a PL/SQL program unit are processed as described in the previous sections. Despite their origins within a PL/SQL program unit, these SQL statements use a shared area to hold their parsed representations and a private area for each session that runs the statement."
    I am also curious what are the fine grained differences from a memory and performance perspective (multi-session) for the two examples below. Is one more efficient?
    Example 1.
    create or replace
    package body
    application_util
    as
    c_create_metadata constant varchar2(6000) := ...
    procedure process_xxx
    as
    begin
    end process_xxx;
    end application_util;
    vs.
    Example 2.
    create or replace
    package body
    application_util
    as
    procedure process_xxx
    as
    c_create_metadata constant varchar2(6000) := ...
    begin
    end process_xxx;
    end application_util;

    >
    What i am asking is fairly granular, so here it is again, let's assume latest version of oracle..
    In a general sense, is the runtime process able to manage memory more effectively in either case, one even slightly more performant, etc
    ie does example 1 have different memory management characteristics than example 2.
    Specifically i am talking about the memory allocation and unallocation for the constant varchar2(6000)
    Ok, a compiler's purpose is basically to create an optimized execution path from source code.
    The constant varchar2(6000) := would exist somewhere in the parse tree/execution path (this is stored in the shared area?).
    I guess among the things i'm after is
    1) does each session use space needed for an additional varchar2(6000) or does runtime processor simply point to the constant string in the parse tree (compiled form which is shared).
    2) if each session requires allocation of space needed for an additional varchar2(6000), then for example 1 and example 2
    at what point does the constant varchar allocation take place and when is the memory unallocated.
    Basically does defining the constant within the procedure have different memory characteristics than defining the constant at the package body level?
    >
    Each 'block' or 'subprogram' has a different scope. So the 'constant' defined in your example1 is 'different' (and has a different scope) than the 'constant' defined in example2.
    Those are two DIFFERENT objects. The value of the 'constant' is NOT assigned until control passes to that block.
    See the PL/SQL Language doc
    http://docs.oracle.com/cd/E14072_01/appdev.112/e10472/fundamentals.htm#BEIJHGDF
    >
    Initial Values of Variables and Constants
    In a variable declaration, the initial value is optional (the default is NULL). In a constant declaration, the initial value is required (and the constant can never have a different value).
    The initial value is assigned to the variable or constant every time control passes to the block or subprogram that contains the declaration. If the declaration is in a package specification, the initial value is assigned to the variable or constant once for each session (whether the variable or constant is public or private).
    >
    Perhaps this example code will show you why, especially for the second example, a 'constant' is not necessarily CONSTANT. ;)
    Here is the package spec and body
    create or replace package pk_test as
      spec_user varchar2(6000);
      spec_constant varchar2(6000) := 'dummy constant';
      spec_constant1 constant varchar2(6000) := 'first constant';
      spec_constant2 constant varchar2(6000) := 'this is the second constant';
      spec_constant3 constant varchar2(6000) := spec_constant;
      procedure process_xxx;
      procedure change_constant;
    end pk_test;
    create or replace package body pk_test as
    procedure process_xxx
    as
      c_create_metadata constant varchar2(6000) := spec_constant;
    begin
      dbms_output.put_line('constant value is [' || c_create_metadata || '].');
    end process_xxx;
    procedure change_constant
    as
    begin
      spec_constant := spec_constant2;
    end change_constant;
    begin
      dbms_output.enable;
      select user into spec_user from dual;
      spec_constant := 'User is ' || spec_user || '.';
    end pk_test;The package init code sets the value of a packge variable (that is NOT a constant) based on the session USER (last code line in package body).
    The 'process_xxx' procedure gets the value of it's 'constant from that 'non constant' package variable.
      c_create_metadata constant varchar2(6000) := spec_constant;The 'change_constant' procedure changes the value of the package variable used as the source of the 'process_xxx' constant.
    Now the fun part.
    execute the 'process_xxx' procedure as user SCOTT.
    SQL> exec pk_test.process_xxx;
    constant value is [User is SCOTT.].Now execute 'process_xxx' as another user
    SQL> exec pk_test.process_xxx;
    constant value is [User is HR.].Now exec the 'change_constant' procedure.
    Now exec the 'process_xxx' procedure as user SCOTT again.
    SQL> exec pk_test.process_xxx;
    constant value is [this is the second constant].That 'constant' defined in the 'process_xxx' procedure IS NOT CONSTANT; it now has a DIFFERENT VALUE.
    If you exec the procedure as user HR it will still show the HR constant value.
    That should convince you that each session has its own set of 'constant' values and so does each block.
    Actually the bigger memory issue is the one you didn't ask about: varchar2(6000)
    Because you declared that using a value of 6,000 (which is 2 ,000 or more) the actual memory allocation not done until RUN TIME and will only use the actual amount of memory needed.
    That is, it WILL NOT pre-allocate 6000 bytes. See the same doc
    http://docs.oracle.com/cd/E14072_01/appdev.112/e10472/datatypes.htm#CJAEDAEA
    >
    Memory Allocation for Character Variables
    For a CHAR variable, or for a VARCHAR2 variable whose maximum size is less than 2,000 bytes, PL/SQL allocates enough memory for the maximum size at compile time. For a VARCHAR2 whose maximum size is 2,000 bytes or more, PL/SQL allocates enough memory to store the actual value at run time. In this way, PL/SQL optimizes smaller VARCHAR2 variables for performance and larger ones for efficient memory use.
    For example, if you assign the same 500-byte value to VARCHAR2(1999 BYTE) and VARCHAR2(2000 BYTE) variables, PL/SQL allocates 1999 bytes for the former variable at compile time and 500 bytes for the latter variable at run time.
    >
    So when you have variables and don't know how much space is really needed do NOT do this:
    myVar1 VARCHAR2(1000);
    myVar2 VARCHAR2(1000);
    myVar3 VARCHAR2(1000);The above WILL allocate 3000 bytes of expensive memory even if it those variables are NEVER used.
    This may look worse but, as the doc states, it won't really allocate anything if those variables are not used. And when they are used it will only use what is needed.
    myVar1 VARCHAR2(2000);
    myVar2 VARCHAR2(2000);
    myVar3 VARCHAR2(2000);

  • Can you define constants in Report Painter?

    Hi, I'm new to Report Painter and SAP in general. I was just wondering if it's possible to define constants that are visible across reports. e.g. In the header text for all our reports, we want our company name to be displayed. But instead of hardcoding it, we want to retrieve it from a constant or variable.
    Does anyone know if this is possible?

    Hi Andrew,
    Thanks for the response but this isn't exactly what I was looking for. From my understanding, the "Sel. Parameters" button allows you to access and display values that were entered by the user in the selection screen of the report (correct me if I'm wrong). What I'm aiming for is something like a global variable defined on the backend that all reports can access.
    I've looked at the other buttons that you pointed out, but it seems like I'm only able to use some pre-defined tables and fields. Does this mean that there isn't any way for me to define and use my own customized variables for reports?
    Thanks,
    Carlo
    Edited by: CarloInting on Jul 21, 2009 5:45 AM

  • What exactly is the diff between main window and variable window

    what exactly is the diff between main window and variable window in SAP script?

    hi,
    MAIN WINDOW :- In a main window you display text and data, which can cover several pages (flow text). As soon as a main window is completely filled with text and data, the system continues displaying the text in the main window of the next page. It automatically triggers the page break.
    You can define only have one window in a form as main window.
    The main window must have the same width on each page, but can differ in height.
    A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.
    VARIABLE WINDOW :- The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike. The only difference is that constant windows have the same size throughout the form.
    hope this will be useful.
    If useful then reward points.
    with regards,
    Syed

  • Doubt in any file to any file

    Hi guys,
    I'm trying to do a scenario where my source file does not have any extension and i want to generate an output file with the file name = source filename  and with an extention .idoc.
    Since this is an any file type scenario, I haven't used IR at all and I'm using ID only.
    Can anyone help me in solving my doubt please
    Thanks
    Varun

    >>Variable substitution might not work if the source file is not XML.
    Did not think of that at all.
    >>Instead wrtie a Module ( either in sender or receievr file adapter), that read the source file name from the Dynamic Confiugration and then add's the .bin to the file name in the module itself .
    Clean way of solving this scenario.
    Regards,
    Jai Shankar

Maybe you are looking for

  • How to use viewslifetime managed property to get the list of sites which are least accessed?

    Hi,<o:p></o:p> I am trying to get the subsites of a site collection which are least accessed. I am using ViewsLifeTime managed property in a content search web part with a condition like this: ViewsLifeTime < 0 OR ViewsLifeTime = 0. However, It is no

  • Clicking an element in a list doesn't work

    Sorry about my rather vague subject - my problem is not so easy to sum up in a few words. I am working on an application that - Displays a list of items from a MySQL table - Each item should be clickable, and on clicking should open an edit page with

  • Downloading Windows 7 to a disk

    I'm trying to use Boot Camp 5 in order to run Windows 7 but it needs a disk to install from. I'm an engineering student so I've got access to free Windows 7 downloads (downloads are free, disk copies are not) but I'm having trouble putting the downlo

  • Using the JCanvas

    I am looking to draw objects on a java canvas. I am using the Swing application and have created a canvas (canvas1) within a java frame that also has other objects on it. How do I get graphics to print out on this java canvas?

  • Best Poly Fit Coefficients do not agree with Best Poly Fit 2

    HEllo, I have dataset with 9 points and would like to fit or solve linear equation with 9 coeffcient. The model -equation is following Z= a0+a1*x+a2*y+a3*x^2+a4*x*y*+a5*y^2+a6*x^2*y+a7*x*y^2+a8*x^2*y^2; eq total 9 coefficient. When I build matrix H a