Accounts Payable Question

Hi everyone,
I have a problem with the following sql: I am getting duplicate rows. Please let me know if any other join codition is missing.
select AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID
     ,AP_INVOICE_DISTRIBUTIONS_ALL.DISTRIBUTION_LINE_NUMBER
     ,count(*)
from AP_INVOICES_ALL
,AP_INVOICE_DISTRIBUTIONS_ALL
,GL_SETS_OF_BOOKS
,AP_AE_HEADERS_ALL
,AP_AE_LINES_ALL
where AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID = AP_INVOICES_ALL.INVOICE_ID AND
AP_INVOICE_DISTRIBUTIONS_ALL.SET_OF_BOOKS_ID = GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID AND
AP_AE_HEADERS_ALL.AE_HEADER_ID = AP_AE_LINES_ALL.AE_HEADER_ID AND
AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_DISTRIBUTION_ID = AP_AE_LINES_ALL.SOURCE_ID AND
AP_AE_LINES_ALL.SOURCE_TABLE = 'AP_INVOICE_DISTRIBUTIONS'
and ( (AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE >= '01-JAN-1990' AND
AP_INVOICE_DISTRIBUTIONS_ALL.LAST_UPDATE_DATE <= '01-JAN-2007')
OR (AP_INVOICES_ALL.LAST_UPDATE_DATE >= '01-JAN-1990' AND
AP_INVOICES_ALL.LAST_UPDATE_DATE <= '01-JAN-2007'))
group by AP_INVOICE_DISTRIBUTIONS_ALL.INVOICE_ID, AP_INVOICE_DISTRIBUTIONS_ALL.DISTRIBUTION_LINE_NUMBER
having count(*) > 1

That's odd..
Is this query returning duplicat rows also ?
select a.invoice_distribution_id,b.CODE_COMBINATION_ID,count(*)
from
ap_invoice_distributions_all a,
ap_ae_lines_all b
where
a.INVOICE_DISTRIBUTION_ID = b.SOURCE_ID AND
b.SOURCE_TABLE = 'AP_INVOICE_DISTRIBUTIONS'
and b.ae_line_Type_code = 'CHARGE'
group by a.invoice_distribution_id,b.CODE_COMBINATION_ID
having count(*) > 1

Similar Messages

  • Accounts Payables Question

    Hi SAP Gurus,
    Can anyone brief me one real time business scenerio in AP/AR.
    Thanks

    Hi,
    You have several things to remember for the interview.  Please pay attention to the Business process that you have done under each. I am just giving you example. A/R
    You must have done the OTC (order to Cash), this is where the sales  requisition takes to the sales order, Cr the inventor and debit the COGS and  P2P, where the PO is generated, when PO is posted, When GR is posted (OBYC), when Inv is posted, pmnt made to vendor etc,  How is the EBS and Lock box set is done, It is done for recvng and for payng. What kind of tolerances are there and how to set up.
    A/P
    How to do confi auto pay, what is F110 run, F111 run, what is BAI and BAI2 format and the differences between them. What is Mt940 format, how to configur them, What are payment types & to configur to pay differently, setting the bank master. Remember the inportant tables in each process and how the data is stored and what are the technical names for those fields.
    A/A
    should the master data config, how to set the depreciation run, how to change the Fis yr in AA,
    And then you should know the month end /Yr end reports.
    Good luck.

  • R12 - Accounts Payable & PO Accrual Reconciliation Report - write offs

    Hi,
    As a relative novice to Oracle I need some help.................
    My question regards the above which is essentially a "goods received not invoiced" report.
    I have a number of items on the report which I would like to write off for two reasons:
    (1) I have a small balance left which is basically the difference between the PO and the accounts payable column - in the region of 1p to 5p (therfore a housekeeping exercise)
    (2) Items that we've never received an invoice for (we've received the stock for free!). ie there is only an entry in the PO column of the report.
    For the above I would like a method of writing off these balances from the report.* This should therefore create a credit in my P&L account.
    Your thoughts please.
    Thanks in advance.
    Jon

    This is the forum for the SQL Developer tool. You need to ask your question in an eBusiness suite forum.

  • Creating a Vendor and Accounts Payable  Invoice

    Hello Everyone,
    At the moment we are using transaction FK01 or XK01 to create a Vendor on the SAP system. We want the process of "Creating a Vendor" and "Creating Accounts Payable Invoice" to be available on Portal which allows us to automate some part of our business process.
    Could anyone suggest me a proper approach for this requirements. I would appreciate your help. It is a bit urg*nt.
    Regards,
    PG.

    I would check in SE37 to see if there is any other BAPIs. Alternatively you could debug the transaction in R/3 to see which function modules it uses. It's possible that there is no BAPI, but there is a non RFC function module for creating a vendor. In that case, you can create a "wrapper" for it, ie your own function module that is rfc enabled and that simpley forwards the call internally to the function module that creates the vendor.
    I would also search the ABAP forums to find out if there are any function modules that provide this operation. If you don't find any threads you can try posting a question. It's best to post questions concerning BAPIs and function modules in the ABAP forums (or related forums).
    Failing all this or if none of the above fits your requirements, you could create your own BAPI to perform this operation. But 9/10 there is a standard function module to perform most operations. Don't worry if it's not rfc enabled like a BAPI, just create a wrapper around it.
    Cheers,
    Dion

  • SRKIM: R12: Accounts Payable Trial Balance issue troubleshoot

    Purpose
    R12 에서 AP Trial Balance Report 확인 시 데이터가 비정상적일 경우 check 해야 하는 내용에 대해 확인 해 보도록 한다.
    Question
    R12 에서 invoice 생성 후 gl 로 transfer 하였으나 ap trial balance report 의 데이터가 비정상적인 것으로 확인 된다.
    어떤 내용을 확인 해야 하는가.
    Answer
    1. APList Diagnostics Script 을 해당 invoice 에 대해 수행 하여 아래의 내용을 확인한다.
    - Accounting 이 생성되어 gl로 모두 transfer 되었는지 여부.
    - Accounting Date 가 Trial Balance Report 의 start date 와 as of date 안에 포함 되는지 여부
    2.위의 내용에 문제가 없다면 아래 sql 로 데이터를 확인 해 보도록 한다.
    select *
    from xla_trial_balances
    where source_entity_id in (
    select entity_id
    from xla.xla_transaction_entities xte
    where application_id = 200
    and (
    (entity_code = 'AP_INVOICES' and source_id_int_1 in (&invoice_id))
    OR
    applied_to_entity_id in (
    select entity_id
    from xla.xla_transaction_entities xte
    where application_id = 200
    and (
    (entity_code = 'AP_INVOICES' and source_id_int_1 in (&invoice_id))
    3.GL 에 실제 해당 데이터가 존재 하는지 아래 sql 로 확인 해 보도록 한다.
    SELECT distinct aeh.*
    FROM gl_je_lines gjl, GL_IMPORT_REFERENCES gir, gl_je_headers gjh, GL_JE_BATCHES gjb, XLA_AE_LINES
    ael,
    XLA_AE_HEADERS aeh, XLA_EVENTS aea, xla.xla_transaction_entities xte
    WHERE ael.gl_sl_link_id = gir.gl_sl_link_id
    and gjh.je_batch_id= gjb.je_batch_id
    and gjl.je_header_id = gjh.je_header_id
    and gjl.je_header_id = gir.je_header_id
    and gjl.je_line_num = gir.je_line_num
    AND gir.gl_sl_link_table in ('XLAJEL')
    and ael.gl_sl_link_table in ('XLAJEL')
    AND aea.application_id = 200
    AND aea.event_id = aeh.event_id
    AND aeh.ae_header_id = ael.ae_header_id
    AND gjb.je_batch_id = gir.je_batch_id
    and xte.application_id = 200
    and xte.entity_id = aea.entity_id
    and gjh.je_header_id = gir.je_header_id
    and gjh.je_source = 'Payables'
    and (
    (xte.entity_code = 'AP_PAYMENTS' and xte.source_id_int_1 = &check_id)
    OR
    (xte.entity_code = 'AP_INVOICES' and xte.source_id_int_1 = &invoice_id)
    SELECT distinct gjl.*
    FROM gl_je_lines gjl, GL_IMPORT_REFERENCES gir, gl_je_headers gjh, GL_JE_BATCHES gjb, XLA_AE_LINES
    ael,
    XLA_AE_HEADERS aeh, XLA_EVENTS aea, xla.xla_transaction_entities xte
    WHERE ael.gl_sl_link_id = gir.gl_sl_link_id
    and gjh.je_batch_id= gjb.je_batch_id
    and gjl.je_header_id = gjh.je_header_id
    and gjl.je_header_id = gir.je_header_id
    and gjl.je_line_num = gir.je_line_num
    AND gir.gl_sl_link_table in ('XLAJEL')
    and ael.gl_sl_link_table in ('XLAJEL')
    AND aea.application_id = 200
    AND aea.event_id = aeh.event_id
    AND aeh.ae_header_id = ael.ae_header_id
    AND gjb.je_batch_id = gir.je_batch_id
    and xte.application_id = 200
    and xte.entity_id = aea.entity_id
    and gjh.je_header_id = gir.je_header_id
    and gjh.je_source = 'Payables'
    and (
    (xte.entity_code = 'AP_PAYMENTS' and xte.source_id_int_1 = &check_id)
    OR
    (xte.entity_code = 'AP_INVOICES' and xte.source_id_int_1 = &invoice_id)
    4.위의 sql 을 통해 Trial Balance Table 의 데이타가 잘 못 생성 되었음이 확인 되면 해당 Trial balance table 의 데이타를 recreate 하는 작업을 수행 해야 한다.
    Reference
    Note. 553484.1 - THE R12 ACCOUNTS PAYABLE TRIAL BALANCE DATA IS
    INCORRECT/WRONG

    Follow the below steps and Run the Trial Blance and let me know if it helps.
    Thanks
    Girish
    How to Rebuild Trial Balance Data (repopulate XLA_TRIAL_BALANCES)
    1. Navigate: Payables Responsibility > Setup > Accounting Setups > Subledger Accounting Setups > Open Account Balances Listing Definitions
    2. Query up your Report Definition: select Defined By = Accounting Flexfield or Segment (whichever applies in your case), click “Go”
    3. Click on Update icon in the "Actions" column – the definition's update page opens.
    4. "Touch" the definition by simply clicking "Apply" button (without making any change).
    This should start the “Open Account Balances Data Manager” concurrent processes

  • Accounts payable: Reconciliation field(s)

    Dear all,
    I have posted the same thread in the Materials Management forum as I am not sure where it belongs. As I am not very familiar with vendor payments, I hope you can help me with this question.
    As per our accounts payable department, when they send a check to a vendor, they need to reference the payment with the bill of lading number.
    But the bill of lading is not available in the payments standard transaction: F110. So I was wondering: which field(s) (which are printed on the check) are usually used by vendors for payments reconcialiation?
    Thanks,
    Annabelle

    Hi Annabelle,
       When you enter an invoice with reference to a purchase order, the system suggests data from the purchase order and the goods receipts against the PO (for example, vendor, material, quantity still to be invoiced, expected amount per item, and terms of payment). You can overwrite these default values if the invoice actually submitted by the vendor contains other values. The system checks whether your input is allowed. In doing so, it may issue warning or error messages.
    You can also assign the invoice items to a purchase order using the number of the delivery note or bill of lading, provided that these numbers were entered at the time of goods receipt.
    With Regards
    Srinivas

  • Accounts Payable Contact

    After spending quite sometime with various costumer service representatives this morning I was told I need to contact Accounts Payable. They gave me what looks like an employee's email address, which i contacted but have had no reply.
    The issue pertains to a large purchase I made for a non-profit whose tax-exempt status was not provided at time of purchase. How can I get in contact with someone at accounts payable about this? 

    Hi joeamelendez,
    Please call 
    AR at 1-866-426-4004 and follow the command prompt.
    Best regards,
    Bgriffin2
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Account payable,account receivable, asset account

    HI sir /madam
             i want to know the process of ACCOUNT RECEIVABLE, ACCOUNT PAYABLE,ASSET ACCOUNT what ficos consultancy do, what are steps in fico do other then mm and sd person do.
    i want to know the only fico job in in this process AP,AR,AA.
    please guide me what they role in that

    Hi,
    Welcome you post on the forum.
    However, you need do you homework first. Your question does not belong here. Search the whole SCN site for wiki, e-learning first to find the basic info.
    This forum is dedicate to SAP Business One - one package for all solution for SME customer. There is no individual module for FI CO SD MM etc.
    Thanks,
    Gordon

  • Account payable: Reconciliation field(s)

    Dear all,
    As I am not very familiar with vendor payments, I hope you can help me with this question.
    As per our accounts payable department, when they send a check to a vendor, they need to reference the payment with the bill of lading number.
    But the bill of lading is not available in the payments standard transaction: F110. So I was wondering: which field(s) (which are printed on the check) are usually used by vendors for payments reconcialiation?
    Thanks,
    Annabelle

    Hi Annabelle,
       When you enter an invoice with reference to a purchase order, the system suggests data from the purchase order and the goods receipts against the PO (for example, vendor, material, quantity still to be invoiced, expected amount per item, and terms of payment). You can overwrite these default values if the invoice actually submitted by the vendor contains other values. The system checks whether your input is allowed. In doing so, it may issue warning or error messages.
    You can also assign the invoice items to a purchase order using the number of the delivery note or bill of lading, provided that these numbers were entered at the time of goods receipt.
    With Regards
    Srinivas

  • CREATE DUPLICATE STUB ACCOUNTS PAYABLE CHECK

    using crystal reports 2008
    i want to print an accounts payable check that prints the check on the top and has two stubs showing the invoices that are being paid.  How do i duplicate the detail section? also is there a way to limit the number of invoices in the detail section? ie. i only can fit 12 records on each check stub.
    i am getting the data from two tables, a check header and check detail .

    A few questions...
    1) What kind of database are you using?
    2) How are the 2 stubs laid out? Next to each other (side by side) or one on top of the other?
    3) How are the invoices numbered in the Check Detail table?
    4) If there are more than 12 invoices for a payee, how do you want those handled? Do they go on a separate check to the same payee?... or are they all included in the 1st check and the over flow is printed on a new page with a blank check at the top?
    Jason

  • How to find Account Payable Accounted Status

    Dear All,
    I need to find the Account Payable invoice screen contain general table contain field 'ACCOUNTED' how to find this field in database.
    Regards

    Check for invoice approval status
    select ap_invoices_pkg.get_approval_status(
                                                         ai.invoice_id
                                                         , ai.invoice_amount
                                                         , ai.payment_status_flag
                                                         , ai.invoice_type_lookup_code
                                                        ) approval_status
    from ap_invoices_all              ai
    where 1=1
    and ai.invoice_num = <your_invoice_num>In R12 AP_INVOICES_UTILITY_PKG.get_approval_statusCheck for Invoice distribution status
    ap_invoices_pkg.get_posting_status(ai.invoice_id)If this returns 'Y', then It is 'Accounted'. If this returns 'P' then 'Partial'
    Refer the following MOS note.
    Where Is The Invoice Validation Status Stored? How Is The Invoice Validation Status Determined? [ID 301806.1]
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.

  • 'Account Payable Checks Format'

    Hi all
    can any one have study material for 'Account Payable Checks Format'...using tcode F-58, F110, FBZ5,..etc. Internally all transaction calling RFFOUS_C by variance....
    thnx....
    R.K.

    goto se38, give RFFOUS_C  select documentation radio button, it will give you all details.
    close the thread if your question is answered.
    regards,
    sairam

  • Sap report purchasing and accounts payable

    Dear gurus,
    I intend to create a vendor payment report that would create clarity on the operations in purchasing and accounts payable.
    Which tables would be idea to create such report?
    BR,
    Tolu

    (Only some of the most important tables)
    For MM purchasing, check
    - EKKO     Purchasing Document Header
    - EKPO     Purchasing Document Item
    - EKBE     History per Purchasing Document
    - EKKN     Account Assignment in Purchasing Document
    (Also look at logical database BRM, EBM, ECM, EKM, ELM, EMM, ENM, ERM, EWM,MEPOLDB, PSJ   definitions)
    For FI-AP financial account payable
    - BKPF     Accounting Document Header
    - BSEG     Accounting Document Segment
    - BSIK     Accounting: Secondary Index for Vendors
    - BSAK     Accounting: Secondary Index for Vendors (Cleared Items)
    - BSIS     Accounting: Secondary Index for G/L Accounts
    - BSAS     Accounting: Secondary Index for G/L Accounts (Cleared Items)
    - BSIM     Secondary Index, Documents for Material
    (Also look at logical database BMM, BRF, BRM, KDF definitions)
    Regards,
    Raymond

  • AP Invoice Aging Report by GL Date (using: Accounts Payable Trial Balance)

    Hi
    Need some suggestions:
    I need to develop a custom report in (R12).
    Account Payable Trial Balance Report, does have the capability to run as of a particular date but it does not show aging buckets. This custom report is to be developed to meet the requirements from a Payables detail perspective as well as to reconcile.
    The report should show the balance due as of the report date selected. If As of Date = 5/31/11, then when the report is run on 6/15/11, it gives the results as it existed on 5/31/11. If we run it again on 8/31/11 for As of Date = 5/31/11, and again on 1/13/12, we get the EXACT SAME results each and every time except for the following fields: Current Status, Date Paid and Payment Reference Number.
    The end result should be this report ties to the penny to Oracle GL as of the date selected EXCEPT for any JEs posted to the account.
    Thanks
    Pravin

    Hi Pravin,
    For all transactions in Oracle, you will have GL dates (Accounting Dates) associated to it. If you use this date in your query to filter data, then you will get correct aging data as on a given date.
    To tally with GL, you also must check if the selected transaction has been accounted?
    Raajkumar G

  • Accounts payable report with PO reference - FBL1N

    Hi
    I need to see a report on accounts payable with the display of PO, profit center. I see report FBL1N wherein PO reference, profit center is not displayed even though selection field is there in the layout. kindly help me out.

    Hello,
    Hope this article really helps you.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f6b256-23be-2b10-8b93-cad83a617634
    Regards,
    Ravi

Maybe you are looking for