Error in query function

Hi everyone!!
I had created a function which returns a varchar2, this varchar2 is a query.
This is to execute in the apex.
Obviously the type of identification of region is SQL Query(PL/SQL function body returning SQL query)
The error is the next:
ORA-01846: not a valid day of the week
Error ERR-1101 Unable to process function body returning query.
OK
Is there anyone who knows some about this error?
I don't know why happens this error. If I execute the function in the TOAD application and after that I execute the result this executes without error.
Any help will be very appreciatedç
Thank u in advance
Best Regards

Hello:
Are you seeing the error when executing your page or when defining the report region ?
Are you providing Apex Page Items as input parameters to the function ? If so you might want to check the 'Use Generic Column Names (parse query at runtime only)'
option under the Source field of the Edit Region page.
Varad

Similar Messages

  • I am getting this error :The right function requires 2 argument(s).

    declare 
    @startdate datetime,
    @enddate datetime 
    SET @STARTDATE ='01-MAR-2014'
    SET @enddate = '01-MAR-2014'
    Set @StartDate = Convert(datetime, Convert(char(10), @StartDate, 120) + ' 00:00:00', 120)
    set @enddate =convert(datetime,Convert(char(10),@enddate, 120) + ' 23:59:59',120) 
    SELECT 
    [row_date]
    ,[logid]
    ,CONVERT(VARCHAR(6), (ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0))/3600) + 
    ':' + RIGHT('0' + CONVERT(varchar(2),(ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0)) % 3600) / 60), 2)
    + ':' + RIGHT('0' + CONVERT(varchar(2), (ISNULL(SUM([acwouttime] + [auxouttime] + [holdtime]), 0)) % 60), 2)AS HoldTime
    FROM [CMSData].[dbo].[hagent2]
    WHERE ([logid] IN (1382, 1493,1382,1493,1444,1466,1301,1074,1655,
    1749,1685,1686,1684,1617,1681,1792,1595,1597,1687,1622))
    AND (row_date BETWEEN  @StartDate AND @EndDate)
    GROUP BY 
    [row_date]
    ,[logid]
    hi friends when I am executing this query I am getting this error please help me I will grateful to you .
    ERROR: The right function requires 2 argument(s).

    you may be better off making date filter as below
    declare
    @startdate datetime,
    @enddate datetime
    SET @STARTDATE ='01-MAR-2014'
    SET @enddate = '02-MAR-2014'
    AND (row_date >= @StartDate AND row_date <@EndDate)
    see
    http://visakhm.blogspot.in/2012/12/different-ways-to-implement-date-range.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error when executing function in MSS launchpad report ???

    In MSS lanchpad report, we have the following problem:
    Error in Manager Sef-Service
    When calling the report, the following error occurred:
    System: HRP
    Error when executing function
    Basically in MSS report, I select employees in the first iView which calls another ABAP query in back-end to display back-end t-code inside iView of portal through ITS service. What could be the reason for it? please advice.
    Thanks,
    Anthony

    Please try converting the standadrd-delivered scenario RPT0, then check
    out the things.
    Also problem may be that your function code names contain
    the character '&'. This causes a problem when the selected function
    code is passed to the ITS-WebGUI as a URL parameter. Please use only
    standard characters (A..Z and _) when you define a function code.
    Then it should work.
    Please go through the following link also
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/
    3198408d953154e10000000a1550b0/frameset.htm
    Please test in backend using Se38 > PWPC_RPT_START_REPORT_TEST
    The Reporting Iview in the portal has the Report category type, by
    the report category type is set to "RPT0". Therefore, when the
    application is launched, the reporting category type is also sent as URL
    parameter to the backend system. As of ECC 6.0 only the reporting
    category type "RPT0" is supported. ensure this is set for your custom reports if you are using own scenarion
    then set in the Iview property of reports as well
    ie example
    1)Change the Iview property "Scenario" of the Reporting iview from
    "RPT0" to your own "ZRPT", than this set of reports will work. however,
    the standard reports will not work.
    pwpc_convert_mdt_to_lpa >>
    The following list of reports have been converted.

  • 5200:Error Executing Query

    Hi,
    I am getting below error while running a report in FR.
    5200:Error Executing Query:
    Could you please let me know what is the problem and how to resolve it.
    Thanks,

    Hi,
    This might be due to corrupt POV this can be resolved by just deleting POV for the use and again setting it up.
    Regards,
    Gyan

  • Error in Query Execution : SQL Error: 1110

    Dear Experts,
         We did the system copy from production to Sandbox system. Executing one query got terminated with the following error.
         Error SQL Error: 1110
         Abort System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-
         I copy this query to the new one and remove all the filter. It works!!!
         Any suggestion on this issue?
    Regards

    Hi,
    check these threads
    BEx query error
    BEx Query Error
    Regards
    harikrishna N

  • Error  in query definition

    Hi all,
    I am getting the following error when accessing HR payroll quires
    "Formal error in query definition ( DIM <-> from[NAV]) ?
    Can any body help me ?
    KK

    I am getting the same error. Could you pls post the solution. I am on the following level (from the error message.
    BI Java Release: 7 - Patch level: 0000000011 - Description: BI Web Applications Java - Additional info: - Production mode: true
    BI ABAP Release: 700 - Patch level: 0012 - Description: SAP NetWeaver BI 7.0 (SAP_BW) - Additional info: - Production mode: true
    Java Virtual Machine IBM J9 VM - IBM Corporation - 2.3
    Operating System AIX - ppc64 - 5.3
    I searched the OSS and found a note 1001621 which said apply support package: SAP_BW_VIRTUAL_COMP - Rel 700 - Pkg name SAPK70012NVCBWTECH
    But, our basis guys came back with the reply that the solution suggested in OSS note is for SAPKW70011, but our system is already on SAPKW70012. So, this note cannot be applied.
    Any help would be appreciated.

  • Error in query: [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from. '' (SWEI)

    Hi All
    below query giving me error in query generator but working well in Sql server.
    error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from. '' (SWEI)
    Select
    T1.U_grp01 As 'BA',T3.DocDate As 'Posting Date',Month(T3.DocDate) As 'PostMonth',Year(T3.DocDate) As 'PostYear',
    'AR Invoice' As 'Type',T3.DocNum As 'Doc No',T3.CardCode As 'Cust. Code',T3.CardName As 'Cust. Name',T5.SlpName As 'Sale Emp. Name',
    T4.IndustryC As 'Channel Type',T6.CityB As 'BillToCity',T7.Name As 'BillToState',T6.CityS As 'ShipToCity',T8.Name As 'ShipToState',
    T4.U_Une_Zone As 'Zone',
    T2.ItmsGrpNam As 'L1',T0.LineNum As 'Row No',T0.ItemCode As 'ItemCode',T0.Dscription As 'Item Name',t0.whscode,
    T0.Quantity As 'Quantity',T0.StockPrice As 'COGS Price',IsNull(Sum(T0.Quantity * T0.StockPrice),0) As 'COGS Value',T0.VatSum As 'Tax Amount',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.PriceBefDi Else (T0.PriceBefDi * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.INMPrice Else (T0.INMPrice * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then Sum(T0.Quantity * T0.INMPrice) Else Sum(T0.Quantity * T0.INMPrice * T0.Rate) End) Else T0.LineTotal End) ,0) As 'Sales Value',t9.linetotal as 'Freight',
    T3.DocType As 'DocType',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = -90
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'BED',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = -60
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'Cess',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = 9
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'HeCess',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE (INV4.StaType = 1 or inv4.staType = 8)
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'VAT',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = 8
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'CST'
    From INV1 T0
    Left Join OITM T1 On T1.ItemCode=T0.ItemCode
    Left Join OITB T2 On T2.ItmsGrpCod=T1.ItmsGrpCod
    Left Join OINV T3 On T3.DocEntry=T0.DocEntry
    Left Join OCRD T4 On T4.CardCode=T3.CardCode
    Left Join OSLP T5 On T5.SlpCode=T4.SlpCode
    Left Join INV12 T6 On T6.DocEntry=T0.DocEntry
    Left Join OCST T7 On T7.Code=T6.StateB and T7.Country='IN'
    Left Join OCST T8 On T8.Code=T6.StateS and T8.Country='IN'
    left join inv3 t9 on t9.docentry = t3.docentry
    WHERE T3.[DocDate] >= [%0] and T3.[DocDate] <= [%1] and t3.U_UNE_GCAT = '2'
    Group By T1.U_grp01,T3.DocEntry,T3.DocNum,T3.DocDate,T0.LineNum,T3.CardCode,T3.CardName,T5.SlpName,T4.IndustryC,T4.U_Une_Zone,
    T6.CityB,T7.Name,T6.CityS,T8.Name,T0.VatSum,T0.Currency,T0.Rate,T3.DocType,T0.Price,T0.LineTotal,
    T2.ItmsGrpNam,T0.ItemCode,T0.Dscription,T0.StockPrice,T0.INMPrice,T0.PriceBefDi,T0.Quantity,t9.linetotal,t0.WhsCode
    Union All
    Select
    T1.U_grp01 As 'BA',T3.DocDate As 'Posting Date',Month(T3.DocDate) As 'PostMonth',Year(T3.DocDate) As 'PostYear',
    'AR Invoice' As 'Type',T3.DocNum As 'Doc No',T3.CardCode As 'Cust. Code',T3.CardName As 'Cust. Name',T5.SlpName As 'Sale Emp. Name',
    T4.IndustryC As 'Channel Type',T6.CityB As 'BillToCity',T7.Name As 'BillToState',T6.CityS As 'ShipToCity',T8.Name As 'ShipToState',
    T4.U_Une_Zone As 'Zone',
    T2.ItmsGrpNam As 'L1',T0.LineNum As 'Row No',T0.ItemCode As 'ItemCode',T0.Dscription As 'Item Name',t0.whscode,
    T0.Quantity As 'Quantity',T0.StockPrice As 'COGS Price',IsNull(Sum(T0.Quantity * T0.StockPrice),0) As 'COGS Value',T0.VatSum As 'Tax Amount',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.PriceBefDi Else (T0.PriceBefDi * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.INMPrice Else (T0.INMPrice * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then Sum(T0.Quantity * T0.INMPrice) Else Sum(T0.Quantity * T0.INMPrice * T0.Rate) End) Else T0.LineTotal End) ,0) As 'Sales Value',t9.linetotal as 'Freight',
    T3.DocType As 'DocType',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = -90
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'BED',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = -60
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'Cess',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = 9
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'HeCess',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE (rin4.StaType = 1 or rin4.staType = 8)
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'VAT',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = 8
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'CST'
    From rin1 T0
    Left Join OITM T1 On T1.ItemCode=T0.ItemCode
    Left Join OITB T2 On T2.ItmsGrpCod=T1.ItmsGrpCod
    Left Join Orin T3 On T3.DocEntry=T0.DocEntry
    Left Join OCRD T4 On T4.CardCode=T3.CardCode
    Left Join OSLP T5 On T5.SlpCode=T4.SlpCode
    Left Join rin12 T6 On T6.DocEntry=T0.DocEntry
    Left Join OCST T7 On T7.Code=T6.StateB and T7.Country='IN'
    Left Join OCST T8 On T8.Code=T6.StateS and T8.Country='IN'
    left join rin3 t9 on t9.docentry = t3.docentry
    WHERE T3.[DocDate] >= [%0] and T3.[DocDate] <= [%1] and t3.U_UNE_GCAT = '2'
    Group By T1.U_grp01,T3.DocEntry,T3.DocNum,T3.DocDate,T0.LineNum,T3.CardCode,T3.CardName,T5.SlpName,T4.IndustryC,T4.U_Une_Zone,
    T6.CityB,T7.Name,T6.CityS,T8.Name,T0.VatSum,T0.Currency,T0.Rate,T3.DocType,T0.Price,T0.LineTotal,
    T2.ItmsGrpNam,T0.ItemCode,T0.Dscription,T0.StockPrice,T0.INMPrice,T0.PriceBefDi,T0.Quantity,t9.linetotal,t0.WhsCode
    Thanks in Advance

    Hi deepak..
    try this
    /* SELECT FROM OSRT P1 */
    DECLARE @FROM AS DATE
    /* WHERE */
    SET @FROM = /* P1.FromDate */ '[%1]'
    /* SELECT FROM OSRT P2 */
    DECLARE @TO AS DATE
    /* WHERE */
    SET @TO = /* P2.ToDate */ '[%2]';
    SELECT T1.U_grp01 AS 'BA',
           T3.DocDate AS 'Posting Date',
           MONTH(T3.DocDate) AS 'PostMonth',
           YEAR(T3.DocDate) AS 'PostYear',
           'AR Invoice' AS 'Type',
           T3.DocNum AS 'Doc No',
           T3.CardCode AS 'Cust. Code',
           T3.CardName AS 'Cust. Name',
           T5.SlpName AS 'Sale Emp. Name',
           T4.IndustryC AS 'Channel Type',
           T6.CityB AS 'BillToCity',
           T7.Name AS 'BillToState',
           T6.CityS AS 'ShipToCity',
           T8.Name AS 'ShipToState',
           T4.U_Une_Zone AS 'Zone',
           T2.ItmsGrpNam AS 'L1',
           T0.LineNum AS 'Row No',
           T0.ItemCode AS 'ItemCode',
           T0.Dscription AS 'Item Name',
           t0.whscode,
           T0.Quantity AS 'Quantity',
           T0.StockPrice AS 'COGS Price',
           ISNULL(SUM(T0.Quantity * T0.StockPrice), 0) AS 'COGS Value',
           T0.VatSum AS 'Tax Amount',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.PriceBefDi
                                      ELSE (T0.PriceBefDi * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.INMPrice
                                      ELSE (T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN SUM(T0.Quantity * T0.INMPrice)
                                      ELSE SUM(T0.Quantity * T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.LineTotal
                   END
               0
           ) AS 'Sales Value',
           t9.linetotal AS 'Freight',
           T3.DocType AS 'DocType',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = -90
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'BED',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = -60
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'Cess',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = 9
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'HeCess',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  (INV4.StaType = 1 OR inv4.staType = 8)
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'VAT',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = 8
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'CST'
    FROM   INV1 T0
           LEFT JOIN OITM T1
                ON  T1.ItemCode = T0.ItemCode
           LEFT JOIN OITB T2
                ON  T2.ItmsGrpCod = T1.ItmsGrpCod
           LEFT JOIN OINV T3
                ON  T3.DocEntry = T0.DocEntry
           LEFT JOIN OCRD T4
                ON  T4.CardCode = T3.CardCode
           LEFT JOIN OSLP T5
                ON  T5.SlpCode = T4.SlpCode
           LEFT JOIN INV12 T6
                ON  T6.DocEntry = T0.DocEntry
           LEFT JOIN OCST T7
                ON  T7.Code = T6.StateB
                AND T7.Country = 'IN'
           LEFT JOIN OCST T8
                ON  T8.Code = T6.StateS
                AND T8.Country = 'IN'
           LEFT JOIN inv3 t9
                ON  t9.docentry = t3.docentry
    WHERE  T3.[DocDate] >= @FROM
           AND T3.[DocDate] <= @TO
           AND t3.U_UNE_GCAT = '2'
    GROUP BY
           T1.U_grp01,
           T3.DocEntry,
           T3.DocNum,
           T3.DocDate,
           T0.LineNum,
           T3.CardCode,
           T3.CardName,
           T5.SlpName,
           T4.IndustryC,
           T4.U_Une_Zone,
           T6.CityB,
           T7.Name,
           T6.CityS,
           T8.Name,
           T0.VatSum,
           T0.Currency,
           T0.Rate,
           T3.DocType,
           T0.Price,
           T0.LineTotal,
           T2.ItmsGrpNam,
           T0.ItemCode,
           T0.Dscription,
           T0.StockPrice,
           T0.INMPrice,
           T0.PriceBefDi,
           T0.Quantity,
           t9.linetotal,
           t0.WhsCode
    UNION ALL
    SELECT T1.U_grp01 AS 'BA',
           T3.DocDate AS 'Posting Date',
           MONTH(T3.DocDate) AS 'PostMonth',
           YEAR(T3.DocDate) AS 'PostYear',
           'AR Invoice' AS 'Type',
           T3.DocNum AS 'Doc No',
           T3.CardCode AS 'Cust. Code',
           T3.CardName AS 'Cust. Name',
           T5.SlpName AS 'Sale Emp. Name',
           T4.IndustryC AS 'Channel Type',
           T6.CityB AS 'BillToCity',
           T7.Name AS 'BillToState',
           T6.CityS AS 'ShipToCity',
           T8.Name AS 'ShipToState',
           T4.U_Une_Zone AS 'Zone',
           T2.ItmsGrpNam AS 'L1',
           T0.LineNum AS 'Row No',
           T0.ItemCode AS 'ItemCode',
           T0.Dscription AS 'Item Name',
           t0.whscode,
           T0.Quantity AS 'Quantity',
           T0.StockPrice AS 'COGS Price',
           ISNULL(SUM(T0.Quantity * T0.StockPrice), 0) AS 'COGS Value',
           T0.VatSum AS 'Tax Amount',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.PriceBefDi
                                      ELSE (T0.PriceBefDi * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.INMPrice
                                      ELSE (T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN SUM(T0.Quantity * T0.INMPrice)
                                      ELSE SUM(T0.Quantity * T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.LineTotal
                   END
               0
           ) AS 'Sales Value',
           t9.linetotal AS 'Freight',
           T3.DocType AS 'DocType',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = -90
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'BED',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = -60
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'Cess',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = 9
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'HeCess',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  (rin4.StaType = 1 OR rin4.staType = 8)
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'VAT',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = 8
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'CST'
    FROM   rin1 T0
           LEFT JOIN OITM T1
                ON  T1.ItemCode = T0.ItemCode
           LEFT JOIN OITB T2
                ON  T2.ItmsGrpCod = T1.ItmsGrpCod
           LEFT JOIN [dbo].[Orin] T3
                ON  T3.DocEntry = T0.DocEntry
           LEFT JOIN OCRD T4
                ON  T4.CardCode = T3.CardCode
           LEFT JOIN OSLP T5
                ON  T5.SlpCode = T4.SlpCode
           LEFT JOIN rin12 T6
                ON  T6.DocEntry = T0.DocEntry
           LEFT JOIN OCST T7
                ON  T7.Code = T6.StateB
                AND T7.Country = 'IN'
           LEFT JOIN OCST T8
                ON  T8.Code = T6.StateS
                AND T8.Country = 'IN'
           LEFT JOIN rin3 t9
                ON  t9.docentry = t3.docentry
    WHERE  T3.[DocDate] >= @FROM
           AND T3.[DocDate] <= @TO
           AND t3.U_UNE_GCAT = '2'
    GROUP BY
           T1.U_grp01,
           T3.DocEntry,
           T3.DocNum,
           T3.DocDate,
           T0.LineNum,
           T3.CardCode,
           T3.CardName,
           T5.SlpName,
           T4.IndustryC,
           T4.U_Une_Zone,
           T6.CityB,
           T7.Name,
           T6.CityS,
           T8.Name,
           T0.VatSum,
           T0.Currency,
           T0.Rate,
           T3.DocType,
           T0.Price,
           T0.LineTotal,
           T2.ItmsGrpNam,
           T0.ItemCode,
           T0.Dscription,
           T0.StockPrice,
           T0.INMPrice,
           T0.PriceBefDi,
           T0.Quantity,
           t9.linetotal,
           t0.WhsCode
    rgds
    Kennedy

  • Error in Query (EXCEPT)

    Dear Experts,
    I Have Error in query
    My Query Such as:
    Select TransNum from Oinm where transType=310000001
    Except
    Select Docnum from [dbo].[Opn_Stock] where U_ TransTypeStk=310000001
    Show Error: Browse mode is invalid for statements containing a UNION, INTERSECT and EXCEPT operator.
    Note: This query smoothly run in Sql 2005 but throw Error in SAP while execute in sap query generator.
    Regards,
    Sumeet Vaity

    The SBO generally inserts a for browse line at the end of the query. But not allways! E.g. probably your query would work if you refrase it in such a way:
    Select TransNum from Oinm where transType=310000001
    Except --union
    Select Docnum from dbo.Opn_Stock where U_ TransTypeStk=310000001
    That is it does not insert this line in case of a union, even in the comment part!

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error occurred querying a data source in office 365.

    I have created a simple infopath form and in one of my dropdown box  i am receiving the REST services. 
    when i run the infopath form 2013 in preview it was running good but when i upload it on to office 365 cloud it's showing me error. i had converted the services into UDL and save it on Data connection Library and it's approved.
    Warning
    Click OK to resume filling out the form. You may want to check your form data for errors.
    The entry has been added to the Windows event log of the server.
    log ID:5566
    Correlation ID:feb08a9c-9d47-30f5-5d89-60340242d6d1.

    Hi,
    According to your post, my understanding is that you got error when querying a data source in office 365.
    Per my knowleadge, we cannot connect to SharePoint Web Services from InfoPath Forms within SharePoint Online.
    Loopback protection is enabled on the SharePoint Online environment and will block calls to SOAP and REST from InfoPath Form Services.
    For more information, you can refer to:
    Error message when you connect an InfoPath form to a SharePoint Online web service: "An error occurred while connecting to a Web Service"
    As a workaround, to look up data for some dropdowns from several external REST Web Services, we need to have a Data Connection library in your Site Collection in which to store the UDCX files.
    The steps seem to be:
    Create a Data Connection Library in your Site Collection
    In the InfoPath ribbon, go to Data, then Data Connections. Your existing data connections should be listed.
    Choose the data connection which is hosted on a different domain.
    Clink the
    Convert to  Connection File… button
    In the location selector, specify the path to the Data Connection Library you created above.
    Leave the
    Relative to  site collection (recommended) radio button selected.
    Click OK
    Here is a great blog for your reference:
    InfoPath 2013 Forms on Office365 with External REST DataSources
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • While applying 4440000, "Error calling FNDLOAD function" Occurs.

    While applying the patch 4440000, the following error occured.
    ***********************************************************************************************Loading data using FNDLOAD function.
    FNDLOAD APPS/***** 0 Y UPLOAD @FND:patch/115/import/aflvmlu.lct @PER:patch/115/import/US/perzzlookup01823.ldt -
    Connecting to APPS......Connected successfully.
    Calling FNDLOAD function.
    Returned from FNDLOAD function.
    Log file:
    Error calling FNDLOAD function.
    Also, no log file for FNDLOAD generated.
    Referred the metalink note 441783.1. But unable to understand the solution. Can anyone please explain or other workaround if any?
    S. Sundar

    Dear Taylor,
    Thanks a lot. You are too excellent.
    After doing as follows, the problem is resolved.
    F:\oracle\product>ln -s 10.2.0 10_2.0
    F:\oracle\product>dir 10*
    Volume in drive F is New Volume
    Volume Serial Number is 08B6-ACF4
    Directory of F:\oracle\product
    12/16/2007 10:56 AM <DIR> 10.2.0
    04/01/2008 08:10 AM <JUNCTION> 10_2.0
    0 File(s) 0 bytes
    2 Dir(s) 10,004,815,872 bytes free
    F:\oracle\product>
    Thanks again.
    S. Sundar

  • Error executing Query - Workspace report error.

    Hi All,
    One of our user is getting "5200:Error executing Query" message while running the report in Hyperion Financial reporting workspace,how ever if I run this report with my login on his system I am able to run it.
    Could you please put some flash on it what may be the reason behind the same.
    waiting for your reply.....
    Thanks,

    Hi, in general the 5200 error means that the user cannot connect to run the report.
    What this means is that the user either doesn't have:
    - the necessary Workspace permissions, or
    - the necessary data source permissions to run the report. This can either be correct essbase permissions or perhaps the report uses a member they do not have access to see.
    I think from memory there should be a Details button on the error message which the user sees which should provide more detailed information. Can you confirm and reply back?
    Cheers, Iain

  • ERROR WHILE UPLOADING FUNCTIONAL LOCATION MASTER DATA THROUGH LSMW?????

    Dear Experts,
    I am uploading the master data of functional location through LSMW .I had completed all the steps except "Run Batch Input Session".
    In that step it is showing as functional location already exists, after this error the remaining functional locations are updated in sap or it will stop total transaction by  this error???
    how can u upload the remaining in to sap by skipping already existed one????
    here I am uploading the error screen shot.
    Thanks & Regards,
    Sunil Boya

    Hi Jogeswara Rao Kavala,
    When I am pressing back or NO option  it is showing error like this
    What is this OK- Code means?
    how can I resume this process, even it was not going to back screen also and only one option is available for exit from this is by going into MENU-SYSTEM-SERVICES-BATCH INPUT-CANCEL.
    Sunil Boya

  • ERROR while querying ACM driver's information

    I am using following scheme to transmit sound over network:
    file -> input datasource -> processor -> output datasource -> RTPManager -> network
    File from which i am transmitting is temporary. I am create this file before transmit and delete it after.
    1. Application starts
    2. I am perform transmit first time - everything fine, but in std otput i see message "ERROR while querying ACM driver's information".
    3. I am perform transmit second time - everything fine, but file that i am created for transmitting stays locked by JMF for about 20 minutes.
    4. Any transmit after "ERROR while querying ACM driver's information" locks input file for about 15-20 minutes.
    Any suggestions will be appreciated.
    Thanks for advance!

    I can't download your code RAR, so can you just post the code you're using to handle the shutdown? (and please use the code tags)Thanks for anwser. There is entire test code i wrote (code with "mutex" variable is not nessesary, i wrote it just for clearer output):
    import javax.media.*;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.DataSource;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.File;
    import java.nio.channels.FileChannel;
    public class Test {
        public static void main(String[] args) {
            File sourceFile = new File("1.wav");
            for (int i = 0; i < 3; i++) {
                System.out.format("Try number %d\n", i);
                File tempFile;
                try {
                    tempFile = File.createTempFile("TestTemp", ".wav");
                } catch (IOException e) {
                    System.err.format("Cannot create temporary file %s \n", e);
                    return;
                if (!copyFile(sourceFile, tempFile)) {
                    return;
                DataSource ds;
                try {
                    ds = javax.media.Manager.createDataSource(new MediaLocator("file:" + tempFile.getPath()));
                } catch (Exception e) {
                    System.err.format("Cannot create datasource %s \n", e);
                    return;
                Format[] formats = new Format[1];
                formats[0] = new AudioFormat(AudioFormat.ULAW_RTP, 8000, 8, 1);
                ProcessorModel prm = new ProcessorModel(ds, formats, new ContentDescriptor(ContentDescriptor.RAW_RTP));
                Processor processor;
                try {
                    processor = Manager.createRealizedProcessor(prm);
                } catch (Exception e) {
                    System.err.format("Cannot create processor %s \n", e);
                    return;
                processor.close();
                Object mutex = new Object();
                synchronized (mutex) {
                    try {
                        mutex.wait(1000);
                    } catch (InterruptedException e) {
                        System.err.format("Thread interrupted, try number " + i + "\n");
                        return;
                if (!tempFile.delete()) {
                    System.err.format("Cannot delete temporary file, try number " + i + "\n");
                System.out.format("Try end number %d\n", i);
        public static boolean copyFile(File sourceFile, File destFile) {
            FileChannel source = null;
            FileChannel destination = null;
            try {
                source = new FileInputStream(sourceFile).getChannel();
                destination = new FileOutputStream(destFile).getChannel();
                destination.transferFrom(source, 0, source.size());
            } catch (Exception e) {
                System.err.format("Error while copying files %s \n", e);
                return false;
            finally {
                if (source != null) {
                    try {
                        source.close();
                    } catch (IOException e) {
                        System.err.format("Error while trying close source file %s \n", e);
                if (destination != null) {
                    try {
                        destination.close();
                    } catch (IOException e) {
                        System.err.format("Error while trying close destination file %s \n", e);
            return true;
    }I have figured out that if i continue to try deleting files used by processor (that already closed) while program is running, files will be deleted after ~15 minutes. I have figured out this while testing my main application. This test app also may be modified to reproduce this behaviour. If you want, i can submit a modified test code to reproduce this behaviour.
    If JMF is maintaining a file lock, then I assume you've improperly shutdown the processor / datasink...About resource deallocation. First, there is no datasink i have been created manually (may be jmf create it internally, but i dont think so). In my test application i've been created only input datasource and processor. I have tried deallocate datasource also, but this is dont have any effect. In JMF reference we can see this description of method Processor.close():
    "Releases all resources and cease all activity."
    I think this is enough to call Processor.close() to deallocate input file, is that right?

  • Error while querying workflow message attributes for task

    Can some one please help me with this error?
    I get this error when I submit a task in worklist app. I have figure out that it is causing due to one payload in the table in the task. If remove that payload I am able to submit the task.
    Error while querying workflow message attributes for task a99d1cf3-5e91-4c4a-8660-aeae91bfbec0 with version 5.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services.
    oracle.jbo.JboException: Error while querying workflow message attributes.
    Error while querying workflow message attributes for task a99d1cf3-5e91-4c4a-8660-aeae91bfbec0 with version 5.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services.
         at oracle.bpel.services.datacontrol.XSDDataControl.invokeOperation(XSDDataControl.java:460)
         at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:430)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2144)
         at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:467)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)

    Can anybody help me on this?
    I did some google but I get this only which is not much helpful.
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10113/chapter_bpm_messages.htm

Maybe you are looking for

  • Audio and other Bugs in 2.0 - are they fixed in 3.0?

    I just completed creating an e-learning course using Captivate 2.0 that used quite a lot of graphics and video. The numbers of bugs I experienced when publishing to Flash in 2.0 were so substantial that the delivery date had to be delayed almost two

  • What's wrong with my ipod touch 4g?

    Hello, I am a student who is using MacBook Pro and iPod Touch 4G (32GB) To jump to the topic, my liquid crystal of my iPod is broken. No, it's better to say, CRASHED. I bought a new protecting film and case for my iPod, and i sticked and covered it.

  • HELP - Placing a Multiple Page PDF

    I need help some help for a large job I'm doing at work. You may need to have print shop experience to answer this question or be good at scripting... These pdf's have already been created and are 7"x8.5". I am placing them on a landscape legal size

  • How to print interest along with dunning letter

    HI  guys  plz How to print interest along with dunning letter Many thanks to you Raju

  • SQL Developer viewing schemas on an MS SQL Server

    Hi, I've connected SQL Developer to our MS SQL server in the hope we can dump some of the data it contains onto our Oracle 10g box. Problem is in the left hand connections pane we can only see one database on the sql server box at a time. If we want