R12 query for tax_rate --ar_vat_taxes_b

Can someone please suggest a R12 replacement query for
select distinct tax.tax_rate from AR.AR_VAT_TAX_ALL_B tax
where tax.org_id = :parameter.org_id
and tax.tax_type ='VAT'
and tax.enabled_flag = 'Y'
order by tax.tax_rate
Edited by: 918124 on Dec 8, 2012 3:55 AM

hi all
i got the solution here it is
SELECT ZJB.TAX_REGIME_CODE "REGIME"
,ZJB.TAX_JURISDICTION_CODE "JURISDICTION"
,ZJB.TAX"TAX"
,(CASE
WHEN ZJB.TAX='CITY'THEN(
select distinct GEOGRAPHY_ELEMENT1||'-->'||GEOGRAPHY_ELEMENT2
||'-->'||GEOGRAPHY_ELEMENT3||'-->'||GEOGRAPHY_ELEMENT4
from hz_relationships HR
,hz_geographies HG
where HR.OBJECT_ID=ZJB.ZONE_GEOGRAPHY_ID
AND HR.SUBJECT_ID=HG.GEOGRAPHY_ID)
WHEN ZJB.TAX='COUNTY' THEN(SELECT RTRIM(GEOGRAPHY_ELEMENT1||'-->'||GEOGRAPHY_ELEMENT2
||'-->'||GEOGRAPHY_ELEMENT3||'-->'||GEOGRAPHY_ELEMENT4,'-->')
FROM HZ_GEOGRAPHIES HG
WHERE ZJB.ZONE_GEOGRAPHY_ID=HG.GEOGRAPHY_ID)
WHEN ZJB.TAX='STATE' THEN(SELECT RTRIM(GEOGRAPHY_ELEMENT1||'-->'||GEOGRAPHY_ELEMENT2
||'-->'||GEOGRAPHY_ELEMENT3||'-->'||GEOGRAPHY_ELEMENT4,'-->')
FROM HZ_GEOGRAPHIES HG
WHERE ZJB.ZONE_GEOGRAPHY_ID=HG.GEOGRAPHY_ID)END)"GEOGRAPHY_HEIRARCHY"
,(CASE
WHEN ZJB.TAX='CITY'THEN(
select distinct GEOGRAPHY_NAME
from hz_relationships HR
,hz_geographies HG
where HR.OBJECT_ID=ZJB.ZONE_GEOGRAPHY_ID
AND HR.SUBJECT_ID=HG.GEOGRAPHY_ID)
WHEN ZJB.TAX='COUNTY' THEN(SELECT GEOGRAPHY_NAME
FROM HZ_GEOGRAPHIES HG
WHERE ZJB.ZONE_GEOGRAPHY_ID=HG.GEOGRAPHY_ID)
WHEN ZJB.TAX='STATE' THEN(SELECT GEOGRAPHY_NAME
FROM HZ_GEOGRAPHIES HG
WHERE ZJB.ZONE_GEOGRAPHY_ID=HG.GEOGRAPHY_ID)END)"GEOGRAPHY_NAME"
,ZRB.PERCENTAGE_RATE"TAX RATE"
FROM ZX_JURISDICTIONS_B ZJB
,ZX_RATES_B ZRB
WHERE ZJB.TAX_REGIME_CODE='&regime_code'
AND ZRB.TAX_REGIME_CODE=ZJB.TAX_REGIME_CODE
AND ZRB.TAX_JURISDICTION_CODE=ZJB.TAX_JURISDICTION_CODE
AND ZRB.ACTIVE_FLAG='Y'
Edited by: 882910 on Apr 16, 2012 10:02 PM

Similar Messages

  • What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?

    Hi Guys,
    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
    I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
    Business wants to run the report for any date in a past...
    The report has two parameters:
    As Of Date - the same as As of Date for the AP Trial Report
    Trial Balance Run Date - the date when Trial Balance was run...
    Conditions are:
    TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Show_Flag = 'YES', where:
    Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
    There is a difference between the logic of my report, and the logic of AP Trial Balance...
    Could you please advise what I'm missing?
    Thanks,
    Iana

    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
    Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
    Thanks,
    Hussein

  • Query for Cost Code in oracle HRMS

    Hello Exports,
    i am new in oacle hrms,
    So Can you please tell how to fetch cost code in oracle hrms r12 ( i need sql query for cost code )
    Thanks

    try the following (assignment costing as at today):
    select ppx.full_name
    ,ppx.employee_number
    ,pax.assignment_number
    ,pax.primary_flag
    ,pcax.proportion
    ,pcak.segment1
    ,pcak.segment2
    ,pcak.segment3
    ,pcak.segment4
    from per_assignments_x pax
    ,per_people_x ppx
    ,pay_cost_allocations_x pcax
    ,pay_cost_allocation_keyflex pcak
    where ppx.person_id = pax.person_id
    and pax.assignment_id = pcax.assignment_id
    and pcak.cost_allocation_keyflex_id = pcax.cost_allocation_keyflex_id

  • Query for invoice and distribution detail

    hi 2 all
    anybody have the query for getting invoice with distribution detail in oracle payable r12.
    thanks
    zulqarnain

    select ass.SEGMENT1 vendor_number,
    ass.VENDOR_NAME,
    assa.VENDOR_SITE_CODE VENDOR_SITE,
    aia.INVOICE_NUM,
    aia.INVOICE_DATE,
    aia.INVOICE_AMOUNT,
    aia.INVOICE_TYPE_LOOKUP_CODE,
    gcc.CONCATENATED_SEGMENTS distribution_account ,
    gcc1.CONCATENATED_SEGMENTS liability_account,
    to_char(aia.GL_DATE) GL_DATE,
    AP_INVOICES_PKG.GET_APPROVAL_STATUS( AIa.INVOICE_ID,
    AIa.INVOICE_AMOUNT, AIa.PAYMENT_STATUS_FLAG,
    AIa.INVOICE_TYPE_LOOKUP_CODE) APPROVAL_STATUS_LOOKUP_CODE
    from ap_invoices_all aia,
    ap_suppliers ass,
    ap_supplier_sites_all assa,
    ap_invoice_distributions_all aid,
    gl_code_combinations_kfv gcc,
    gl_code_combinations_kfv gcc1
    where aia.VENDOR_ID = ass.VENDOR_ID
    and assa.VENDOR_SITE_ID = aia.VENDOR_SITE_ID
    and ass.VENDOR_ID = assa.VENDOR_ID
    and aid.INVOICE_ID = aia.INVOICE_ID
    and aid.DIST_CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
    and assa.ACCTS_PAY_CODE_COMBINATION_ID = gcc1.CODE_COMBINATION_ID
    --and aia.INVOICE_ID =  81000
    and aia.GL_DATE between '01-JAN-12' and '31-MAR-12'
    order by aia.GL_DATE
    Thanks,
    Atul

  • Unable to query for GL balances

    Hi All,
    I'm using Oracle EBS R12.1.3. I'm unable to find a gl balance for a specific account. I can see there is information about it into the database but i cannot understand why it is not appearing into the application.
    Here are my steps:
    1. Navigate to GL Manager responsibility
    2. Inquiry > Account
    3. Query for specific code combinition
    4. No results
    I tried with another one and I receive data into the application. I tried to compared them in the database tables - gl_balances, gl_je_headers, gl_je_lines and they looks like similar data (flag, status, etc)
    Any ideas?
    Thanks in advance,
    Stoyanov

    Hi,
    Thanks for your reply.
    I ran the account analysis report and i'm able to see the data. Also - I can see this info in the Journals screen in GL. Any ideas why it's not showing in Inquiry > Account?
    Regards,
    Stoyanov

  • Unsupported query for Continuous Query Notification

    Hi all,
    I'm following an application which supports ADS(Active Data Service). http://www.consideringred.com/files/oracle/2011/ActiveDataServiceADFBCApp-v0.02.zip
    I build the application and it works well.
    Then I created a ViewCriteria for the same VO. Then added a search panel through that ViewCriteria.
    Now when I change data at database it shows the data change (ADS works).
    But when I search for data through that search boxes it gives me the following error.
    java.sql.SQLException: ORA-29983: Unsupported query for Continuous Query NotificationHow can I overcome this error....??
    Thanks,
    Dinuka.

    Here it is Mr.John..,
    >
    <ADFLogger> <begin> Execute query
    <ViewObjectImpl> <closeStatementsResetRowSet> [7421] ViewObject: [########.client.views.TestVO]ClientAM.TestVO1 close prepared statements...
    <ViewObjectImpl> <getPreparedStatement> [7422] ViewObject: [########.client.views.TestVO]ClientAM.TestVO1 Created new QUERY statement
    <ViewObjectImpl> <buildQuery> [7423] TestVO1>#q computed SQLStmtBufLen: 2911, actual=2823, storing=2853
    <ViewObjectImpl> <buildQuery> [7424] SELECT * FROM (SELECT
    ClientsEO.ADDED_BY,
    ClientsEO.APPROVAL_STATUS,
    ClientsEO.CHANGED_BY,
    ClientsEO.CLIENT_PREFIX,
    ClientsEO.CLIENT_SUFFIX,
    ClientsEO.CLIENT_TYPE,
    ClientsEO.COUNTRY_OF_RESIDENCE,
    ClientsEO.CUSTODIAN_NUMBERED_ACC,
    ClientsEO.DATE_ADDED,
    ClientsEO.DATE_CHANGED,
    ClientsEO.DATE_OF_INCORPORATION,
    ClientsEO.DATE_STATUS_CHANGED,
    ClientsEO.DISPOSAL_INSTRUCTIONS,
    ClientsEO.DIVIDEND_DISP_TYPE,
    ClientsEO.ENTITLEMENT_TO_UNASSIGNED,
    ClientsEO.ENTITLEMENT_UNASSIGNED,
    ClientsEO.GENDER,
    ClientsEO.INITIALS,
    ClientsEO.LOCAL_CLIENT_ID,
    ClientsEO.MEMBER_CODE,
    ClientsEO.MEMBER_TYPE,
    ClientsEO.NATIONALITY,
    ClientsEO.OTHER_NAMES,
    ClientsEO.REMARKS,
    ClientsEO.STATUS,
    ClientsEO.STATUS_CHANGE_REASON_CODE,
    ClientsEO.STATUS_CHANGED_BY,
    ClientsEO.SURNAME,
    ClientsEO.TAX_CODE_DEBT,
    ClientsEO.TAX_CODE_EQT,
    ClientsEO.TITLE,
    CS.DESCRIPTION STATUS_DESCRIPTION,
    CT.DESCRIPTION TYPES_DESCRIPTION,
    ClientsEO.CLIENT_SUFFIX as Client_Suff,
    DECODE(ClientsEO.GENDER, 'M', 'MALE', 'F', 'FEMALE', 'N/A') CLIENT_GENDER,
    CASE
    WHEN CSF.COMPANY = 'Y' THEN ClientsEO.SURNAME
    ELSE ClientsEO.TITLE || ' ' || ClientsEO.OTHER_NAMES || ' ' || ClientsEO.SURNAME
    END Name,
    C.COUNTRY_NAME,
    C.NATIONALITY COUNTRY_NATIONALITY,
    CSF.DESCRIPTION SUFFIX_DESCRIPTION,
    DECODE(ClientsEO.MEMBER_TYPE,'',' ',(SELECT MT.DESCRIPTION FROM MEMBER_TYPES MT WHERE MT.MEMBER_TYPE=ClientsEO.MEMBER_TYPE )) MEM_TYPE_DESCRIPTION,
    DECODE(ClientsEO.TAX_CODE_DEBT,'',' ',(SELECT TS.TAX_DESCRIPTION FROM TAX_STATUS_CODES TS WHERE TS.TAX_CODE=ClientsEO.TAX_CODE_DEBT )) TAX_DEBT_DESCRIPTION,
    DECODE(ClientsEO.TAX_CODE_DEBT,'',' ',(SELECT TS.TAX_RATE FROM TAX_STATUS_CODES TS WHERE TS.TAX_CODE=ClientsEO.TAX_CODE_DEBT )) TAX_DEBT_RATE,
    DECODE(ClientsEO.TAX_CODE_EQT,'',' ',(SELECT TS.TAX_DESCRIPTION FROM TAX_STATUS_CODES TS WHERE TS.TAX_CODE=ClientsEO.TAX_CODE_EQT )) TAX_EQT_DESCRIPTION,
    DECODE(ClientsEO.TAX_CODE_EQT,'',' ',(SELECT TS.TAX_RATE FROM TAX_STATUS_CODES TS WHERE TS.TAX_CODE=ClientsEO.TAX_CODE_EQT )) TAX_EQT_RATE,
    DECODE(ClientsEO.DIVIDEND_DISP_TYPE, 'C', 'CASH','B' , 'BANK','') DIVIDEND_DISP_DESCRIPTION ,
    DECODE(ClientsEO.STATUS_CHANGE_REASON_CODE,'','',(SELECT SR.REASON FROM SUSPENDING_REASONS SR WHERE SR.REASON_CODE=ClientsEO.STATUS_CHANGE_REASON_CODE )) STATUS_CHANGE_REASON
    FROM
    CLIENTS ClientsEO,
    CLIENT_STATUS CS,
    CLIENT_TYPES CT,
    COUNTRIES C,
    CLIENT_SUFFIXES CSF
    WHERE
    ClientsEO.CLIENT_TYPE = CT.CLIENT_TYPE AND ClientsEO.STATUS = CS.STATUS AND ClientsEO.COUNTRY_OF_RESIDENCE = C.COUNTRY_CODE(+) AND ClientsEO.CLIENT_SUFFIX = CSF.CLIENT_SUFFIX) QRSLT WHERE ( ( (UPPER(CLIENT_PREFIX) = UPPER(:vc_temp_1) ) ) )
    <ViewObjectImpl> <bindParametersForCollection> [7425] Bind params for ViewObject: [########.client.views.TestVO]ClientAM.TestVO1
    <OracleSQLBuilderImpl> <bindParamValue> [7426] Binding param "vc_temp_1": 325
    <ADFLogger> <addContextData> Execute query
    MyOracleDatabaseChangeListenerWrapper.getRegistrationProperties() : vProperties = {DCN_QUERY_CHANGE_NOTIFICATION=true, DCN_NOTIFY_ROWIDS=true, DCN_BEST_EFFORT=true}
    <ADFLogger> <addContextData> Execute query
    <ViewObjectImpl> <freeStatement> [7427] ViewObject: [########.client.views.TestVO]ClientAM.TestVO1 close single-use prepared statements
    <QueryCollection> <buildResultSet> [7428] QueryCollection.executeQuery failed...
    <QueryCollection> <buildResultSet> [7429] java.sql.SQLException: ORA-29983: Unsupported query for Continuous Query Notification
    >
    I think this is the query you asked for.
    thanks for paying attention Mr.John.
    Dinuka.
    Edited by: dinuka on Jul 25, 2011 12:18 PM
    some package names removed due to company rules and regulations.

  • R12 QUERY

    In oracle r12 I have done the following:
    R12 -> inventory->reports->transactions->single request(selected) -> and then select name as transaction historical summary then press ok.. after this its asking to fill fields. I have done this. and I have submitted that request. I have viewed that request in view->requests-> all requests-> I have pressed view output button -> by this I viewed the output for my table and fields entered at before level.
    Now I would like to view the query for that. I have pressed the view log button to view log details. There are no errors so Iam viewing some text regarding that request.
    My need is now if i press view log button then the query which is used to display that output has to be shown. Can I know the settings for this to do in oracle apps R12.
    Thanks.

    Duplicate post -- oracle apps

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • Error while creating a query for my custom infotype

    Hi,
    I have created a custom infotype with fields currency amount and currency field .
    While I am creating a query for it its giving an error
    Message no. AQ_AD_HOC221 Error when generating the report(see long text )
    I tried to execute the standard program RPUMS40CCI but still I am facing same error .
    I have also maintained table T777i for my infotype but still problem exists.
    Please help.
    P

    Hi
    Check in PM01

  • Error while executing a sql query for select

    HI All,
    ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.

    I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
    1. I dont want to increase the temp space
    2. I need to tune the query, please provide your recomendations.
    insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
    (REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
    select
    REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
    carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
    carrier_item_type,carried_item_protection_type,'PACS'
    from
    (select distinct
    c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
    a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
    a.carrier_item_type,a.carried_item_protection_type,'PACS'
    from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
    where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
    AND a.carrier_items=b.mux
    and c.REPORTNUMBER=(case
    when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
    else 20
    end)
    and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
    where not exists
    (select *
    from CST_DSA.HIERARCHY_MISMATCHES B where
    A.REPORTNUMBER=B.REPORT_NUM and
    A.REPORTTYPE=B.REPORT_TYPE and
    A.REPORTDESCRIPTION=B.REPORT_DESC and
    A.CARRIED_ITEMS=B.CARRIED_ITEMS and
    A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
    A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
    A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
    A.CARRIER_ITEMS=B.CARRIER_ITEMS and
    A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
    A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
    AND B.SOURCE_SYSTEM='PACS'
    Explain Plan
    ==========
    Plan
    INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1                                                        
         20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES                                                   
              19 PX COORDINATOR                                              
                   18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                         
                        17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                    
                             15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1                               
                                  4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621                          
                                       3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                     
                                            2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                
                                                 1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621           
                                  14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448                          
                                       11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448                     
                                            8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002               
                                                 7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2           
                                                      6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2      
                                                           5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
                                            10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448                
                                                 9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448           
                                       13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1                     
                                            12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1                
                             16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1

  • Return Code - Query for Multiple Rows as XML

    Hi,
    I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
    { call MyStoredProc(?) }
    This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
    Thanks
    Nic

    Thanks for the offer, unfortunately we would need something certified by Adobe.
    Nic

  • Query for Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
    where U_Total_GP is a UDF for storing the GP of each order.
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
    Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
    Thank you
    Regards
    Elton

    Hi Elton,
    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    ORDER BY T0.[DocNum]
    Thanks,
    Gordon

  • Problem with query for Oracle

    Hello Experts,
    I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
    This application has to read and write data in the EP DB (oracle v10).
    I'm using:
    <u>a Dictionary Project</u> (define the DB Tables)
    <u>a Java Project</u> (define class as DAO, DBManager etc)
    <u>a Library Project</u>
    <u>an EJB Project</u>
    <u>an EAR Project</u>
    With these projects I can deploy a <u>webService</u> in my EP server.
    BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
    The query is simple and correct but it does not work...
    This is the error message returned (the query id in bold)
    (column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
    <i>HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=UTF-8
    Date: Fri, 21 Sep 2007 14:29:57 GMT
    Set-Cookie: <value is hidden>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
    The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
    Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
    We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and  not found....
    Any help???
    Best Regards

    Hi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
    My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
    Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    So I tried to use the ':' as indicated in the manual..
    <b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
                   - expecting LPAREN, found ':'</i>
    <b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
                   - 1:26 - SQL syntax error: the token "(" was not expected here
                   - 1:26 - expecting ID, found '('</i>
    Then I tried to avoid the MIN() function and I tried to do just the subtraction:
    <b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
    <b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
                - 1:22 - SQL syntax error: the token "(" was not expected here
                - 1:22 - expecting ID, found '('</i>
    <b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
                     - 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
                     - 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
    <b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
                  - 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
    Why these parts of query are not accepted???
    I don't understand why... I hope you can help me.
    Best Regards
    Alessandro

  • TDS Amount on Vendor Advance Shows positive value in *QUERY* for TDS Report

    Hi Everybody,
    I have made a query for List of TDS Report with Vendor informations as required by my client. In which the value of TDS on Vendor Advance Payment appears as positive value instaead of negative value. Please suggest how to rectify.
    Thanks,
    Paul

    Dear,
    If you have cleared the advance in F-54, then this will reverse the tax amount. That could be the reason for tax amount in debit.

  • Query for daily sales by warehouse

    Hi
    I need a query for   Daily sales by warehouse.  I am only new to this and struggling with generating.
    ideally it will look like the below.     With no selection criteria as I would like to schedule the report to email out at the end of each day.
    Warehouse      Revenue      GP          GP%
    NSW               $xxxx             $xxx       35%
    Would someone mind helping
    thanks

    thankyou ,   But i have multiple warehouse and i dont want to use a selection criteria.
    to expand on the original example
    Warehouse      Revenue      GP          GP%
    NSW                 $xxxx             $xxx           35%
    QLD                  $xxx               $xx            32%
    VIC                  $xxx               $xx            32%
    Also the results should only show figures for the day the query is executed
    Any help is appreciated.
    Similar layout to this,except using query and whs code.    the below is generated using sales analysis and customer group. 

Maybe you are looking for

  • Outlook 2010 not finding all users in the "To" line

    I have a user that has an issue with searching in the "To" line when sending an email. She has sent an email to this person before, and with most users, she can type first or last name and come up with the users. But there are a select few that she c

  • Table for Maintenance Plan (PM) Delete Indicator..?

    Hii, i am developing a report, in that have to check the delete status of Maint Plan (PM). I tried finding in tables like, MPLa, MMPT, MPOS, MHIO, MHIS, even JSTO but was not able to find the delete indicator. Can u suggest the table where i can find

  • Blank book pages on iPad

    I am trouble with downloaded books having all blank pages. For example, in the folder on my desktop it shows that there is a 2.8mb pdf, an 848kb mobi file, and an epub file. I added it to itunes and synced it to my iPad. The cover of the book shows u

  • URGENT: Run Form 9i on AIX

    Hello all, I have a bunch of webforms(form 9i) running in windows environment.I need to deploy these forms in an AIX machine.this machine has Oracle9iAS installed. Do I need to install forms 9i on the AIX machine?I dont need any development work to b

  • HT4858 What about shared photo streams that's not shared with anyone?

    I want to use shared photo streams mainly to keep my albums online and I find it the easiest way. The article says that the maximum amount of photo stream I can share is 100. What if I create a photo stream and I share it with no one? Will I be able