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

Similar Messages

  • Tax Conditions for Sales and Distribution using Jurisdiction Code in Canada

    Hello everyone,
    I would like to share with you a doubt relating taxes for Sales and Distribution in Canada.
    The Tax conditions for Sales and Distribution in Canada are the CTX1 (GST - Canada), CTX2 (PST - Canada) and CTX3 (Base + GST). These are the Tax Conditions which appear when creating a Material or a Client for the Canada Region, and are also the ones included in the Canada Standandard Pricing Procedure.
    I tried to apply the standard method of creating a Master Record for these conditions, but an error relating the Jurisdiction Code came out while releasing to accounting.
    Does anyone one how to procceed? Which are the important issues with Finance Accounting to take in to account?
    I would really appreciate any comment relating this issue.
    Thank you very much in advanced.
    Víctor

    Dear Mr. Lakshmipathi,
    In first place, thank you very much for your quick response.
    I have tried many different procedures to get the aim, and among others, a new access sequence was created to allow the introduction of the Jurisdiction Code (UTXJ is not available for Sales Conditions) but once the Condition is created, it is not recognized when creating the Order ("pricing error: Mandatory condition CTX is missing"). Maybe it has something to do with the fact that these conditions are not included in the Finance Accounting Tax Procedure, where the conditions, which represent the same taxes but with different condition names, are defined for a certain Tax Code and Jurisdiction code.
    Among the different SAP notes for the error relating the Jurisdiction code, there was one proposing to change the Condition Category from "D" (Taxes) to a value between "1 and 4". By doing this a new error appears while creating the order, saying that there are conditions in the Tax procedure (JRC1, JRC2)which are not included in the Sales Pricing procedure. By including this conditions in the Pricing procedure, the Tax Conditions existing in the Finance Accounting Tax Procedure are brought to the Order Conditions, in addition to the Sales Tax Conditions. And there is something more, each Tax Condition from the Finance Accounting Procedure appears twice, one with the application V (Sales) with value zero, and one with application TX (Taxes) with the value existing in the Finance Accounting Taxes Procedure. This is how at the end, the corresponding %value of the taxes is brought to the Invoice with the correct Tax Code, and the proper Jurisdiction Code, which is different for each condition.
    Thank you very much for your time.
    Víctor Liedo

  • Billing block for invoices and credit notes on Sold-tou00B4s level

    Hi All
    can we have billing block for invoices and credit notes on Sold-to´s level.
    please advice.
    Thanks
    Tushar

    Hi
    The bellow way at document level.
    One more way to maintian the billing block in the functionality of sales document types in VOV8
    In VOV8 , Maintain proper value in billing block field.
    So that , when you create the order or credit memo request system automatically pick the billing block.
    Once remove the block of billling then only system allow to create the billing or credit memo.
    Thanks,
    KP
    Edited by: phanik2503 on Mar 2, 2010 6:46 AM

  • Req. settings in R/3 for Sales and Distribution

    Hi Friends,
        Do we need to do any settings in R/3 for Sales and Distribution implementation?. If so please give me some info.
    Regards
    RogerS

    Hi,
    1) Select the industroy sector before filling the set up table. This is one time activity. You can do it in SBIW tcode of R/3. For more information search the forums with "Industory Sector"
    2) Make a tick for BW in tcode BF11 in R/3 . For more information search the forums with BF11.
    3) Other activies are common as like as ny other LO Datasources.
    With rgds,
    Anil Kumar Sharma .P

  • Modification for ECS for invoice and ASN functionality in SUS

    Hello Experts:
    Currently I am implementing SRM 5.0 with SUS integration in ECS. I have found some references that specify that if my requirement is to have the creation of Invoices and ASN in SUS, in order to transfer these to EBP I need to do some development on my own. I have to questions regarding this:
    1.- The references only talks about Materials, is it possible to do this kind of implementation also for Invoices and ASNs of Services??
    2.- Any of you could provide me with some general steps of the activities to be done in order to accomplish this requirement if I am using XI.
    Thanks for all the information you can provide me.
    Hugo

    Hi
    SRM-SUS integration is mainly used for service procurement where the document flow is PO> PO Response> Confirmation/Service Entry-->Invoice.
    ASN doesn't carry any meaning for service procurement. You might use ASN if you are procuring direct materials.This is covered by MM-SUS integration.
    Also pl. remember that SRM-SUS integration with ECS scenario is supported only to a limited extent by SAP. This means that your SUS confirmations when they come to SRM do not get replicated to ECC backend.
    Thanks
    Sanjeev

  • To build some Custom reports for Sales and Distribution

    I want to build some Custom reports for Sales and Distribution.
    I do not know how to do that.
    I reviewed lots of threads earlier, but couldnt understand how to do that.
    If any one can send me suitable step by step guide, I will really appreciate it.
    Or send me some link or some documents with couple of nice exampples of how to do that.
    Which setting to make in B  ex and everything.
    I am new to BI.
    Please advise.
    Points will be awarded

    Hi,
    Could you be more specific about your requirement. I could understand that you wanted to know what all are the Customer sales reports could be provided in SD.
    Generally irrespective of projects few reports are considered as baseline reports for any SAP implementations.
    For example: 1. Order intakes daily
                          2. Order intakes monthly
                          3. Order magin (daily,monthly)
                         4. Order analysis.
    Best regards.

  • Looking for Implementation Guide for Sales and Distribution

    From where can I download "Implementation Guide" for Sales and Distribution or can anybody mail me the guide?
    Thanks in advance for the answers.

    HI
    REFER BELOW LINK DOWNLOAD
    <a href="http://sapbrainsonline.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html">SD (Sales and Distribution) Tutorials</a>
    <a href="http://www.esnips.com/_t_/SAP+SD">SAP SD</a>

  • PAAPINVW -- how to fetch values for invoice line level details

    My requirement is such that we define one of our account segments at invoice line dff's while creating the invoice against a project. So the ccid would need to driven from this invoice line dff, to be complete and valid.
    Project Supplier Invoice Account Generator (PAAPINVW) has already defined attributes for Invoice Header DFF's and Invoice Distribution level DFF's; but Invoice line level DFF's have not been defined.
    Also there are no attributes that would help me query the invoice line to fetch these details.
    Working on this workflow in R12. Has anyone tried to fetch any sort of details from invoice lines, using any existing attributes in PAAPINVW; or has anyone done something in accordance to this??
    Looking for suggestions.. have anyone faced a similar situation before??

    Hi user;
    Pelase check below note cause and solution part please,which at least can gives u some ideas
    Projects Supplier Invoice Account Generation Error: APP-SQLAP-97734: The System Cannot Generate Distributions [ID 823787.1]Regard
    Regard
    Helios

  • Query for A/R payment details

    I would like to query the business one database for all of the payment details (what invoice(s)...) were paid on a specific check.  It would sound something like this:
    I can't seem to find the tables involved.
    select (all detail records where payment applied) where check number = 'X'
    I can find the check number and amount, but can not find how it is linked to invoices and/or credit memos.
    Thanks in advance, Sam

    The tables that may want to query are ORCT, RCT1 and RCT2.
    See the SQL example below
    SELECT T1.[DocNum] AS 'Payment Number', T1.[DocDate] AS 'Payment Date',
    T0.[CheckNum] AS 'Check Number', T0.[CheckSum] AS 'Check Amount',
    T0.[BankCode] AS 'Account No.', T3.[DocNum] AS 'Invoice No', T2.[SumApplied] AS 'Paid to Invoice'
    FROM  [dbo].[RCT1] T0  INNER  JOIN [dbo].[ORCT] T1  ON  T1.[DocNum] = T0.DocNum 
    INNER  JOIN [dbo].[RCT2] T2  ON  T2.[DocNum] = T1.DocNum
    INNER  JOIN [dbo].[OINV] T3 ON T3.DocEntry = T2.DocEntry
    Suda

  • Doubt on SQl query for invoices

    Hi All,
    I have a query which pulls the payment proposal for the standard invoices and credit memo's
    being posted into the system from the table BKPF and BSIK.
    I just want to pull the payment proposal for standard invoices rather than credit memo's.
    I found that the only difference is the field SHKZG i.e Debit/Credit indicator.
    But i also want to see if it impacts subsequent Debit and Subsequent Credit since
    i see these value in Value range of the field.
    thanks,

    Hello ,
    if  Credit\ debit  info is required you have to use BSEG and VBSEGK for items details for the header
    BKPF ,
    Regards,
    Kiran Kumar

  • SQL-Query - AR Invoice and related AR Down Payment Invoices

    Hello everybody,
    I want to show all AR Down Payment Invoices related to a given AR Invoice, i.e. a query approximately in this form:
    SELECT
    T0.DocNum AS 'Invoice',
    T0.DocDate AS 'Invoice Date',
    T0.DocTotal AS 'Open Amount',
    T1.<<DocNum>> AS 'Down Payment Invoice',
    T1.<<DocDate>> AS 'Down Payment Invoice Date',
    T1.<<Amount>> AS 'Down Payment Invoice Amount'
    FROM
    OINV T0 INNER JOIN <<Down Payment Invoices>> T1
    ON T0.DocEntry = T1.<<DocEntry>>
    WHERE
    T0.DocNum = xxxxx
    I want to know if such a table <<Down Payment Invoices>> exists and what its name is.
    Thanks for your help!
    Regards,
    Frank Romeni

    Thanks for the INV11 - but this table seems to be empty even for invoices we have related down payments, e.g.
    SELECT
    T0.DocNum, T0.DocTotal, T1.<<whatever you want>>
    FROM
    OINV T0 LEFT OUTER JOIN INV11 T1
    ON T0.DocEntry = T1.DocEntry
    WHERE
    T0.DocNum = xxxxx
    That INV11 is always empty I could see with SELECT * FROM INV11
    Regards
    Frank Romeni
    P.S.: I only post questions to this forum when I analysed my problems and only if I couldn't find any further information in the helpfiles. With regard to your first hint to ODPI there is no reference to INV11 in the helpfiles.
    With regard to your comments I feel impelled to to say that if my question is confusing you, then it seems that nobody has ever taught you that meaning can be taken from the context. Regarding the "street", you asked me to find something: Do not waste your time with talking precociously ...
    If you should feel annoyed by my comments, we'd better stop this conversation. Otherwise let us fall back to a strictly factual exchange of information, OK? I am not willing to discuss this any further!
    F.R.

  • BW for Sales and Distribution.

    Hi All,
    Can you please provide me some insights into Sales and Distributions and Pricing.
    I would like to know the functional aspects of Sales and Distribution.
    Please provide me inputs regarding the functionalities of SD and Pricing.
    Thanks in Advance,
    Sravani
    Edited by: sravani kandy on Jun 7, 2008 8:02 PM

    Hi,
    SD Process Flow
    the sales documents you create are individual documents but they can also form part of a chain of inter-related documents. For example, you may record a customeru2019s telephone inquiry in the system. The customer next requests a quotation, which you then create by referring to the inquiry. The customer later places an order on the basis of the quotation and you create a sales order with reference to the quotation. You ship the goods and bill the customer. After delivery of the goods, the customer claims credit for some damaged goods and you create a free-of-charge delivery with reference to the sales order. The entire chain of documents u2013 the inquiry, the quotation, the sales order, the delivery, the invoice, and the subsequent delivery free of charge u2013 creates a document flow or history. The flow of data from one document into another reduces manual activity and makes problem resolution easier. Inquiry and quotation management in the Sales Information System help you to plan and control your sales.
    Transaction Codes:
    Inquiry - VA11/VA12/VA13
    Quotation - VA21/VA22/VA23
    Sales Order - VA01/VA02/VA03
    Delivery - VL01N/VL02N/VL03N
    Billing/Invoicing - VF01/VF02/VF03
    Refer
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCSD/CAARCSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSD/BCBMTWFMSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOLISPLN/LOLISPLN.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/92/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapsd.htm
    http://www.sap-img.com/sap-sd.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    Hope this helps.
    Thanks,
    JituK

  • VACANCIES FOR OPM AND DISTRIBUTION

    Hi,
    We have positions available for the following functional consultants:
    Soltre Technology, Inc., an RCM Technologies Company, is an Oracle Certified Advantage Partner specializing in implementation and outsourcing of Oracle applications.
    POSITION SUMMARY:
    Soltre Technology, Inc. is seeking an Oracle Process Manufacturing (OPM) Functional consultant for a position in our Los Angeles, California office
    DUTIES AND RESPONSIBILITIES:
    •     Support implementation of Oracle Process Manufacturing Inventory.
    •     Document, validate, and test business process functionality in the OPM environment.
    •     Identify and implement process improvements increasing organizational capabilities.
    EXPERIENCE:
    Qualified candidates will have 4 years of Oracle Process Manufacturing Inventory functional experience.
    MINIMUM QUALIFICATIONS:
    •     Strong background in Process Manufacturing Inventory (OPM) Functional implementation and support methodologies.
    •     Excellent interpersonal communication and organizational skills to work with clients and team members.
    •     Ability to effectively obtain, analyze and convey information.
    •     Proficiency with Microsoft office tool set (e.g. Word, Excel, etc.).
    POSITION SUMMARY:
    We are currently seeking an Oracle Distribution Functional consultant for a position in our Los Angeles, California office.
    DUTIES AND RESPONSIBILITIES:
    Support the following modules of Oracle Distribution:
    •     Order Management
    •     Advanced Pricing
    •     Incentive Compensation
    •     Accounts Receivable
    •     Advanced Collections
    •     Document, validate, and test business process functionality in the Distribution environment.
    •     Identify and implement process improvements increasing organizational capabilities.
    EXPERIENCE:
    Qualified candidates will have 4 years of Oracle Distribution functional experience.
    MINIMUM QUALIFICATIONS:
    •     Order Management, Advanced Pricing, Incentive Compensation, Accounts Receivable Advanced Collections
    •     Strong background in Distribution Functional implementation and support methodologies.
    •     Excellent interpersonal communication and organizational skills to work with clients and team members.

    Hi,
    SD Process Flow
    the sales documents you create are individual documents but they can also form part of a chain of inter-related documents. For example, you may record a customeru2019s telephone inquiry in the system. The customer next requests a quotation, which you then create by referring to the inquiry. The customer later places an order on the basis of the quotation and you create a sales order with reference to the quotation. You ship the goods and bill the customer. After delivery of the goods, the customer claims credit for some damaged goods and you create a free-of-charge delivery with reference to the sales order. The entire chain of documents u2013 the inquiry, the quotation, the sales order, the delivery, the invoice, and the subsequent delivery free of charge u2013 creates a document flow or history. The flow of data from one document into another reduces manual activity and makes problem resolution easier. Inquiry and quotation management in the Sales Information System help you to plan and control your sales.
    Transaction Codes:
    Inquiry - VA11/VA12/VA13
    Quotation - VA21/VA22/VA23
    Sales Order - VA01/VA02/VA03
    Delivery - VL01N/VL02N/VL03N
    Billing/Invoicing - VF01/VF02/VF03
    Refer
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCSD/CAARCSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSD/BCBMTWFMSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOLISPLN/LOLISPLN.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/92/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapsd.htm
    http://www.sap-img.com/sap-sd.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    Hope this helps.
    Thanks,
    JituK

  • How to Removed VAT during DTW upload for Invoices and Credit Notes

    Hi Experts
    Please help.
    Every time I import AR Invoice and  Ar credit Notes there is an automatic posting to VAT  even if the template has the same price after VAT and zero discount.
    How to removed this?
    Regards,
    Sandra

    Hi Julie
    As requested. The SO is VAT code for nonvat or zero vat
    As requested
    Header
    RecordKey     DocEntry     CardCode     CardName     Comments     DiscountPercent     DocCurrency     DocDate     DocDueDate     DocNum     DocRate     DocTime      DocTotal      DocType     JournalMemo     NumAtCard     Reference1     Reference2     Series     TaxDate
    1     TRUE     MC002 A     ABENSON INC.                    20090930     20060428          1           13,950.0000      dDocument_Service       OB AR Invoices 09.30.09     SI#044792          SI#044792          20060227
    Lines/Details
    RecordKey     LineNum     AccountCode      LineTotal      VatGroup
    RecordKey     LineNum     AccountCode      LineTotal      VatGroup
    1          392000000     13,950.00      SO
    Regards,
    Amy

  • Query for duplicate UDF on detail table

    Hi,
      我開了一個 UDF 在PCH1來存放非正規定單號碼( 此號碼並非 OPCH的Docnum), 在同一筆主檔下此號碼會出現在不同子紀錄內.因此有可能在同一主擋下同一號碼的UDF會出現多次.現在我希望能寫個QUERY去找出不同主檔的相同UDF後列出主檔的Docnum.
    For Example, OPCH 12465, 存放 Detail Item 在 PCH1 的 UDF 屬於 BE-1234的子紀錄數筆. 之後 OPCH 12700 又存放 BE-1234
    的紀錄.我希望你有個 query 能找出 OPCH12465 以及12700.我試著用 group 但是記錄會顯示出有多筆相同UDF但主檔卻是一筆的紀錄.
      I hope somebody can help.
    Thanks

    Gordon,
      Thanks a lot, original I wrote a query like you gave to me, but still has problem. the result will like this,
    UDF            DocNum         Count
    BE-1001      12365             3
    BE-1006      12454             4
    BE-1006      12466             3
    BE-1009      12512             2
    I need UDF display more than 1 time but DocNum is different. like this result, I need query show BE-1006 and different Docnum, I don't need system show others but DocNum has 1 time only.
    Thanks

Maybe you are looking for