Global Declaration

Good day everyone!
Is it possible to declare a variable Globally in Oracle 8?
What will be the syntax? I am really new at this stuff so please bear with me.
Thanks!
Regards

hi,
It's the Same
ex: varibalename type;
unlike local variables Global variables are declared in the header Part of the Package.
Which makes it public and accessible from other packages.

Similar Messages

  • What for? (2nd part global declaration in transformation)

    Hi Experts,
    does anybody know, what for is the 2nd part global declaration in a routine of a transformation?
    Myself I'm a developer, so I can differ between global and local declaration in a class-definition. But the second possibility to declare variables is outside of class-definition and class-implementation.
    I checked start routine, end routine and character/ keyfigure routine. I can see both of the declaration. Does it makes any sence to use this declaration?
    $$ begin of global - insert your declaration only below this line  -
        ... "insert your code here
    $$ end of global - insert your declaration only before this line   -
    $$ begin of 2nd part global - insert your code only below this line  *
    ... "insert your code here
    $$ end of 2nd part global - insert your code only before this line   *
    Thanks in advance.
    Greets Nico

    Hi Lijo,
    first, thank you for you answer.
    I'm not sure if I got it.
    If you want to use a global variable for all packages that will be processed, I have to declare a CLASS-DATA. That means the instance of the class won't be deleted the whole data package.
    If I want to use a global variable that will be used in character/ keyfigure routine it's sufficient to declare DATA in 1st or 2nd part of declaration.
    I understand it in a way, that the second declaration part is redundant. Is it right?
    Thanks in advance.
    Greets Nico

  • 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

  • Global declarations

    Hi all.
    I am coding for an application where i need some global declarations.
    As per my knowledge we can do it via attributes tab in either view or component controller, as per the need.
    In my requirement i need a global structure and an internal table.
    Here, have i always to prepare an associated type in SE11 first?
    Is there any other solution because creating a type always is not feasible for me..Please suggest.
    Thanks and regards,
    Prati.

    Hi Prati,
    Just a small correction to what Radhika has pointed out. I used to follow the same approach as her & its also whats written in the standard training material NET310. I had earlier tried advising someone in the forums with a similar approach & Mr. Thomas Jung had pointed out a [pitfall|Structure from a context node; of this. Am pasting his comments from that particular thread:
    "It is suggested that you avoid the usage of the IF_<name> interface declarations directly. If you were to rename your object, the interface name would change as well. It is better to reference the types via WD_THIS object (which will inherit from your IF_<NAME> interface) to avoid any code problems after renaming."
    To explain better. If you say as shown below then this statement would only work within your view MAIN. If you happen to rename your view or try copy & paste the same code into another view it would show an syntax error.
    data : wa_node1 type if_main=>elements_node1.
    So the suggested approach is as shown below:
    " Declaring an internal table
    data lt_price type wd_this->elements_d.
    " Declaring an structure
    data lt_price type wd_this->element_d.
    Using this notation you have the advantage that you can copy & paste the same code from any view & use it in another. Or else you would have to keep changing the names accordingly.Hope you got the advantage of this.
    Regards,
    Uday

  • Global declaration in function group.

    I have a function group within which i have 6 function modules. I want to declare global data in the function group which can be used in all the function modules. Is it possible? If yes then please give me the details..
    Thanks,
    Abhishek

    Each function module is nothing but INCLUDE program. So, if you see the list of includes, there will be a TOP include which is common and will be accessible to all other function modules.
    You can declare variables there.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Smartforms global ,intilization declarations ?

    hi folks,
    below is layout of the form i have to print in smartform ,this additional that is supplement from i have to add in existing form,so these are the fields i have to priint ,now what exactly i have to do in smartfrom ,do i need to change driver program also ,what exactly i have to do right from global defintions to page creation ,do i need to create another window and where i have to write logic that is select queries ?
    fields for the layout is below ,layout is also given plz take a look ,points will be awarded for the answers .
    order number (VBAK-VBELN), Whs BoL (VBAK-VBELN), customer PO number (VBKD-BSTKD), material number (LIPS-MATNR), legacy item number (MARA-ZZQNUM), description (LIPS-ARKTX) ship quantity (LIPSD-PIKMG), UOM (LIPSD-VRKMP) and pallets (VEKP-EXIDV) information. There is only one order to one delivery to one shipment. (1 to 1 relationship)
    Whs. BOL: Customer PO:
    Order No:
    Ship to:
    Material No Description Ship Qty UoM Pallets
    010018500013850003 16OZ 1/12 LPT ICED TEA PEACH 216 CS 2.00
    904560
    010018500013850005 16OZ 6/2 LPT ICED TEA RASP 108 CS 1.00
    904561
    010018500013850006 16OZ 6/2 LPT ICED TEA SNL 324 CS 3.00
    904562
    0100185000138
    hey all plz tell what should i delcare in global paramerets in global defintions ,imoport ,export paramaetrs ,what shoul;d i write ?in intilization what should i write ?in global defintion s what sghould i write in types tab plz VERY VERY VERY VERY Urgent points will awarded repl;y urgently very urgentily.

    Hi,
         Global Declaration is nothing bur the Internal Table Declaration in smartform. If u Declare the Tables in Global Declaration U can access that Internal Table for all the Windows within that Smartform.
    Import : It will Pass the Value to write the coding inside the window, It Mean Ur getting the Value from Global. Already i told the Global will help for all the Windows.
    Export : In the Import we r getting the value from global and doing some coding or calculation inside the Window. Now we need to take that Value to Print in within that Window.
    Example :
    Importing : t_ekko ( Here getting the Value from outside)
      Loop at t_ekko into wa_ekko.
      Append lt_ekko from wa_ekko.
    endloop.
    Exporting : lt_ekko ( Taking the final Value to Display)
    Go through this link also,
    form interface & global definition
    Re: Urgent ! SmartForms internal table declaration
    what is the use of types tab in global settings in smartforms?
    Regards,
    Saran,

  • Declaration in start routine in transformations

    Hi guru's
    What is the difference between first and second global declaration in the start routine of a transformation?
    First: $$ begin of global - insert your declaration only below this line  -
    Second: $$ begin of 2nd part global - insert your code only below this line  *
    Kind regards
    Erik

    Hi Shambhu
    We usually write out code in the section:
    $$ begin of routine - insert your code only below this line        -
    What is the difference between writing the code in
    $$ begin of 2nd part global - insert your code only below this line  *
    and
    $$ begin of routine - insert your code only below this line        - ?
    Kind regards
    Erik

  • Data declaration error in adobe form

    hi,
    i m just remake a smartform into adobeform.but while doing so it's giving me error regarding data declaration.
    I had declare some of internal table as type of defiened type but at code initialzation it giving it's not a internal table.
    global data
    it_abc type ty_abc,
    types :
    types: begin of ty_abc,
               ab(8) type c,
               bc(4) type c,
              end of abc.
    when i m creating a internal table in code initialization it's giving me that already declared.
    code initialization.
    data : it_abc type table of ty_abc.
    Plz help me out.
    Regards
    Ricky

    Hi Maheshwari,
    After the declaration of the TYPES Structure, you need to declare the Internal Table. As follows
    TYPES
    types: begin of ty_abc,
              ab(8) type c,
              bc(4) type c,
              end of abc,
              tt_abc type standard table of ty_abc initial size 0.
    And in Global Declaration you use the newly created Internal Table (which is created using the Types Statement). And in Code Initialization you can use the Global Declaration internal table.
    Regards
    Pradeep Goli

  • How to declare a variable in form

    how to declare a variable in form?

    Hi,
       do you want to create variable in script or smartform?
    In scripts to define a variable use the following declaration statement.
    DEFINE &<VARIABLE_NAME>&
    place this statement as command. we can assign initial value for this by adding VALUE ' ' to above statement.
    If your requirement is for smartforms go to global declaration, create a variable there that will be applicable only for smartform.
    Hope this will help you,
    Regards,
    Aswini.

  • Declaration in include

    <b>Is it good program practice</b> to keep all declaration in an INCLUDE?
    If yes <b>what we can we keep in an INCLUDE</b>?
    Global declarations??
    only global itabs or global variables also.
    Thanks,
    RAJA

    it is a gud practice to segregate data declarations, module definitions, subroutine definitions and the program logic itself....
    one advantage you get out of this is that when u r required to make modifications to one of these parts,
    you can easily change at one location and do not have to worry about the whole program being affected.
    for example, if for some reason the data type of a variable is changed....u need to change only in the data declarations....
    ...plus the fact that if u club everything together...it gets messy after some time and it will not be very easy for you to locate (say) a particular subroutine or a data variable...
    apart from variables and itabs, u can have includes for modules, subroutines, and even you can have whole programs being included in other programs
    rgds,
    PJ

  • Import local class to global

    Hi,
    i try to import local classes to global classes and i have error ,
    in the program in se 80 (lcocal) i declare global declaration
    like:
    TYPE-POOLS icon.
    TYPES: ty_fuel TYPE p DECIMALS 2,ty_cargo TYPE p DECIMALS 2.
    and after that i declare the local class in includes .. and/// start of selection
    where i put it ?
    Regards

    Hi,
    i don't build another program the declaration is in the local progarm,
    and i have method that have to use icon ,
    where i put this declaration  i try in local types but i have error .
    Explicit length specifications are necessary with types C, P, X, N, and
    W in the OO context.
    Regards

  • Avoiding Z-table and having a global internal table during Sales Order

    Hi All,
    I have a requirement like this.
    1. In the R/3 system I am creating Sales order.
    2. For each line item, it will call APO system to check the availability of the materials and the informaiton is returned back to
    R/3 system.
    3. As the soon as the informaiton is recieved in R/3 system, we found one enhancement point and this informaiton is being captured now in a Z-table to do some processing while saving the order after processing all the line items
    4. I wanted to avoid the Z-table and want to have some global internal table which will be available till the end of the processing of the sales order.
    Solution I am thinking of:
    1. One option could be creating a global internal table in SAPMV45A program in one of the enhancement points in the TOP declaration. But, that global internal table is not accessible in the enhancement point where I wanted to store the information. Because, I am actually updating the table in a FM.
    2. Export it to memory and import it when needed. But, how to update the informaiton in this intenal table(which is in memory) for every line item
    Please guide me. Any help on this would be highly appreciated.
    Thanks,
    Babu Kilari

    >
    Babu Kilari wrote:
    >  Solution I am thinking of:
    >
    > 1. One option could be creating a global internal table in SAPMV45A program in one of the enhancement points in the TOP declaration. But, that global internal table is not accessible in the enhancement point where I wanted to store the information. Because, I am actually updating the table in a FM.
    >  Babu Kilari
    If you are updating this table in a FM, you can always add one tables parameter to the function ( if it is a custom function) and pass the globally declared internal table to the function call in the user exit update the table in the FM and when the end function is reached, you will have the updated internal table again at the user exit after the function call.
    Imp- Declare your internal table in MV45ATZZ.
    KR,
    Advait
    Edited by: Advait Gode on Aug 6, 2009 8:16 AM

  • Global object in transformation

    Hi all,
    I'm plannin to declare an object of an ABAP class not in the start routine but in the global section of the transformation in order to generate the object only once (the constructor shall be only called once in order to save time). Within the start routine every single data record shall trigger a method for that object.
    My question is: Do you see any problems when different packages are running in parallel, i.e. we have one single object of a class for which a method is called serval times at the same time because of parallel processing of packages.
    Best regards
    Markus

    Hi Markus,
    It is not necessary that you need to create the object in the Global declaration.
    make the declaration for that object in the start routine itself.
    While creating the object just make a check as the following code.
    If <object name> IS INTIAl.
      CREATE Object <object name>.
    Endif.
    This will create teh object only once during the entire run for the different data packages as well and your contructor will be called only once during the entire loading process.
    Prathish

  • Global variables in transformation routines

    Hi
    Where would I declare a global variable in my characteristic transformation routines?
    There's a spot that says:
    $$ begin of global - insert your declaration only below this line  -
    ... "insert your code here
    $$ end of global - insert your declaration only before this line   -
    Is that it?
    Then what's the difference with:
    $$ begin of 2nd part global - insert your code only below this line  *
    ... "insert your code here
    $$ end of 2nd part global - insert your code only before this line   *
    Corne

    What for? (2nd part global declaration in transformation)

  • Declaring varaiable

    HI,
    Which one is the best practice of declaring variable and why?
    vbeln like vbak-vbeln
    or
    vbeln type vbeln.
    does declaring LIKE will effect the performance of the program?

    Hi,
    you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context. The object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    <b>TYPE:</b>
    Example: TYPE <type>
    to refer to any data type <type> that is already known at this point in the program
    When you refer to known data types using the TYPE addition, the visibility of the data types is important.
    The predefined ABAP types (C, D, F, I, N, P, T, and X) are always visible. You cannot declare types with the same names as these data types, either in the program or in the ABAP Dictionary.
    When we talk about the visibility of local data types in the program, we must differentiate between local data types in procedures and global data types. Data types defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program. All local data types in a program obscure data types with the same names in the ABAP Dictionary. This also applies to data types from type groups.
    In the ABAP Dictionary, different visibility rules apply to standalone data types and the data types stored in type groups. Data types in type groups obscure standalone data types with the same names. However, this should be an exceptional situation. All data types in the ABAP Dictionary should be in the same namespace. When you create a standalone data type, the system displays a warning if the name begins with the name of a type group followed by an underscore. Equally, you cannot create a type group if there is already a standalone data type with the same name followed by an underscore.
    Regards
    Sudheer

Maybe you are looking for

  • ? error messages and unable to install or remove Reader 9.3

    i have been trying for the last 3 days to sort out a problem that has developed installing Adobe Reader 9 on my Windows XP3 driven system. to date Adobe in the various Reader programs has worked wonderfully. in the last week i discovered unexpectely

  • FBL1N - Cheque information display required

    Hi Gurus, While displaying Vendor Line item display, i need to know the cheque information for payment made against an invoice. I currently do it by selecting the line item and clicking the icon for displaying chq info (cntrlshiftF7), and get the chq

  • Performance issue in SQ01

    hi Am supposed to solve performance issue for the query in SQ01. I have no clue about how to start. am not able to view anything in Infoset Query. Where exactly the queries will be wriiten. because in my technical design i saw a piece of code. Please

  • Crackeling in published captivate 6 project

    I have just converted my Captivate 5.5 project to the Captivate 6 version. I editing the project using the Edit audio functionality in the new version. When I go to publish the training, the audio is crackeling throughout most of the training. When v

  • Coding HTML in Dreamweaver vs  Text Editor

    When coding HTML in dreamweaver, does the code look different to if you were just writing the code in a text document such as text editor