FRM-12001:  Cannot create the record group (check your query).

I WANT TO ADD A RECORD GROUP IN PRI BUILD FORM THE QUARY IS VERY SIMPLE LIKE
SELECT item_code
FROM items
WHERE active = 'Y'
AND item_code like 'FAJ%'
BUT THE SYSTEM SHOW THE ERROR MESSAGE
Cannot create the record group (check your query).

Make sure the user connected to the database from the forms builder has the privilege of select from the table, or there's a synonym.
Try your query from SQL*Plus connected with the same user.
Tony

Similar Messages

  • Error message:FRM-12001: Cannot Create the record group(check your query)

    Requirement: Need to get employee name and number in the LOV in search criteria.
    So I created LOV "full_name" and Record group Query under Employee Name property palette with
    select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number
    from apps.per_all_people_f papf, apps.per_person_types ppt
    where sysdate between papf.effective_start_date and papf.effective_end_date AND papf.person_type_id=ppt.person_type_id AND ppt.system_person_type IN ('EMP', 'OTHER', 'CWK','EMP_APL')
    AND PPT.default_flag='Y' and papf.BUSINESS_GROUP_ID=1
    order by papf.full_name
    I was unable to save and getting error message "FRM-12001: Cannot Create the record group(check your query)".
    I cant use PER_ALL_PEOPLE_F.FULL_NAME since full name here is last_name||title||middle_names||firstname.
    But my requiremnet is papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name .
    Can any one of you help me.

    First, Magoo wrote:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    for l_rec in ( select decode ( p_title, null, null, p_title || ' ' ) ||
    p_last_name || ', ' || p_first_name ||
    decode ( p_mid_names, null, null, ' ' || p_mid_names ) full_name
    from dual ) loop
    return ( l_rec.full_name );
    end loop;
    end;</font></pre>
    Magoo, you don't ever need to use Select from Dual. And the loop is completely unnecessary, since Dual always returns only one record. This would be much simpler:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name
    ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    Return ( Ltrim( Rtrim ( p_title
    ||' ' ||p_last_name
    ||', '||p_first_name
    ||' ' ||p_middle_names )));
    end;</font></pre>
    And second:
    user606106, you did not mention how you got your record group working. However, you DO have an issue with spaces. If you change this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number </font></pre>
    to this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select Ltrim(Rtrim(papf.title||' '||papf.last_name||', '
    ||papf.first_name||' '||papf.middle_names)) AS emp_full_name,
    papf.employee_number</font></pre>
    it should work. The Ltrim(Rtrim()) removes leading and trailing spaces from the resulting full name.

  • Dynamically creating a Record Group based on Previously entered Record Grou

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Hi,
    I know how to dynamically create a record group based on a query and putting the code in When new form instance.
    My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
    For example
    I have a record group with selects a Location,
    when the user selects the Location from a list of values
    the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
    How can I populate the 2nd record group at run-time when I do not know what site the user will select?
    If I simply populate in when new form instance as in location and just select everything, the list of values populates.
    CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
    I have put the code in the Location field in the when-list-changed trigger.
    I am getting this error:
    frm-41337: cannot populate the list from the record group
    here is the code:
    DECLARE
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
         END IF;
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    IF v_status = 0
    THEN -- No Error. Record Group has been Populated.
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp');
    END IF; -- IF NOT ID_NULL(v_recgrp)
    END;thanks for your assistance.

    Hi,
    Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
    -Ammad

  • How to create Static Record group in Oracle Forms??

    Dear All,
    I have the following values V1,V2 to be placed in my list item field during DML operations.
    I have an example to create the record group based on the table; whereas i have never tried for static value creation.
    Could you please guide me how can i acheive this.?
    Thanks ....
    Regards,
    Sunil.G

    Thanks dhivya for your reply.
    Actually what happens is; when i use the same methodology as you mentioned, it is asking me to set the Initial value.
    Whereas in my applications; user has to manually select any of the values i.e eithe V1 or V2 for the first time.
    Moreover i have found the query:-
    I have created a static record group RG_VERSIONS i.e creating a new record group with the static values mentioning the "Column names " as "Version_label" which i have given the column values as "V1" and "V2" and then another column name as "Version_value" with the column values as "V1" and "V2".
    Then i used the below query in the WHEN-NEW-FORM-INSTANCE trigger:-
    PROCEDURE p_when_new_form_instance
    IS
    l_rg_id recordgroup;
    l_item_id item;
    BEGIN
    --Populating value for  Version Type based on static record group
    l_rg_id := FIND_GROUP ('RG_VERSION');
    IF NOT ID_NULL (l_rg_id)
    THEN
    l_item_id := FIND_ITEM ('BLOCKNAME.COLUMN_NAME');
    POPULATE_LIST (l_item_id, l_rg_id);
    END IF;
    END p_when_new_form_instance;
    Then it was working fine.
    Thanks for your time.
    Regards,
    Sunil.G
    Edited by: Sunil G on Jun 27, 2010 6:00 AM

  • Can we change the Record Group Type through Custom.pll

    Hello All,
    I have a small requirement on Changing the Record Group Dynamically.
    Can i set the Record group type to 'Query' from 'Static'. i.e Can i change the Record group type dynamically through custom.pll. I know that we can dynamically change the Record group query.
    Please help me its a bit urgent.
    Thanks inadvance,
    Amarnadh Js

    you can control your record group runtime without create any recordgroup at design time..
    1.static group
    declare
       rg_name         VARCHAR2 (40)  := 'Global_Rgp_Menu';     --global record group name for menu use
       rg_id           recordgroup;                                            --global record group id
       gc_id           groupcolumn;                                     --global record group coulmn id
       errcode         NUMBER;                                                             --error code
       grp_row         PLS_INTEGER    := 0;                             --global record group row count
    begin
      rg_id := FIND_GROUP (rg_name);
       IF NOT ID_NULL (rg_id)
       THEN
          DELETE_GROUP_ROW (rg_id, all_rows);
       ELSE
          rg_id := CREATE_GROUP (rg_name, global_scope);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'menu_item', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_type', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_no', char_column, 100);    
       END IF;
      grp_row := 0;
      for 1 in 1..10 loop
           grp_row := grp_row + 1;
          ADD_GROUP_ROW (rg_id, grp_row);
          SET_GROUP_CHAR_CELL (rg_name || '.menu_item', grp_row, 'menu' || to_char(i) );
          /*type*/
          SET_GROUP_CHAR_CELL (rg_name || '.p_type', grp_row,  'type' || to_char(i) );
          /*program_no */
          SET_GROUP_CHAR_CELL (rg_name || '.p_no', grp_row,  'programno' || to_char(i) ); 
      end loop;
    end;
    2. query group
    declare
       FACT_SQL VARCHAR2(500) :=NULL;
       rg_name1       VARCHAR2(40) := 'Global_Rgp_fact';
       rg_id1   RecordGroup;
       Error_Flag number:=0;
       group_error exception;
    begin
       rg_id1 := Find_Group( rg_name1 ); IF NOT Id_Null(rg_id1) THEN Delete_Group( rg_id1 ); END IF;     
       FACT_SQL := ' SELECT *   FROM MYFACTORY  ' ;      
       rg_id1 := Create_Group_From_Query( rg_name1,FACT_SQL ,global_scope);
        Error_Flag := POPULATE_GROUP(rg_id1);
        IF Error_Flag <>0 THEN     
               error_msg:='Error while populating factory group';   
               raise group_error;
        END IF; 
    exception
      when group_error then
         message(error_msg);
        raise;
    end;Edited by: nolemlin on 2010/3/23 上午 7:50

  • URGENT,FRM-41337: Cannot populat the list from record group

    Hi all:
    Can anyone help me in that problem?
    I have a database item in the block as a list item with combo box style and I use this code in WHEN-NEW-RECORD-INSTANCE at the form module level to populate that combo box list:
    DECLARE
         group_id RECORDGROUP := FIND_GROUP('group');
         list_id ITEM := FIND_ITEM('employees.job_id');
         x number;
    BEGIN
    IF NOT ID_NULL (group_id) THEN
              DELETE_GROUP (group_id);
         END IF;
              group_id := CREATE_GROUP_FROM_QUERY ('group','select name,TO_CHAR(id) job from cmn_jobs where job_type_id = 4720 ');
         x := POPULATE_GROUP (group_id);
         POPULATE_LIST (list_id, group_id);
         EXCEPTION
    WHEN NO_DATA_FOUND THEN
    null;
         END;
    That code worked very well and without any problem, but when I change the list item from combo box style to poplist style then the forms give that error:
    FRM-41337: Cannot populat the list from record group
    And an additional null/blanke element appears in the poplist with original element that come from RECORDGROUP.
    So can anyone help me to solve that problem please?

    First, how I can assign a default or initial value DYNAMICALLY to my poplist.Set the default-value to a parameter like :PARAMETER.MYPARAMETER then you can assign the desired default-value to the parameter.
    second, if I have popliste say X for example depend on another poplist say Y ,so when I put the code to populate popliste X on WHEN-LIST-CHANGED on popliste Y and make query then the >forms return FRM-40301 Query caused no records to be retrieved ,but when I have a copy for that code in WHEN-LIST-CHANGED and put it in WHEN-NEW-FORM-INSTANCE at the form >module the form work and returns records, so is it any error or exception in what I did.Can't answer that, you should check :SYSTEM.LAST_QUERY to see why the query does not returnany records.
    At the last, which better to put the code for popliste in PRE-FORM trigger at the form module or in WHEN-NEW-FORM-INSTANCE at the form module.I would use the PRE-FORM-trigger

  • FRM-41072 - Cannot create Group GRP_NAME

    In the layout I'm trying to populate Grp_name column values from GRP_TAB table, in the 'GRP_NAME' item list.
    This is the code I had written. But when I run the Form, I'm getting 'FRM-41072 - Cannot create Group GRP_NAME'error. What could be the error?
    DECLARE
    rg_tags varchar2(20) := 'GRP_NAME';
    rg_id RecordGroup;
    errcode number;
    list_id ITEM;
    BEGIN
    rg_id := create_group_from_query ('GRP_NAME', 'select GRP_NAME, grp_name from grp_tab');
    list_id := find_item('GRP_NAME');
    errcode := populate_group(rg_id);
    populate_list (list_id, rg_id);
    END;
    P.S. I'm writing this code in WHEN-MOUSE-CLICK Trigger in GRP_NAME list item. Is this the right place to write the code?
    Thanks.

    > select GRP_NAME, grp_name from grp_tab
    Looking up the on-line help for FRM-41072:
    FRM-41072: Cannot create Group %s
    Cause:     Caused by one of the following
    1. Duplicate column names in SQL statement.
    2. Invalid record group name.
    3. Query is invalid.
    Action:     Check the group name and/or correct the SQL statement.
    Looks like you violated rule number 1.

  • FRM-41072:  cannot create Group

    Hi,
    I am populating a pick list from a dynamic record group. I keep getting this error message FRM-41072: cannot create Group "start_year_rg". Everything works fine, the picklist gets populated fine everytime I change the value in :control.p_code_control field.
    This is my code, it is on a POST-TEXT-ITEM TRIGGER:-
    :global.p_code:=:control.p_code_control;
    DECLARE
    group_id RecordGroup;
    list_id Item := Find_Item('col1');
    status NUMBER;
    qstring varchar2(300);
    BEGIN
    qstring:='select distinct START_YEAR col1, START_YEAR col2
    from project10
    where project_code = :global.p_code
    order by START_YEAR';
    group_id := Create_Group_From_Query('start_year_rg',qstring);
    status := Populate_Group('start_year_rg');
    POPULATE_LIST('control.start_year_control', 'start_year_rg' );
    end;
    I am not sure why I keep getting this error message FRM-41072: cannot create Group.
    Any help...

    Hi ,
    Try out the following...
    DECLARE
    NUMB_VAR NUMBER;
    BEGIN
    Pick_List.DELETE_Picklist;
    Pick_List.Create_Picklist;
    NUMB_VAR:=Pick_List.Populate_Picklist_With_Query
    (PICK_LIST.LIST_IN,
    'select distinct START_YEAR col1, START_YEAR col2
    from project10
    where project_code = :global.p_code
    order by START_YEAR');
    Pick_List.Display_Picklist(PICK_LIST.LIST_IN);
    END;
    Simon

  • Understanding the internal operation of creating a record group

    Hi gurus,
    When record group is created, if the query has a lot of records generated , does the form actually retrieve all the data from database in the record group when get_group_xxx function is called or there is also buffering like we do execute query from a base table block where only a set of data being buffered is retrieved from db.
    The concerns is that whether the memory will increase exponentially if the data retrieve from record group is huge.

    The group is not populated when you create it. However, when you issue the populate_group command, it does indeed retrieve all the records into memory. So it is not a good idea to use a record group if you will retrieve more than a few thousand rows.

  • How to get all the Record Groups?

    in the form i had created a record group. let us say they are:
      RG_APPR_TYPE_CDE_LIST
      RG_DRV_APPR_TYPE_CDE_LIST
      RG_PROJ_MODE_CDE_LIST
      RG_DRV_PROJ_MODE_CDE_LIST
      RG_PROJ_STATUS_CDE_LIST
      RG_DRV_PROJ_STATUS_CDE_LIST
      RG_ORG_SUB_TYPE_CDE_LIST
      RG_DRV_ORG_SUB_TYPE_CDE_LIST
      RG_REGION_NUM_LIST
      RG_DRV_REGION_NUM_LISTwhen the form hits on the clear button it invoke the CLEAR_FORM. i want to get all the record groups dynmically so i won't have to explicitly call the
      Delete_Group('RG_APPR_TYPE_CDE_LIST');
      Delete_Group('RG_DRV_APPR_TYPE_CDE_LIST');
      Delete_Group('RG_PROJ_MODE_CDE_LIST');
      ...one by one. is there any other workaround? i appreciate any help on this. thanks.

    is there any other workaroundNo.

  • Problem while creating the record in IT0080 from background

    Dear All,
    I have a requirement to Create the record for Maternity Leave in IT0080 from background, whenever applied from ESS.
    Once the leave gets aaproved, while posting the documents from tcode PTARQ ( Program - RPTARQPOST), in the BADI PT_ABS_REQ, in method IF_EX_PT_ABS_REQ~POST_VIA_BLOP for the implementation, I am trying to submit the program in which the actual record is created in IT0080.
    In this program through BDC i have created the BDC data and have used CALL transaction, as internally IT 2001 also needs to be updated, which gets calculated  indirectly...
    But when executed, it gives error of Employee cannot be locked... as the Document which is posted through PTARQ, have several locks... I tried to dequeue the same...
    but cannot resolve the problem...
    Secondly i tried to create the Job also... which would be executed after some time... but still its not getting updated...
    Any help... will be highly appreciated...
    Regards,
    Heena

    Hello s.s
    I'm not understand exacly what is your problem?
    Field can have both values at the same time(Time Stamp and User stamp)  only if that field calculated
    Maybe you told about two different fields?
    User stamp field return username only it's standart functionality
    Create stamp - return date/time combination
    Remote key is avialable when you repository configured to work with some remote systems
    All records from repository (LUT, taxonomy attributes ets.) you can map to corresponding Destination items
    Regards
    Kanstantsin

  • Cannot Create a New Group

    All of a sudden, I cannot create any new groups within Address Book! Will not work either from the plus sign at the bottom of the group list or the main menu!
    Any advice on how to resolve?

    quit Address book and delete the file homedirectory/library/application support/address book/AddressBook-v22.abcddb. then start Address Book and see if you can create groups.

  • PowerPivot - SP2013 - Cannot create the service instance because the parent Service does not exist

    Unable to setup PowerPivot using PowerPivot configuration tool.
    I have One server which has SQL 2012 SP1 and SP2013.
    The farm is configured with all service applications.
    SQL has default instance with DB Engine and SSAS Tabular. Reporting Services has been configured using SharePoint mode and has a service application.
    The Power Pivot instance is set up with DB Engine and the SSAS.
    I keep getting this error. Ive tried so many times uninstalling, making sure features removed, rebuilding the farm (thank god for autospinstaller..)
    11/07/13 12:06:17:6858 Verbose: CreateSystemServiceInstance.NeedsExecute
    11/07/13 12:06:17:6858 Verbose: Running function IsFarmConfigured to check whether SharePoint is configured regardless of availability
    11/07/13 12:06:17:6858 Verbose: Farm is configured
    11/07/13 12:06:17:6858 Verbose: Entering function GetService(Guid)
    11/07/13 12:06:17:6868 Verbose: Service is not installed.
    11/07/13 12:06:17:6868 Verbose: Service instance not found in local server.
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.NeedsExecute(True)
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.CanExecute
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.CanExecute(True)
    11/07/13 12:07:41:5662 Verbose: CreateSystemServiceInstance.Execute
    11/07/13 12:07:41:5682 Verbose: Entering function GetService(Guid)
    11/07/13 12:07:41:5702 Verbose: Service is not installed.
    11/07/13 12:07:41:5702 Verbose: CreateSystemServiceInstance.Execute(Skipped)
    11/07/13 12:07:41:5702 High: Cannot create the service instance because the parent Service does not exist.
    11/07/13 12:07:41:5702 High: Prerequisites check for execution failed. Farm is not in a valid state.

    Did you install the PowerPivot add-in for SharePoint? There are 2 parts to this - the SQL Server Power Pivot for SharePoint which is the Analysis Services instance running in Tabular Mode and the PowerPivot Add-in. The last line in your error message seems
    to tell you that you have a missing component in the farm, possibly the PowerPivot Add-in
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • BPC "The system cannot create the journal template"

    I am trying to create a Journal template in BPC but whatever I do I get the error message "The system cannot create the journal template"
    I am running BPC 5.1 and have tried with service pack 1 and now with service pack 5 installed. The system is on SQL Server 2000.
    Has anyone come past this problem?

    Hi Andy,
    Please check how many sheets are in a default excel workbook on your client. If less than three, BPC fails to create the journal template. If that's the case, try setting default number of worksheets to 3, then retry journal template creation.
    If the above is not the issue, then you'll have to check that reporting services is working correctly. As a first step, go to http://<app server name>/reportserver (or reportserver$<instancename> if you are using a reporting services instance and left it with the default name)
    If that page compiles and shows without error, then try http://<app server name>/ reports (or reports$<instance name>) If that one also compiles/doesn't give errors, then reporting services is working.

  • FRM-47001: Cannot create parameter list aamir : list with this name exists.

    Sir I use parameter list in my form whose name aamir first time when I call report system give result right but second time I call report then system give this error
    FRM-47001: Cannot create parameter list aamir : list with this name exists.
    Please give me idea how I get print view second time
    Thank
    aamir

    Hello aamir,
    Use the following to delete existing parameter.
    DECLARE pl_id ParamList;
    BEGIN
    pl_id := Get_Parameter_List('tempdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List(pl_id);
    END IF;
    END;
    Cheers,
    Suresh

Maybe you are looking for