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;

Similar Messages

  • Can't use function in creating record group

    Gurus,
    This question is for developers. Is this true one can't use
    function in creating record group. I am using form5.
    thanks,
    ZW

    I figured out the issue... they changed the way Group Calls are limited.
    Here's a full explaination - and a suggestion for a behavior fix: http://community.skype.com/t5/Windows-desktop-client/Please-Fix-Group-Video-Voice-Calling-Limit-Beha...
    Long story short, you can't do a video calling at all if the group has more than 10 people in it total (including you).
    Also, you can't do voice calling in groups with more than 25 people.
    Text chats are limited to 300 people (or so I've been told by Skype employees). I've been in a chat with over 100 participants though so I know it goes that high at least.

  • Using Global Variables in Data Quality Address Cleanse Transforms

    I am currently developing in Data Services 12.2.
    I am trying to dynamically populate the List Owner information in the option tabs of the USA Regulatory Address Cleanse by using global variables.  It populates the 3553 with the variable name instead of the value assigned.
    According to the Technical Manual, it is possible to use global variables in Data Quality Address Cleanse transforms:
    However, you can use substitution parameters in all places where global variables are supported, for example:
    Query transform WHERE clauses
    Mappings
    SQL transform SQL statement identifiers
    Flat-file options
    User-defined transforms
    Address cleanse transform options
    Matching thresholds
    Does anyone know if it is possible to use global variables in the option tab of the Address Cleanse; if so, can you describe how it is done?
    Thanks in advance,
    Rick

    Hi,
    U can refer to the following links in help.sap.com
    GlobalContainer Object
    http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
    Container Object
    http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
    Also some of the RUN TIME CONSTANTS are available in your BPM. So if you are trying to retrieve those variables in your Mapping(that is used in BPM), also read the following thread.
    Re: Message id in BPM
    Cheers,
    Siva Maranani.

  • Can i use global variable in web forms

    guys can any one tell me if i can use global variables when i am
    deplying the forms on the web,.....
    thank you
    vas
    null

    Global variables work in their perfection even when you deploy
    your forms on the WEB.
    null

  • VALUE USING GLOBAL VARIABLE

    Hello
    I made a Global Variable XX_DATE in Transaction Form Personalization with a value =:TACC_ACC_ASSGN.GL_POSTED_DATE.
    I'm planning to get the value from XX_DATE to one of the fields in Receipts thru Receipt Personalization.
    But a got the following error when I validate the value in Actions
    FRM-40815: Variable GLOBAL.XX_DATE does not exist.
    The String =:GLOBAL.XX_DATE could not be evaluated because of an errorAny help on this please?
    I just wanted to transfer data (GL_POSTED_DATE) from Transactions to Receipts using Global Variable.
    Any other ideas?
    Thanks a lot
    emgeee

    In WHEN_NEW_FORM_INSTANCE set the property INITIAL_VALUE for the global variable.

  • Using JDAPI to manipulate record group

    Hi.
    I am doing a migration from oracle forms 4.5 to 10g. For now I was able to manage/fix everyting using JDAPI interface. Now I am stuck with the following problem. In forms 4.5 it was perfectly legal to use a value of record group column larger than data length of that column. From forms 6+ there is a runtime error generated when this situation is met. What I wanted to do is to change/truncate record group value to the length of that column using JDAPI. No matter how I search I cant find proper metod to do the job. That is to change the value of record group column. Did anybody had a similar situation and was able to solve it.
    Best regards.

    Hi.
    I am doing a migration from oracle forms 4.5 to 10g. For now I was able to manage/fix everyting using JDAPI interface. Now I am stuck with the following problem. In forms 4.5 it was perfectly legal to use a value of record group column larger than data length of that column. From forms 6+ there is a runtime error generated when this situation is met. What I wanted to do is to change/truncate record group value to the length of that column using JDAPI. No matter how I search I cant find proper metod to do the job. That is to change the value of record group column. Did anybody had a similar situation and was able to solve it.
    Best regards.

  • ORA-00904 when use column alias in Record Group Query

    Is it possible to use column aliases in Record Group Queries?
    I have a query that runs fine in SQL*Developer, but gives me runtime errors when I use it as a Record Group Query.
    When I use it as a Record Group Query, the Form compiles, but at runtime I receive the following errors:
    FRM-40502: ORACLE error: unable to read list of values
    when I use Help - Display Error, I see:
    ORA-00904:"CHILDNAME":invalid identifier
    The query is something like this
    select decode(complex stuff here) as "childname" ....
    I've tried it with and without the double quotes surrounding the alias name, and have also tried it without using the "as" keyword.
    I would appreciate any suggestions or insights. I'm using Forms 9.0.4.
    Thanks.

    It looks like this is caused by bug 725059:
    "FILTER BEFORE DISPLAY" DOESN'T WORK IF LOV HAS COLUMN ALIASES (TRIAGE1098)
    My LOV does have the Filter Before Display turned on. Here's the text of the bug:
    IF an LOV is created with column aliases in the select statement, (eg: select ename emp_name from emp) and the LOV property "Filter Before Display" is "Yes", THEN when you attempt to filter the LOV at runtime, (eg: type '%' then press the 'Find' button) the internal WHERE clause that forms sends to the database is: WHERE column_alias LIKE '%%' This is incorrect syntax. A client-side sqlnet trace shows this. The correct syntax should be: WHERE column LIKE '%%' . The incorrect syntax results in no rows returned. However no error is displayed by forms to the user.

  • What are the best practices to use GLOBAL Variables

    Hi,
    Please guide how Global Variables can be declared and how they can be initialized.
    Further please guide what are the impacts of Global Variables(if any) on the memory of CLIENT or SERVER, if they are not initialized or freed up after usage.
    Thanks.
    Regards.

    spilgrim wrote:
    My preference is not to use them and to use parameters or package variables. There is not real control on globals so you can end up with an applicatios that has lots of them that are only used once but persist for the user session.I second that. I don't know how often I searched for bugs caused by typos in the names of global variables. Plus the fact that they are only of datatype VARCHAR2. If you are using share_library_data you could also use Package globals in a forms library to share data between called and calling forms. Or you could use a database package...
    cheers

  • XI 3.0: Using global variables in mapping

    Hi everybody
    Since it seems that during mapping you have only access to messages fields, does anybody has got idea or a workaround to use global/external variables or constants during mapping??
    Example: i would like to store the mail address where i send my error mails outside each mapping program (something like using a properties file or something like that).
    Any idea???

    Hi,
    U can refer to the following links in help.sap.com
    GlobalContainer Object
    http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
    Container Object
    http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
    Also some of the RUN TIME CONSTANTS are available in your BPM. So if you are trying to retrieve those variables in your Mapping(that is used in BPM), also read the following thread.
    Re: Message id in BPM
    Cheers,
    Siva Maranani.

  • Using global variable in package

    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package. Can someone help me in the declaration of this variable as a global variable? Also, is it necessary for me to initialize this variable whenever the package executes. If yes, how would I do this?
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    FUNCTION Retrieve_SerialNo RETURN VARCHAR2 IS
        v_serial_no VARCHAR2(20);
        CURSOR Serial_Code IS
          SELECT S.Serial_Code
            FROM Spare_Parts s, Orders r
           WHERE s.serial_code = r.serial_code;
      BEGIN
        OPEN Serial_Code;
        LOOP
          FETCH Serial_Code
            INTO v_serial_no;
          EXIT WHEN Serial_Code%NOTFOUND;
          v_serial_no := v_serial_no;
        END LOOP;
        CLOSE Serial_Code;
        RETURN v_serial_no;
      EXCEPTION
        WHEN OTHERS THEN
          RETURN NULL;
      END;

    user13415143 wrote:
    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package.All variables have scope or "visibility". A variable defined in a procedure is only visible within that procedure.
    A variable defines in a package body. is visible within that package body (i.e. procedures and functions in that package body can "see" that variable.
    A variable defined in the package definition? Well, who can see the definitions of procedures and function in a a package header/definition? Everyone else basically (other PL/SQL packages and procedures and functions). So this is also true for variables defined in the package interface. These are global variables that not only can be used by the code in that package's body, but also can be used by other packages and PL/SQL code.
    So when you create a global variable you need to decide on its scope:
    - define it in package header for global usage in all PL/SQL code
    - define it in package body for global usage within that package only
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    ..snipped..Ugly code as there is no need to use an explicit cursor if returning a value from a single row. Also buggy code. If there are multiple rows returned by the cursor, the function returns the serial of the last random row. How does this make sense?
    This is what I would expect to see from a function like this. You pass it a unique identifier and it returns the applicable attribute (column) value for it.
    E.g.
    create or replace function GetSerialNo( orderNo number ) return number is
      serialNo number;
    begin
      select
        s.serial_code into serialNo
      from spare_parts s,
           orders o  
      where s.serial_code = o.serial_code
      and o.order_no = orderNo;
      return( serialNo );
    exception when NO_DATA_FOUND then
      return( null )
    end;Also note that there is no need to write ugly uppercase code. This is not a proper coding standard. Programming standards for all languages (ranging from C# to Java to Delphi to Visual Basic to C/C++) specify that camelcase should be used for variables and pascalcase for procedures/functions/methods. Uppercase is very seldom used and then only for constant names and compiler options/flags for example.
    Coding reserved words in uppercase? That is just plain silly - and not found in today's programming languages. Do yourself a favour and forget the idiotic standards used by some for PL/SQL and look at the standards for Java and .Net/C# - as the latter are the de facto standards for programming (and have been for the last 2 decades and more).

  • 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

  • Using Global variables in business rules

    In EAS after expanding the Business Rules section there is a Global Variables section. I have created some global variables in this section and I am trying to use them in the Rule editor and not having much luck. Are they retrieved differently to local variables...Currently this is how I am calling them within a FIX....
    FIX([Global_Varaiable])
    calculation;
    EndFix
    Please correct me if I am wrong, also can any one provide some good documentation and some gd links for writing business rules. I'm just starting out to create some business rule which runs on save on some input forms I am creating and finding it rather difficult.... :-(..
    Many Thanks
    Stephen

    Hi,
    Global variables will work in the same way as local variables so you are using them correctly.
    Business rules are just really glorified calc scripts, if you want to know about calc script commands have a read of the tech ref :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?launch.htm
    It will have all the calculation commands and functions and descriptions on how they work.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Is there a way to use Global variable in HANA

    Hi Developers,
    Is there anything like a Global variable in SAP HANA which can be used to pass data from one procedure to another (Visible to all the procedures in a session)?
    Thanks
    S.Srivatsan

    Hi Sundar,
    In best of my understanding, there is no context variable or global variable available under SQL SCRIPT scope . You may need to maintain the variable as a parameter in the procedure interface and pass it to the procedures where ever you need it to be available . Or,(DB table is in memory, so its just memory unit) you can create a DB table to store the variable(s) and access it anywhere .
    Sreehari

  • Use global variable to transfer user parameter in some Vi

    Hello,
    I have troubles when I use a global variable to transfer the parameter to a first Vi (user interface) to a second vi (acquisition interface).
    In the first Vi, the user paramater is wrote to my global variable.
    In the second Vi, the acquisition parameter is read to my global variable.
    This 2 Vis are include to a master Vi who synchronized by the error bus.
    The problem :
    For the first use, the user parameter is transfer to the global variable but the acquisition vi read the old parameter. In the second use, acquisition vi read the first use parameter.
    After I use the IN/OUT parameter subvi and i have too this problem.
    Thanks for help.
    VIEW THE PROBLEM : (I use event structure
    Attachments:
    Problem.zip ‏52 KB

    Labview uses the dataflow to chain the execution. That is, as soon as one item of data is ready is is presented to the next stage.
    Global (or local) variables do not easily fit in there. A variable is always present and ready to give away it's data. It does not matter that you write to it in one vi. Another vi, that is running concurrently is not aware that the content may have changed.
    Especially if you reference variables outside of loops, the value is taken just once and never updated. Be aware! If in doubt, use the tracing facilty (the light bulb) to follow the data flow.
    Gabi
    7.1 -- 2013
    CLA

  • Using global variable read status

    Hi Experts,
    I need to change the Note based o the Service Ticket status. I declared global variable as a string in ZL_ICCMP_BT_BTSHEADER_IMPL (Component: ICCMP_BTSHEAD; View: BTSHeader)
    And I am passing the Status to this global variable using the GET and SET methods of the STRUCT.ACT_STATUS attribute in BTSTATUSH node in same component and view.
    I referred this global variable in DO_PREPARE_OUTPUT of the component ICCMP_BTTEXT/TextView to set the Note as shown below.
    if ZL_ICCMP_BT_BTSHEADER_IMPL=>GC_STATUS = 'E0001'.
    I would like to know whether this approach is the best way to read status or any other optimistic  approach is there to follow for my this scenario. Please advise me.
    Thanks
    Chand

    Hi Basha,
    If you are using static variables, i wouldn't recommend using this approach.. there are better approach to get/set values in web client session which avoids setting/clearing static variables etc..
    you can follow below approach..
    1. To Get/set the variable in ic session to avoid the static variable.. for eg global cuco is available which you can use for this purpose.
    lr_bdc type ref to if_crm_ui_data_context.
    lr_bdc = cl_crm_ui_data_context_srv=>get_instance( me ).
    check lr_bdc is bound.
    Using SET_DATA_ATTRIBUTE set the attribute value and using GET_DATA_ATTRIBUTE get the attribute valueu2026get_attribute, set_attribute
    read current BuAg if exist
    lr_buag ?= lr_bdc->GET_DATA_ATTRIBUTE( 'CURRENTBUAG' ).
    Here "CURRENTBUAG" is the attribute name, you can give any attribute name while setting and get the same attribute value via get_data_attribute.
    Cheers,
    Sumit Mittal

Maybe you are looking for

  • How do I see TIF files in Bridge?

    When I am using Bridge I can't see TIF files. It only shows TIF logo?

  • How to execute PL/SQL query based on given input parameter

    Hi all, I have a pl/sql code which is in Region source. It extracts data from database. I want to execute the code based on input I give. I have to give date as a input parameter. e.g. If I give date1 as a parameter, then following code should execut

  • CPU Usage Spikes

    My computer was not responding well when I tried to install a driver for my webcam. The error message said that I should try uninstalling some recently installed programs. So I did. There were some that were recently installed but I didn't really kno

  • Acrobat Reader 3.02 vs. Win7 x64

    Hi all, I'd like to ask for help. We have generated a lot of PDF files with automatic script. Problem is, that PDF files are openned correct only in Acrobat Reader 3.02, in newer version are not correct diplayed some slovak characters (I hope example

  • What are the exact steps to export a sequence from FCE 4 to idvd.

    New to mac/FCE, I have attempted to export sequence to quick time movie then save onto desktop. Then I just dragged the quick time movie from desktop into idvd. This worked, but is there a better way. Thanks - Chad