Error in my group by function

Hi,
I have 3 columns named share_id,high_value and shr_date in one table and shr_id in another table.
i join both the tables using shr_id
When i use the below query,
select a.shr_name,max(b.high)
from SHR_LIST a,SHR_QUOTES b
where a.shr_id = b.shr_id
group by a.shr_name
i get the expected result,
SHR_NAME HIGH_VALUE
ADITYA BIRLA CHEMICALS     99.9
SPICEJET     97.45
STATE BANK OF INDIA     999.8
i also need the which day the value was high,
eg: if SPICEJET's high was on 15th June 2012, I need to be displayed like below,
SHR_NAME HIGH_VALUE DATE
ADITYA BIRLA CHEMICALS     99.9          15th June 2012
SPICEJET     97.45          10th June 2012
STATE BANK OF INDIA     999.8     12th June 2012
i used the below query,
select a.shr_name,max(b.high),shr_date
from SHR_LIST a,SHR_QUOTES b
where a.shr_id = b.shr_id
group by a.shr_name,shr_date
But i am getting the output like,
SHR_NAME HIGH DATE
SPICEJET     9     21-JUL-00
SPICEJET     8.1     24-JUL-00
SPICEJET     8.1     25-JUL-00
SPICEJET     8.15     26-JUL-00
SPICEJET     7.8     27-JUL-00
SPICEJET     8     28-JUL-00
Please help me out...
I knew its very simple, but i lost somewhere.

/* Formatted on 2012/06/17 22:45 (Formatter Plus v4.8.8) */
WITH shr_list AS
     (SELECT 1 shr_id, 'JOHN' shr_name
        FROM DUAL
      UNION ALL
      SELECT 2 shr_id, 'DOLPHIN' shr_name
        FROM DUAL),
     shr_quotes AS
     (SELECT 1 shr_id, 8 high, SYSDATE + 1 shr_date
        FROM DUAL
      UNION ALL
      SELECT 1 shr_id, 7 high, SYSDATE + 3 shr_date
        FROM DUAL
      UNION ALL
      SELECT 2 shr_id, 3 high, SYSDATE + 12 shr_date
        FROM DUAL
      UNION ALL
      SELECT 2 shr_id, 99 high, SYSDATE + 8 shr_date
        FROM DUAL)
SELECT x.*
  FROM (SELECT a.shr_name, b.high, MAX (b.high) OVER (PARTITION BY b.shr_id)
                                                                           mx,
               b.shr_date
          FROM shr_list a, shr_quotes b
         WHERE a.shr_id = b.shr_id) x
WHERE x.high = x.mxSHR_NAME     HIGH     MX     SHR_DATE
JOHN     8     8     18/06/2012 22:45:13
DOLPHIN     99     99     25/06/2012 22:45:13

Similar Messages

  • Error in nested group function used with column name.

    Hi Team,
    If i used nested group function with column name its not working. Could you please any one suggest me.
    How to use it.
    Regards,
    Venkat.
    Please find Spool ........
    SQL> select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name,CNT;
    select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    ERROR at line 1:
    ORA-00937: not a single-group group function
    SQL> select max(max(CNT)) from(select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    MAX(MAX(CNT))
    605

    Venkat wrote:
    Hi Sayan
    Its giving output like below, but not given maximum CNT.
    SQL> select user_name,max(CNT)from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    USER_NAME MAX(CNT)
    BANES_LERG 6
    VENE_USER 8
    USER3 339
    DBUS 106
    VEL_USER 37
    SYS 597
    6 rows selected.Check it - Re: Error in nested group function used with column name.
    and previous post

  • Help in group by function

    Hi All
    very simple one but i just confused by it . i just want to display the rows in group by function .
    example
    SQL> select user_full_name,last_login_date,email_address from comit_user group by company_code
    its giving an error .
    could some one please help me in this .
    thanks in advance .

    Hi there,
    Group by is used with group functions such as SUM, AVG, MAX, MIN, etc
    eg. select job, sum(sal) from emp group by job;
    JOB SUM(SAL)
    ANALYST 6000
    CLERK 4150
    MANAGER 8275
    PRESIDENT 5000
    SALESMAN 5600
    In your query, it looks like you need to use ORDER BY instead
    select user_full_name,last_login_date,email_address from comit_user
    ORDER BY company_code
    Regards,
    John

  • How to Use a Group by Function

    Hi Gurus,
    I have Requirment where i need to use the group by function to one column
    below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
    below is giving me the error not a group by expression
    select distinct source_id,OCCASIONALS_QT_STATUS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where OCCASIONALS_QT_STATUS = 'QTS'
    and source_id = gdoc.source_id
    ) OccasionalsQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NOTQTS'
    and source_id = gdoc.source_id
    ) OccasionalsNOTQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NTKNWN'
    and source_id = gdoc.source_id
    ) OccasionalsNOTKNWN
    from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
    any inputs on this is highly appreciable
    Thanks in advance

    909577 wrote:
    Hi Gurus,
    I have Requirment where i need to use the group by function to one column
    below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
    below is giving me the error not a group by expression
    select distinct source_id,OCCASIONALS_QT_STATUS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where OCCASIONALS_QT_STATUS = 'QTS'
    and source_id = gdoc.source_id
    ) OccasionalsQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NOTQTS'
    and source_id = gdoc.source_id
    ) OccasionalsNOTQTS,
    (SELECT sum(head_count)
    FROM gen_dcsf_occasionals_count
    where
    OCCASIONALS_QT_STATUS = 'NTKNWN'
    and source_id = gdoc.source_id
    ) OccasionalsNOTKNWN
    from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
    any inputs on this is highly appreciable
    Thanks in advanceFor your own sanity, you should format your code to make it more readable
    For the sanity of those from whom you seek help, you should preserve that formatting with the code tags:
    select
         distinct source_id,
         OCCASIONALS_QT_STATUS,
         (SELECT
               sum(head_count)
          FROM
               gen_dcsf_occasionals_count
          where
               OCCASIONALS_QT_STATUS = 'QTS'   and
               source_id = gdoc.source_id
         ) OccasionalsQTS,
         (SELECT
              sum(head_count)
         FROM
              gen_dcsf_occasionals_count
         where
              OCCASIONALS_QT_STATUS = 'NOTQTS' and
              source_id = gdoc.source_id
         ) OccasionalsNOTQTS,
         (SELECT
              sum(head_count)
         FROM
              gen_dcsf_occasionals_count
         where
              OCCASIONALS_QT_STATUS = 'NTKNWN' and
              source_id = gdoc.source_id
         ) OccasionalsNOTKNWN
    from
         gen_dcsf_occasionals_count gdoc
    group by
         OCCASIONALS_QT_STATUS;

  • Prob with group by function

    Hi frds
    I wrote a code where there is a subquery in my select statement, when i use a group by function with my query it comes with an error
    Example
    This is how my select statement looks
    SELECT
    mt.subinventory_code,
    item.description,
    we.wip_entity_name,
    SUM((mt.transaction_quantity)*-1),
    sum(wro.required_quantity),
    sum(wdj.start_quantity),
    (SELECT SUM (transaction_quantity) FROM mtl_onhand_quantities
    WHERE inventory_item_id = wro.inventory_item_id
    AND organization_id = wro.organization_id) rm_stock
    And my group by statement is of this way
    group by
    mt.subinventory_code,
    item.description,
    we.wip_entity_name
    When i excute the query
    It results in an error like this
    ORA-00979: not a GROUP BY expression
    When i remove the subquery from my select statement it works fine,but i want the result including the subquery plz help me

    I don't know the implications, but give this a try.
    SELECT we.wip_entity_name JOB_NO,
           mt.subinventory_code DEPARTMENT,
           msi1.segment1 assembly_item,
           msi1.description assm_desc,
           sum(wdj.start_quantity) ASSL_QTY,
           item.segment1 PART_CODE,
           item.description PART_DESCRIPTION,
           item.primary_uom_code UOM,
           sum(wro.required_quantity) REQUIRED_QTY,
           SUM((mt.transaction_quantity)*-1) ISSUED_QTY,
           mfg.meaning JOB_STATUS,
           SUM (mol.transaction_quantity) rm_stock
    FROM mtl_material_transactions mt,
         mtl_system_items item,
         mtl_system_items msi1,
         wip_e0ntities we,
         wip_requirement_operations wro,
         mfg_lookups mfg,
         wip_discrete_jobs wdj
         mtl_onhand_quantities mol
    WHERE mt.inventory_item_id = wro.inventory_item_id
    and mt.inventory_item_id=item.inventory_item_id
    AND item.inventory_item_id = wro.inventory_item_id
    AND we.wip_entity_id = wro.wip_entity_id
    AND wdj.wip_entity_id = we.wip_entity_id
    AND mfg.lookup_code = wdj.status_type
    AND mt.organization_id = :org_id
    AND mt.inventory_item_id = wro.inventory_item_id
    AND item.organization_id = wro.organization_id
    AND mt.transaction_source_id = we.wip_entity_id
    AND msi1.inventory_item_id = wdj.primary_item_id
    AND msi1.organization_id = wro.organization_id
    AND we.wip_entity_id = wro.wip_entity_id
    AND we.organization_id = wro.organization_id
    AND mfg.lookup_code = wdj.status_type
    AND mfg.lookup_type = 'WIP_JOB_STATUS'
    AND mt.transaction_type_id = 35
    AND wro.department_id <> 1001
    AND wro.required_quantity > transaction_quantity*-1
    AND mol.inventory_item_id = wro.inventory_item_id
    AND mol.organization_id = wro.organization_id
    group by mt.subinventory_code,
             item.description,
             item.segment1,
             we.wip_entity_name,
             mfg.meaning,
             item.primary_uom_code,
             msi1.segment1 ,
             msi1.description;Cheers
    Sarma.

  • Group by function field

    The first field in a select statement is based on a function and returns a number less than 1000.
    I would like to only display the multiple records of that field.
    The statement would normally be:
    select first_field,...
    from ...
    group by first_field
    having count(*) > 1.
    Since first_field is a function, I keep getting an error in the group by statement that it is not allowed. Nor is an alias allowed.
    Any suggestions as to how to get around this problem?
    Thanks.
    Leah

    First of all, thank you all for your replies. I have still not succeeded.
    The shortened code I am using now is:
    select aa.threedigits ,v1.invoice_num invoice_num1
    from apps.ap_invoices_v v1, apps.ap_invoices_v v2,
    (select distinct apps.jafi_disco_utils_pkg.GetThreeLastDigits(invoice_num)
    threedigits
    from apps.ap_invoices_v v3
    where v3.approval_status_lookup_code <> 'CANCELLED'
    and v3.invoice_date between '06-JAN-2006' and '06-JAN-2006' ) aa
    where v1.vendor_id = v2.vendor_id and
    v1.approval_status_lookup_code <> 'CANCELLED' and
    v2.approval_status_lookup_code <> 'CANCELLED' and
    apps.jafi_disco_utils_pkg.GetThreeLastDigits(v1.invoice_num) =
    apps.jafi_disco_utils_pkg.GetThreeLastDigits(v2.invoice_num)
    and v1.invoice_date between '06-JAN-2006' and '06-JAN-2006'
    and aa.threedigits = apps.jafi_disco_utils_pkg.GetThreeLastDigits(v1.invoice_num)
    group by v1.invoice_num
    having count(*) > 1
    1) I limited the invoice date so as to shorten the query time.
    2) If I omit the "group by" and "having" statements, here is a sample of the records that I get:
    row threedigits invoice num
    26     005     112/2005
    27     005     112/2005
    28     022     030A66D0022
    29     185     4185
    30     311     3315311
    31     311     3315311
    32     311     3315311
    What I would like as my output are the rows above excluding row 28 & 29 which are single occurrences.
    I am still getting an error in the group by statement and I don't know why.

  • Sqlplus group by function

    Good evening.
    I am fairly new to SQLplus.
    I am having trouble creating a query.
    I would like to return the sum of employees that work for each department. I am under the impression i may need a group by function.
    I have tried the following:
    SELECT employee_id, department_id
    FROM employee
    GROUP BY department_id
    I get an error saying that it is not a group by expression.
    Any ideas?

    hello,
    yeah it will complain about the employee id is not a group by expression.
    try this:
    SELECT employee_id, department_id
    FROM employee
    GROUP BY department_id, employee_id
    regards,
    naqvi

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

  • Error While including the Multisite functionality

    Error While including the Multisite functionality & trying to click on SiteAdministraion tab in BCC
    Background: We have migrated our application from ATG v9.1 to ATG v 10.0.2 and implementing Multisite on the same
    Getting this error on BCC console:
    12:55:36,893 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBPAPP_5_0_0_GA date=200910202128)] Started in 2m:44s:727ms
    12:57:24,234 ERROR [SiteAdminActivitySource] The acl for the custom workflow activity named siteadmin.manageSiteAssets is invalid. This activity will not be available.
    atg.security.InvalidPersonaException: Profile$role$siteAdminUser
    at atg.security.AccessControlListParser.setPersona(AccessControlListParser.java:239)
    at atg.security.AccessControlListParser.parseAce(AccessControlListParser.java:277)
    at atg.security.AccessControlListParser.parse(AccessControlListParser.java:193)
    Thanks in Anticipation1

    Hello Sudheer,
    Increasing the Swap space is the only thing i noticed in all SAP Notes for your problem.
    Configure more swapspace please and restart the installation.
    Regards,
    Siddhesh

  • Error message in compliing a function

    Hi All,
    I am trying to compiling the following function, but it is throwing the an error.
    CREATE OR REPLACE FUNCTION parapage_discosessions
    RETURN bumber
    IS
    discosessions number;
    BEGIN
    discosessions := select count(*) from gv$session where username IN ('DISCOFIELD', 'DISCOUSER','DISCOADMIN');
    RETURN discosessions;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END;
    The above function is giving the following error message
    Error(9,21): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specification> <an alternatively-quo
    Please give me any suggestions

    SQL> CREATE OR REPLACE FUNCTION parapage_discosessions
      2  RETURN number IS
      3  discosessions number;
      4  BEGIN
      5  select count(*) into discosessions
      6  from gv$session
      7  where username IN ('DISCOFIELD', 'DISCOUSER','DISCOADMIN');
      8  RETURN discosessions;
      9  EXCEPTION
    10  WHEN OTHERS THEN
    11  raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    12  END;
    13  /
    Function created

  • Error while determining the form function module

    Hi everyone,
    We are experiencing problems while displaying one adobe form in ESS. It’s the Travel Expense form (PTRV_EXPENSE_FORM). When pressing the button to “Display/Print” the form we get an error message: "Error while determining the form function module", and no form I shown. The ADS server is configured correctly and there are other forms that are actually working, for example the Travel Request form. We are running WAS 7.0 with SP12.
    Anyone has an idea what can cause the problem? Any help is greatly appreciated.
    Thanks in advance!
    Regards,
    Sophie

    Viktor,
    Thank you for your answer, it solved our problem!
    Regards,
    Sophie

  • FindGroups - Error while getting group list for login user

    Hi All,
    I am using below code snippet to search a group in OIM but it gives me "Error while getting group list for login user" error message.
    tcResultSet rsetAss = null;
    tcGroupOperationsIntf groupIntf = (tcGroupOperationsIntf)utilFactory.getUtility("Thor.API.Operations.tcGroupOperationsIntf");
    HashMap mapGrp = new HashMap();
    mapGrp.put("Groups.Group Name","DEF_GROUP");
    rsetAss = groupIntf.findGroups(mapGrp);     
    And i am ruuning this code using xelsysadm logon.
    com.thortech.xl.util.config.ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    com.thortech.xl.crypto.tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);     
    Any guess?
    Thanks & Regards
    Inbaa.

    Here it is Rajiv,
    public class GetUserApprover {
    private String defGroup = "DEF_GROUP";
    public tcUtilityFactory getUtilFactory()
    tcUtilityFactory utilFactory = null;
    try
         logger.debug("Initializing the utilFactory");
         com.thortech.xl.util.config.ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    com.thortech.xl.crypto.tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);
    catch(Exception ex)
         logger.info("Error while getting the utilFactory" + ex.getMessage());
         System.out.println(ex.getMessage());
    return utilFactory;
    public String getGroupKey(String defGroup){
              String groupKey = null;
              tcUtilityFactory utilFactory = getUtilFactory();
              if(utilFactory != null)
         System.out.println("utilFactory not null. Searching for group:" +defGroup );
                   try
              tcResultSet rsetAss = null;
              tcGroupOperationsIntf groupIntf = (tcGroupOperationsIntf)utilFactory.getUtility("Thor.API.Operations.tcGroupOperationsIntf");
              HashMap mapGrp = new HashMap();
              mapGrp.put("Groups.Group Name","DEF_OWNER_GROUP");
              System.out.println("Finding Group....");
              rsetAss = groupIntf.findGroups(mapGrp);          
              System.out.println("RowCount-->" +rsetAss.getRowCount() );
              rsetAss.goToRow(0);
              groupKey = rsetAss.getStringValue("Groups.Key");
         System.out.println("GroupKey-->" + groupKey);
         catch(Exception e){
              System.out.println("Error" + e.getMessage());
              return (java.lang.Object)groupKey;
    }

  • Error checking transport group configuration in System BQS

    Hi Everyone,
    I made a client export from Production to Quality. It went successfully,, I noted the requests numbers and transported them from PRD to Quality, but while transporting there was a tp error(which i did not note), next i went to the quality import queue and saw all the 3 requests had come. But when i click the adjust queue icon im getting the following error message "Error checking transport group configuration in System BQS" .  Afterwards i tried to delete the requests from quality to retransport  from production but still im not able to delete those requests from quality. Can anyone help me solve this.
    Regards,
    Rahul

    Hello Rahul,
    regarding the error message:
    "Error checking transport group configuration in system"
    It's mostly related to the TMSADM RFC destination. Kindly follow the below mention steps:
    1. Logon to client 000 with user DDIC.
    2. STMS   > System   > Overview   > Select the system in which you are logged in   > Click on the menu says EXTRAS   > Generate RFC Destinations
    Perform the above steps in all the systems configure in your TMS. This should resolve the issue.
    Best regards,
    Tomas Black

  • Error in import/export of functions - for the apex team

    After exporting functions, the import gives an error.
    Reason :
    the export generates a script with
    function \
    function
    importing this script gives an error because only the first function is imported. or the functions seems to be togheter one function
    the export should generate
    function
    function
    Leo

    Leo - I logged into your workspace and exported the functions. The generated script looks perfectly good. I then uploaded that file into my own workspace and ran the script. The functions were all created as separate functions.
    There must be something happening at your end causing newline characters in the file to be lost or something. Or maybe I didn't follow exactly the steps you did.
    BTW, when you mentioned the "\" character in your original post, I assumed you meant the "/" character.
    Scott

  • Error when calling a package function

    any insight why my object is erroring out when calling a function. the error is
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at line 1
    it errors out when the cs.execute() is . is it the placement ? thanks for the help....
    then pkg func is xxx.get_log
    Get_Log(rmode IN NUMBER , doc_type IN VARCHAR2 DEFAULT 'TEL', doc_id IN VARCHAR2 DEFAULT NULL,
    doc_num IN VARCHAR2 DEFAULT NULL -- , p_out out varchar2 --
    RETURN varchar2 IS....
    the co
    Serializable paramDocLocatorParamList [] = {paramRMODE, paramDOC_TYPE, paramDOC_ID, paramDOC_NUM, p_out };
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OADBTransaction dbtrans;
    OAViewObject docLocator = (OAViewObject)am.findViewObject("DocLocatorVO1");
    rtxt0.setValue(pageContext, "here it is" + am.invokeMethod("getHTMLString", paramDocLocatorParamList));
    docLocator.executeQuery();
    // am.invokeMethod("getHTMLString", paramDocLocatorParamList);
    the impl
    public String getHTMLString ( String paramRMODE, String paramDOC_TYPE, String paramDOC_ID, String paramDOC_NUM, String p_out )
    System.out.println("Entering The AM Impl");
    CallableStatement st = null;
    OADBTransaction txn = (OADBTransaction)getDBTransaction();
    Connection conn = txn.getJdbcConnection();
    String sql = " BEGIN :5 := test_proc.get_log(:1, :2, :3, :4 ); END; ";
    CallableStatement cs = txn.createCallableStatement(sql,1);
    String ErrorExist = "";
    String getHTML = "";
    try
    cs.setString(1, paramRMODE);
    cs.setString(2, paramDOC_TYPE);
    cs.setString(3, paramDOC_ID);
    cs.setString(4, paramDOC_NUM);
    cs.setString(5,p_out); // --param   
    /* cs.registerOutParameter(1,Types.CHAR);
    cs.registerOutParameter(2,Types.CHAR);
    cs.registerOutParameter(3,Types.CHAR);
    cs.registerOutParameter(4,Types.CHAR);*/
    cs.registerOutParameter(5,Types.CHAR);
    cs.execute();
    getHTML = cs.getString(5 ) ;
    /* System.out.println("getHTML is " + getHTML );
    cs.close();
    // if ( "E".equals(ErrorExist))
    /// throw new OAException ("Payment Request Is Already Cancelled" );
    catch (SQLException sqle)
    try { cs.close(); }
    catch (Exception e) {}
    throw OAException.wrapperException(sqle);
    String doctype = paramDOC_TYPE;
    String docnum = paramDOC_NUM;
    String html ;
    System.out.println( "paramDOC_TYPE in IMPL is " + doctype) ;
    System.out.println( "paramDOC_Numb in IMPL is " + docnum) ;
    return getHTML;

    resolved.....
    public String getHTMLString (String p_out , String rmode, String doc_type, String doc_id, String doc_num )
    System.out.println("");
    System.out.println("Entering The AM Impl");
    // System.out.println("Passing getDocAbbrForHTML in IMPL -------> " +getDocAbbrForHTML     );
    // System.out.println("Passing paramDOC_NUM in IMPL -------> " + paramDOC_NUM );
    System.out.println("Passing getDocAbbrForHTML in IMPL -------> " +doc_type     );
    System.out.println("Passing paramDOC_NUM in IMPL -------> " + doc_num );
    CallableStatement st = null;
    OADBTransaction txn = (OADBTransaction)getDBTransaction();
    Connection conn = txn.getJdbcConnection();
    String sql = " BEGIN :1 := test_proc.get_log(:2, :3, :43, :5 ); END; ";
    CallableStatement cs = txn.createCallableStatement(sql,1);
    String ErrorExist = "";
    String getHTML = "";
    try
    cs.setString(2, rmode);
    cs.setString(3, doc_type);
    cs.setString(4, doc_id);
    cs.setString(5, doc_num);
    cs.registerOutParameter(1,Types.VARCHAR);
    cs.execute();
    getHTML = cs.getString(1 ) ;

Maybe you are looking for