A/R invoice Report Query selection by Items.

Dear All,
I need a A/R invoice  Report Query selection by Items.
Thanx in advance!!!!!!!!

Hi,
        Try this......
Declare @Itemcode nvarchar(50)
set @Itemcode = (select (T1.iTEMCODE) FROM INV1 T1 WHERE T1.ITEMCODE='[%0]')
SELECT T0.DocNum, T0.DocStatus, T0.DocDate as 'Posting date',
T0.TaxDate as 'Document Date', T0.CardCode as 'Customer Code',
T0.CardName as 'Customer Name', T1.ItemCode, T1.Dscription as 'Item Name',
T1.Quantity,T1.Price,T1.VatSum AS TAX,T1.LineTotal as Total
FROM OINV T0
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
where T1.ItemCode =@Itemcode 

Similar Messages

  • A/r Invoice report query based on posting date selection criteria

    Hi experts,
    I am trying to write a query to get the A/r invoice report including Docnum, Docdate, cardname, project, linetotal, taxcode, taxtotal.
    and i tried the below query
    SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName],T1.[LineTotal] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1]
    In this query ,
    1) i am unable to sum up the linetotal( total before tax) 
    2) also unable to fetch the sum of taxamount.
    3) its more important , the above query will  me docnum , when i try to open that doc, it opens the 2007 docments. whereas the other details are correct like docdate, amount and all.
    example:   from date: 1/04/2011    to date: 28/07/2011
    Docnum    Docdate  cardname   linetotal.... etc
        2              1/04/11   XYZ              5000
    when i click the 2 (docnum)  it opens me the 04/04/2007  documents.
    how to limit the doc within the periods given?
    thanks in advance
    Dwarak

    Hi Rahul/Gordon,
    thanks for your query's .
    additionally,   i want this query without the A/r invoices whichever having credit memo as target doc. 
    and
    i have selection criteria as  T0.[U_Sec_Category] = '[%2]'  and this has 3 values like  1)CIM 2)BIN 3)DMP
    among these  CIM should be seen only only user1  and BIN & DMP only by user2.
    can u plz get me this
    thanks,
    Dwarak

  • How do I reference columns in a report query from another report query?

    In Apex 3.1 it is possible to generate a report on more than one query. I have read that these queries can be correlated, but I cannot find how in the documentation.
    I go the Shared Components and create a new Report Query:
    select * from dept
    Then I click Add Query and I add:
    select * from emp
    How do I correlate these two queries (I want to join emp.deptno to dept.deptno) and have a nice hierarchicle XML-file.
    Is it possible in Apex 3.1?
    Dik Dral

    Dik,
    This type of query can't be build. The two queries are independent, you can't reference values in the first query from the second query. However you can reference page and application items - which won't help you all that much with this scenario though. You could also try combining the two queries into one, and then take care of the proper presentation in your template.
    Regards,
    Marc

  • Report Query returning "No Data Found" with bind variables

    I put a simple query into Report Query:
    Select "bluefish". "name" as "name",
    "bluefish"."primary_flag" as "primary_flag",
    "bluefish"."status" as "status",
    "bluefish"."ID" as "ID" from "bluefish" "bluefish" where "bluefish"."ID" = :P3_XPRINTID
    When I test the query, data is returned; however, when I try to run the query using "Test Report" button, I get an error 01403 No Data Found. If I replace the bind variable with an explicit value, the report works.
    Anyone have any ideas as to what is causing this problem? I am using the Generic Report Layout, with various output types. I AM editting the query and defining the bind variable before I test the report (otherwise, the query wouldn't run).
    Charles

    Sometimes if you create a form/report/whatever using the wizards, it will create an After Submit process called something like Reset Page - basically you want to make sure you don't have any After Submit processes that call a Clear Session state (it may say something like Clear Cache for Page).
    In your branch, there is also a box that says Clear Cache - you want to make sure that does not have page Number 8 in it or it will clear your session state.
    Put the page in Debug mode and read through it - check to make sure your value is getting saved and maybe you can see what is going wrong.

  • Can I change column headings dynamically based on report query conditions ?

    Hi All,
    Is there a possibility in OBIEE to change the headings of the column dynamically depending on the conditions that i keep on the report query ?
    Assume that i am showing an emp table data of one department at a time.
    The column heading of employee name should be like <DEPT>_EMP,  Where <DEPT> is the department on which i was reporting..
    Example:
    Report query : Select * from emp where dept = 'PHYSICS'
    The column heading of employee name should be PHYSICS_EMP.
    Thanks in advance.

    Hello,
    did you try to create a column with the data of dept and put it in a column level of a pivot table?
    In the example that you gave, the column head would show 'PHYSICS' because it's the data filtered at your query. Them, you just edit this column and concatenate the '_EMP' string.

  • How to not select an invoice if a certain line item type is present?

    Hi,
    I've created a report that lists all invoices that have a particular line item type on it.  For example, I wanted to produce a revenue report by item type, "P-Tank". So, the invoice table links to the invoice line items table. Each line item record has a "resource id" on it. The resource id links to the resource type table. So, if invoice #8 has, say, three line items and one of them has a resource type of "P-Tank" then I report on it.  Basically, I'm making a report grouped by Resource ID and the Resource ID must by of Resource Type 1, 2 or 3.  So, this report I've solved.
    Now, I want to report on those invoices that do not have either a resource type 1, 2 or 3 item on it.  If I use a formula:
    "Not ({resource_type.resource_type_id} in [1, 2, 3]) that doesn't work because it just omits the line item that is of resource type 1, 2 or 3....but still leaves the invoice on the report with the other line item types. * I want to identify any and all invoices that do not have either a line item resource type 1, 2, or 3 on it.*
    Any help is much appreciated!
    thx,
    Mark

    Hi Abhilash,
    That didn't seem towork.  I'll simplify the example to see if we can find the answer easier this way.
    I'm using two tables: invoice; and invoice_items
    An invoice can have many items on it.
    I don't want my query to select any invoices that have a Tank item on it (Tank has a resource id = 8).
    So, I'll join the invoice table to the invoice_items table:
    invoice.invoice_id = invoice_items.invoice_id.
    The result set looks like the following:
    Invoice #        Invoice Item #     Invoice Resource ID
    22                              1                               8
    22                              2                               9
    23                              1                               5
    So, because Invoice #22 has a line item with resource id = 8 on it I do not want Invoice #22 to appear on the report at all, regardless of what other items and resource id's are on it.
    I have tried joining the two tables in every manner (e.g. inner, outer, not enforced, enforced, etc) and even when I put the condition, invoice_items.resource_id <> 8, it still brings up Invoice #22 but just omits the one line item and leaves the record with resource id 9 (in the example above).  I don't want Invoice #22 to appear at all in the report.
    Does that help clarify the problem?
    thx,
    Mark

  • Query, dicount on invoice report

    Hello,
    We have some items that are not discountable, so I created on item properties"discountable =yes/no".
    On the invoice report I'd like to have the following:
    Payable until xx.yy.zzzz: EUR XXXXX <sum of amount of discountable items & based upon BP payment terms discount rate and last date>, until xx.yy.zzzz: EUR <total amount and last date without discount>.
    Example:
    Payable until 14.02.2012 EUR 1960,00 (14 days 2%, 30 days Net.), until 28.02.2012 EUR 2000,00.
    I know this is only for the report(paper and screen) and some tables will showup wrong data as the customer pays the discount amount.
    Coresuite installed.
    Thank you
    Marc

    Hi Jitin,
    Thanks for you code sniplet, as you can see I played a bit with the SQL query:
    SELECT
    T0.DocNum AS 'Belegnummer',
    SUM(T1.LineTotal) AS 'Betrag Zeilensumme', T0.DocTotal AS 'Gesamt', T5.Discount AS 'Skontowert',
    (CAST (T0.DocTotal AS money)-(CAST (T0.DocTotal AS money)-(((SUM(CAST (T1.LineTotal AS money)1.1900)/(T5.Discount/100 + 1))+((CAST (T0.DocTotal AS money)/1.1900)-(SUM(CAST (T1.LineTotal AS money))))1.1900)))) AS 'Skontobereinigt'
    FROM
    dbo.OINV T0 FULL OUTER JOIN dbo.INV1 T1
    ON T1.DocEntry = T0.DocEntry
    FULL OUTER JOIN dbo.OITM T2
    ON T2.ItemCode = T1.ItemCode
    FULL OUTER JOIN dbo.OCRD T3
    ON T1.BaseCard = T3.CardCode
    FULL OUTER JOIN dbo.OCTG T4
    ON T3.GroupNum = T4.GroupNum
    FULL OUTER JOIN dbo.CDC1 T5
    ON T4.DiscCode = T5.CdcCode
    WHERE T2.QryGroup1 = (N'Y' )
    GROUP BY T0.DocNum, T5.Discount , T0.DocTotal, T2.QryGroup1
    so how can I get this into my invoice to be Shown like:
    Zahlungskonditionen: 10 Tage abzüglich "T5.Discount/SkontoimGP" EUR "RN Betrag Skontoabzug", 30 Tage Netto
    Thanks Marc

  • SAP QUERY report for vendor line items

    Hi
    I have created a SAP QUERY report for vendor line items with fields vendor no.,vendor name,amount,company code and period.But there is one line item i donot know from wher system is getting it picked with is not in that vedor account,when i compare with fbl1n.I checked the document number too...the same doc number is twice in my query report.One with correct amount and another with wrong one.How do i chk.Where did i go wrong in creating query.I used logical database KDF.
    Please advise.

    i chked...how do we get the amount displayed in query...it just displays amount no debit credit symbol... i have selected BSEG-DMBTR field but no -/+ sign,how is it done in query,please suggest.

  • Report for a selection of items+batch numbers that I would have had on hand

    I would like to run a report for a selection of items and batch numbers that I would have had on hand (only) for September 30th.  I have run the batch numbers report but this gives me all transactions from August 1/09 to September 30/09.

    Hi
    If you need to know quantity onhand ,probably you need to run query against OINM tables but If you are lloking for information then I guess this batch and serial number would be handy ....
    Hope this helps
    Bishal

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • Customer Aging Report Query (without invoices offset by incoming payment)

    Hi All Experts,
    May I know is there any field from JDT1 mention which invoices is already offset by the Incoming payment or AR Credit note? Because I do not want those invoices that already offset by incoming payment appear at the Customer Aging Report. Meaning, the data appear in the Customer Aging Report is only show those invoices that yet to pay by the customer. Kindly give some advise on it. Thanks a lot.
    Thanks and regards,
    Angie Ng

    Hi David,
    Thanks for your suggestion. I have try it, but all of my JDT1.IntrnMatch is in 0 value. Meaning in my situation it is none of any reconcilliation making. But from my SBO window, i manage to see that actually this incoming payment is pay for which invoices. Problem is it is difficult for me to do the possiblity logic that might be happen in my Customer Aging Report Query. Please give some advise that how to show only those invoices yet to pay? The current query will show all the data no matter the invoices or credit memo has been offset.
    select OCRD.cardcode 'Supplier Code',OCRD.cardname 'Name',sysdeb  'Debit GBP',syscred 'Credit GBP',
    case JDT1.transtype
    when '13' then 'INV'
    when '14' then 'AR CN'
    when '24' then 'INCOMING'
    else 'Other'
    end 'Type',
    Ref1,
    fccurrency 'BP Currency',
    CONVERT(VARCHAR(10), refdate, 103)'Posting Date' ,
    CONVERT(VARCHAR(10), duedate, 103) 'Due Date',
    CONVERT(VARCHAR(10), taxdate, 103) 'Doc Date' ,
    CASE
    when (DATEDIFF(dd,refdate,current_timestamp))+1 < 31
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "0-30 days",
    case when ((datediff(dd,refdate,current_timestamp))+1 > 30
    and (datediff(dd,refdate,current_timestamp))+1< 61)
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "31 to 60 days",
    case when ((datediff(dd,refdate,current_timestamp))+1 > 60
    and (datediff(dd,refdate,current_timestamp))+1< 91)
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "61 to 90 days",
    CASE
    when (DATEDIFF(dd,refdate,current_timestamp))+1 > 90
    then
    case
    when syscred= 0 then sysdeb
    when sysdeb= 0 then syscred * - 1
    end
    end "90 + days"
    from JDT1,OCRD where JDT1.shortname = OCRD.cardcode and cardtype = 'c' and intrnmatch = '0'
    ORDER BY OCRD.CARDCODE, taxdate

  • Trouble using an item variable in a report query

    Hi,
    Apex 4.2
    Theme: jQuery Mobile
    I have a page with 2 regions.  An html region with a select list that populates an item called P1_RESIDENT and below that a report region which will show rows dependent on what is selected in the above select list.
    My select list definition is:
    select aka as display_value, id as return_value
      from RESIDENT
    order by 1
    The query in my report is:
    select decode (two_person_lift,'Y','2 Person Lift','1 Person lift') as "2 person lift"
    from resident
    where id = :P1_RESIDENT
    My expectation is the user will select a person from the list and a name will be displayed and P1_RESIDENT will get set with the return_value of id.  The report region will then run and display rows.
    Unfortunately all I am getting in the report region is this:
    &"DECODE(TWO_PERSON_LIFT,'Y','2PERSONLIFT','1PERSONLIFT')".
    What am I doing wrong ?
    Thanks
    Steve.

    Suggest you try to reproduce the problem on apex.oracle.com where we can see it.
    What page, region, and report templates are you using?
    Are you submitting the page on change of the select list, or using a dynamic action to refresh the report? If the latter, provide full details of the DA, and Is P1_RESIDENT specified in the report region Page Items to Submit property?

  • Enhancement Req (v4.0): Report Query- Output Format- Derive from Item

    Brief Introduction
    I have 1 major request I would like to make (and 2 lesser ones). The first, I would like to specify custom available output formats for 'Report Query' objects, as well as Reports Regions, Interactive Reports, etc. I believe that this could easily be an instance setting in the Report Server region of the internal workspace, or per workspace / application. Even if not supported on the system wide level, I would recommend that the "Derived from Item" output format "Return Value" be allowed to be returned unaltered to the Report Server. I know that the type is returned as "_xf", and for my purposes I would REALLY like to be able to get something other than the defaults.
    Use Case
    I am creating a custom JasperReports integration (for which I will be launching a public SaaS beta extremely soon). It uses the standard Apex reporting objects (Queries, Layouts, Print Buttons, etc). JasperReports templates are uploaded as Report Layouts and everything works fine. I am, however, wanting to implement as many output formats as are available to me in Jasper...that means Word 07, Excel 07, ODS, ODT, etc. For the items that take a print server override I can handle this in other ways (even though this appears broken [see below]), but for the standard report queries this isn't available. I would basically like the option to define the set of available output formats for the report server, and what the "_xf" returned for each one is.
    Minor Requests
    - Replace Uploaded Templates: If a template is used often and updated, then it has to be changed everywhere...minor irritation.
    - Customize Report Server URL for the Workspace or Application: For SaaS instances, workspace developers may license or have access to reporting solutions that are not (and should not be) available to all of the Oracle instance's workspaces, or may conflict with a service that is already provided by the instance administrators.
    Broken
    When I use the print server override, with the "Use Headers From" option, it appears that neither my content type, nor my content disposition headers are being sent back to the client. This is the work around solution for the non-standard types issue I am requesting enhancement on, so I would like to know what I can do to get this working immediately.
    Additional Info
    As it stands, if the site is available, feel free to sign up for the beta. The beta keys will be exported soon to the instance and made available. Instructions on setup will also follow:
    https://apex.vendelinc.com/apex/f?p=home

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • Referencing application item in report query

    I can't seem to find documentation on how to do this. I have defined an application item in shared components called APP_LOCATION. I need to reference this item in a report query where clause. This is an sql report, not an interactive report. I have tried:
    select .....
    from ..
    where x.column=:APP_LOCATION
    but this does not work. Can someone help or point me to some documentation on this?

    I found the answer to my own question. The query syntax was correct, but I was not setting the value of the application item.

  • Getting the MDX query select error when running a webi report on BI query

    Getting the following error when running a webi report on BI query :
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[D8JBFK099LLUVNLO7JY49FJKU] }  ON COLUMNS , NON EMPTY [ZCOMPCODE].[LEVEL01].MEMBERS ON ROWS FROM [ZTEST_CUB/REP_20100723200521]  failed to execute with the error Unknown error. (WIS 10901).
    I have gone through many threads related to this error. But not able find the steps to follow for resoultion.
    Please help in this regard.
    Thanks,
    Jeethender

    The Fix Pack is also for Client Tools--it is a separate download.  Please see the text below for ADAPT01255422
    ADAPT01255422
    Description:
    Web Intelligence generates an incorrect MDX statement when a characteristic and a prompt are used.
    The following database error happens: "The MDX query ... failed to execute with the error
    Unknown error (WIS 10901)."
    New Behavior:
    This problem is resolved.
    This information is also available in the Fixed Issues document for any Fix Pack greater than 2.2.

Maybe you are looking for