Global variable in a Table

Hi!
Can i use any column in a table as a global variable? Is it at all possible in Any version of Oracle? I know that if we use package - we can create a global a variable there. If u had any knowledge pls reply.
Satyaki.

Hi Satyaki,
Try to understand the difference between a variable and coumn of the table.
What exactly you need a global variable for the application or own Datatype for a table?
If you requirement is variable then use Package without body or type object. But if your requirement is your own datatype use TYPE in the table.
Thanx.. Ratan

Similar Messages

  • How to print global variable in smart form table cell

    hi,
    i have smartform and i insert table in it, i also have set global variable, i want to show variable in table cell.
    regards
    shahid rais

    Hi Shahid Rais 
    You can use this global variable that has been declared in anywhere as you like.
    For displaying global variable in table lines, You can first set the column and row of the table by using the table tab in table node . Then, u can decide either the variable u want to used will be placed on header, main, or footer. After that, right click on one of the table part, and choose create table line. After choosing the correct line type as already been declared in the table painter, just simply right click on the table cell, and then create text node.
    You can now enter your variable by using "insert field".
    And don't forget the & & signs before and after your variable name.
    Regards,
    William Prawira

  • Global variable (internal table)

    Hello Experts,
    how can I create a global variable (internal table) so that I can fill in inside WDDOINIT and later within another
    method inside the view.
    Thx in advance
    Best Reagards
    ertas ilhan

    Hi,
    Go to attribute tab and declare Your variable there.
    You can access that variable in the following way in another method as well.
    to use that variable use following syntax.
    wd_this->variable_name
    If you will declare the variable in component controller and define  as public.
    then you can access this in all the views of component.
    to access that use following syntax.
    wd_comp_controller->variable name.
    I hope it helps.
    Regards,
    Rohit
    Edited by: Rohit Makkar on Apr 28, 2009 7:53 PM

  • Table Reference Global Variable

    Hi,
    Inorder to update a table in One VI from another VI, i need a Global Variable Reference of that Particular Table. How  shall i create it.
    Anybody please comment on this.
    regards,
    mfp.

    You can use LV2G,
    an example is attached, you may work on same lines.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Another VI.vi ‏16 KB
    LV2G.vi ‏11 KB
    Table owning VI.vi ‏13 KB

  • Tables to get the hierarchy used for the global Variable

    Hello,
    we are using a characteristic Reporting Unit "ZCS_RDRUN" with a input ready variable "ZCS_RV_MM_REPUNITHIER_RDM".
    The reporting unit is a hierarchy characteristic and the variable is a hierarchical variable of type Hierarchy node variables fixed to a hierarchy we are using for this query. We do have selected a hierarchy for the input ready variable e.g. Total Group. My question would be is it possible to read out the selected hierarchy of the input ready variable from a table? If YES, from which table? I know that we could read out all input ready variables but i dont know how to read out the hierarchy selected for the input ready variable of type "Hierarchy node variable".
    I would be very thankful for all your help
    Thanks and kind regards,
    Muri

    You check the query run times and other details in the work load analysis (ST03) or using the table RSDDSTAT .
    inorder to check the information using the above two methods -make sure the Bi stats are maintained in your system
    http://wiki.sdn.sap.com/wiki/display/MaxDB/WorkloadMonitor%28ST03orST03N%29

  • Can F4IF_INT_TABLE_VALUE_REQUEST FM return a value in a global variable?

    Hi everybody,
    I need to use F4IF_INT_TABLE_VALUE_REQUEST FM because I have to let users select an specific option before choosing another value. The point is that I need to save in a program global variable what the user selects, and decide something with it in the program.
    Is it possible that F4IF_INT_TABLE_VALUE_REQUEST FM returns the value in a sinple variable or it has to be paramter?
    I look in a lot of previous threads but I didn't find anything, and I don't know if it's possible.
    Thanks and kind regards,
    MMP.

    Hi,
    Sure you can. All you need to do is to store what the function returns in your global variable. It don't need to be returned back to screen field.
    DATA: BEGIN OF VALUES OCCURS 0,
             CARRID TYPE SPFLI-CARRID,
             CONNID TYPE SPFLI-CONNID,
           END OF VALUES.
    DATA: VALUES_TAB TYPE TABLE OF VALUES,
              G_VALUE TYPE SPFLI-CONNID.  "global variable to store what is returned
    "in PAI first populate your table
      SELECT  CARRID CONNID
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB
        UP TO 10 ROWS.
    "then call the function but don't return the value to screen field
    "If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the useru2019s selection is
    "returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the
    "selection is returned into the table instead.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD         = 'CONNID'
                VALUE_ORG        = 'S'
           TABLES
                VALUE_TAB        = VALUES_TAB
                RETURN_TAB      = RETURN_TAB.
    "now simply read first row of return tab and store the value returned there in some global var
    READ RETURN_TAB INDEX 1.
    MOVE RETURN_TAB-FIELDVAL TO G_VALUE.
    Regards
    Marcin

  • Function module Global variables not cleared from memory?

    Hi,
    This is may be simple & stupid question ( after posting  4242 posts ):)
    " Declaration in TOP
    data : begin of i_y1yatt occurs 0.
            include structure y1yatt.
    data : end of i_y1yatt.
    types: begin of t_yatt71.
           include structure yatt71.
    types: tcode like sy-tcode.
    types: dflag type c.
    types: end of t_yatt71.
    data : i_yatt71 type standard table of t_yatt71
                   with default key  with header line  initial size 0.
    This is code in the function module.
      loop at i_y1yatt.
        move-corresponding o_y1yatt to i_yatt71.
        if i_y1yatt-werks eq 'N501'.
           move space to i_yatt71-werks.
        endif.
        append i_yatt71. 
        " Here this internal contains the previous entry
        clear i_yatt71.
      endloop.
    This function module is called 25 times in a minute.
    My problem is this
    For example : 1st tranmission is called this fm with 50 records,
    and 2nd tranmission is called fm with 10 records.
    My results are showing
    last record in the 1st transmission is still on the memory while calling 2nd transmission.  ( Here in int table I_YATT71 still contains the 1st transmission's last records during the 2nd tranmission call)
    As per my knowledge if each time calls comes in to fm all gloabl variables get cleared. but some how this not happening.
    Anybody come across this scenario.
    PS. I know i need to use clear statement within the loop as first statement.

    You must understand that when calling a FM, you load the entire function group into memory. IF there are global variables, then they are "alive" for the entire duration of the program execution. Meaning if you call the function numerious times, or even if you call another function within the same function group, the functions still have access to that same global variable space, so it must always be cleared manually by the developer at the required points.  You can not rely on the runtime to clear the global variables at the end of the function call.  So you should clear all you globals as the first operation in your function module call, if that is what is required.
    Is this clear?
    Regards,
    Rich Heilman

  • Can I Access the Value of a Global Variable in a Trigger

    I'm using a Global variable in a Package which i use in the BIU Trigger to populate a column. After assigning the value for that global variable, I run an INSERT in the same package. But I find only the default value of the Global variable populated in the column. Can I use a Global Variable in a Trigger? Is there any way to put in a common value across all the tables in an application for all DMLs of a particular session?

    Helios,
    I'm already having the same setup mentioned in the thread. And I'm doing exactly whats given there. But the issue seems to be something different. I'm assigning the value to the Global Variable in the Package through Apex. Here's the Package Code:
    CREATE OR REPLACE PACKAGE Schema1.SPMS_SECURITY_PKG
    AS
    X_app_user_id NUMBER DEFAULT -1;
    FUNCTION USER_ID RETURN NUMBER;
    END SPMS_SECURITY_PKG;
    CREATE OR REPLACE PACKAGE BODY Schema1.spms_security_pkg
    AS
    FUNCTION user_id
    RETURN NUMBER
    IS
    BEGIN
    -- RAISE_APPLICATION_ERROR(-20001,'USER ID'||'*'||X_app_user_id);
    RETURN NVL (x_app_user_id, -1);
    -- RETURN NVL (sys_context('USERENV', 'CURRENT_USER'), -1);
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN -1;
    END;
    And Here is the Trigger Code:
    CREATE OR REPLACE TRIGGER Schema1."USER_DETAILS_TRIGGER"
    BEFORE INSERT OR UPDATE
    ON PMS_SICAL.SPMS_USER_DETAILS REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    IF INSERTING
    THEN
    :NEW.created_by := spms_security_pkg.user_id;
    :NEW.created_date := SYSDATE;
    :NEW.START_DATE := SYSDATE;
    ELSIF UPDATING
    THEN
    :NEW.updated_by := SPMS_SECURITY_PKG.X_app_user_id;--spms_security_pkg.user_id;
    :NEW.updated_date := SYSDATE;
    END IF;
    END;
    But I always get -1 in the both in the table after the DMLs.

  • How to use a global variable for reading a query resultset in JDBC lookup?

    Hi Friends,
    Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.
    Thanks,
    Amit.

    Hi Amit,
    Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.
    Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]
    Rgds
    joel

  • Using Global variable in Record Group

    Hi,
    I have a requirement where in I need to pull a column name from a table and then use that value in the select statement of a record group. I have tried using global variables but it is not working. Here is the record group I would like to use.
    RG_DOMAIN is based on LOV_DOMAIN
    SELECT :GLOBAL.DOMAIN_COLUMN_NAME, DESCRIPTION FROM
    DM_T_DOMAIN_VALUES
    WHERE DOMAIN_NAME := BLOCK.ATTRIBUTE;
    In the Key-Listval I have a select statement in which does this :
    SELECT DOMAIN_COLUMN
    INTO :GLOBAL.DOMAIN_COLUMN_NAME
    FROM DM_T_DOMAIN_RULES WHERE DOMAIN_NAME = :BLOCK.ATTRIBUTE;
    SHOW_LOV('LOV_DOMAIN');
    The problem is I am not getting the value I am just getting the Domain_column name. For example for Domain_name 'CALC_TYP' the Domain_column is COLUMN_10 and I just see COLUMN_10 my LOV when I want to see the value of COLUMN_10 from the DM_T_DOMAIN_VALUES table.
    I tried using Name_in and Copy but not working. Can anyone suggest a solution?
    Thanks

    Francois ,
    I tried this but I am getting error saying record group does not exist. Can you tell me what should I go in Populate_group... and show_lov..maybe I am doing something wrong?
    Declare
    LC$Req Varchar2(512) ;
    Begin
    LC$Req := 'SELECT ' || :GLOBAL.DOMAIN_COLUMN_NAME || ' FROM ....' ;
    Create_Group_From_Query( rg_group, LC$Req ) ;
    Populate_group(RG_DOMAIN); ?? --- is this correct?
    Show_Lov(LOV_DOMAIN) ; -- and is this correct?
    End;

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

  • Global variable in a package

    Hi,
    Can anyone tell me if this is possible?
    I have a table with some control values in it and want to be able to access some of these values in a package.
    In the spec of my package I want to be able to set a global variable for the value of a specific record.
    i.e. I want to be able to say something like:
    glo_value_1 := (select value_col from control_table where id_col = 1);
    I'm trying to avoid just creating a cursor that I will have to open/fetch/close for every procedure and function in my package. I'd like to be able to just set the value in the specification so that I can just refer to it as glo_value_1.
    Any ideas?
    Thanks
    Yog

    Well there is no support for scalar subquery in PL/SQL (in-line SELECT) but you could of course write a function to geth the control value based on it's id and assign the result of the function to the global, something like...
    glo_value_1 := control_value_function (1);

  • Issue with Global variable in FM

    Hi experts,
    I have created  two functional modules under same function group and declared the internal table (ITAB)as global variable ,
    i have populated the data to to  ITAB n first function module , and  These FM are used in a program , when i debug the program , the data is populated to 1st FM and but in  2nd function module the ITAB is null only internal table structure is available.
    please let me know the reason.
    Thanks NK

    thanks all, the program ( it also an FM)  ,which is calling the 2nd FM is in background mode, i think thats the reason ITAB values are not populated.
    i ts working fine with IMPORT/EXPORT but my lead says it is not advisable and they are obsolete in ECC 6.0,
    ---> declated iTAB as global variable.
    ---> call FM1 --populate itab
    call function " MAIN_FM" in update task.
       ---> fm2 cllaed in side MAIN_FM,   ( here values not populated)
    please suggest global variable not filled incase of background mode.
    thanks
    NK

  • Accessing Var from main Nib/Class - [global variables]

    I'm sure this is a simple solution and the problem is I'm just not thinking right. I just started programming in Objective C but have come a long way in the past 2 weeks. Pretty extensive knowledge in C# and some java.
    Anyways, I've been creating an app and have streams working, CFNetwork working, network services discovery working and a tab bar with a custom View controller linking to one of the tab-bar buttons.
    So when you click on one of the tab bar items it opens a new nib file. That nib loads a table view. When nib loads it hits a method which starts looking for network services and updates the table when it finds some.
    Now the idea is is to have a selector on the cell and when you choose the service it adds same variable info, ip and port, back to a global variable which can be used through the entire app and all extra loaded nib files.
    Out of all this, I don't know how to access global variables....prob should be the simplest thing to do out of all I've done. I have ideas of how it should be done but don't know how to access it.
    Idea would be:
    MainWindowNib has NSString var that is public with a getter setter. But how can I access that MainWindowNib var from a SecondView.nib file/class. There a way to get the parent of the secondView.Nib? I have no clue.
    Any help would be great!
    Thanks!

    I'm still a bit confused how you access that method.
    Main.nib class : UIApplication
    NSString *port
    SetupView.nib : NSViewController
    view
    -TableView added to view
    -Seperate NSObject for TableViewDelegates
    -When item selcted, pass NSString to [main port]
    How do I get a pointer to port. I don't really understand how to do this with objective C.
    In C# I would be something like: [Not exact syntax but u get the idea]
    public Main : Form
    public string port{get;set;}
    Main()
    sView SeconddForm = new SecondForm(this);
    public SecondForm : Form
    SecondView(Main main)
    main.Port = "8080";
    Message was edited by: Clarke76
    Message was edited by: Clarke76

  • Global variables in Oracle 8.1.6 on NT

    I am running Oracle 8.1.6 on Windows NT.
    Does anybody know how can I create and maintain global variables or even constants, so that the same variables and constants could be used by all connections to the database.
    The main feature is that I can store their values in database table or external file, but have not to read these values from table or file every time I need them.
    All readings from the source file or table must occur only one time, for example, during database server startup, after it all the values must be supplied directly from phisical memory rather than from the table or external file (to speed up this process).
    Thank you.

    Your answer lies in one of the new features introduced in the Oracle8i: New Features for Administrators course. You can create a function that executes as soon as the user logs in, loading the variables that are required.

Maybe you are looking for

  • Want to use Premiere Elements 4 or newer with Windows Vista 64 bit??

    We bought a new pc with Windows Vista 64 bit - but are now having problems using my Photoshop Elements6 and Premiere Elements 4 with our new pc.  it says on the box and on the web - that it is compatible with Vista - so why isn't it working for us? 

  • Multi level Group Above Report

    I have a multi level Group Above report like this. School name : xxxx Course1 Student1 Student2 Course2 Student1 School name : yyyy etc... No students are enrolled in some of the courses. I used the Outer Query in SQL to include those courses. Everyt

  • LSMW  MM02 -  CHANGE PURCHASE ORDER TEXT

    I need to change the purchase order text  in mm02  using the LSMW.  Can you help me?

  • Accessing SAP ECC6 from EP

    Dear All, Our Netweaver EP developer is requesting for SAP_ALL to access sap ecc6 system. Are there any standard role from sap to support RFC call from Netweaver AS to SAP ECC6. in reality the requirement is only to make web based application for edi

  • NW_getDBInfo - dbtype has to be != ind

    Hi , Am getting below error in my DEv box while doing DB export . Please help me out INFO       2009-01-25 07:51:05 [iaxxgenimp.cpp:774]            showDialog() An error occured and the user decided to retry the current step: "|NW_Export|ind|ind|ind|