?
Solved

AP & AR module query

Posted on 2004-04-27
5
Medium Priority
?
2,447 Views
Last Modified: 2012-06-27
I need a query of the following:

Invoices generated in December 1  through March 1
 
Based on a ship to of:
New Jersey
Texas

The query should contain the following:
Invoice Number
Date
G/L Tax Liability Account
Amount of Invoice
Amount of Tax charged

Can somebody pls help me getting this query done. I'm getting Invoice ID, Amount and Date from AP_INVOICES_ALL,  i hope "ship to" will come from "RA_CUSTOMERS", but donno how to join them. Am I looking into correct tables.

Your help is appreciated.
webservices23@yahoo.com


0
Comment
Question by:manojgh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:phake123
ID: 10936070
show your table relations  (the columns for AP_INVOICES_ALL and RA_CUSTOMERS)

Im making a few assumption but you can apply the changes yourself or ask again

SELECT a.[Invoice Number], a.[Date], a.[Acct], a.[Invoice Amount], a.[Tax Amount], b.[CustomerID], b.[City]
FROM  AP_INVOICES_ALL as a INNER JOIN RA_CUSTOMERS as b
ON a.CustomerID = b.CustomerID
WHERE (b.date between #12/01/03# and #3/1/03#) and (b.city = 'New Jersey' or b.city ='Texas')


The code above assumes the CustomerID column are both present in the RA_CUSTOMER, AP_INVOICES_ALL table.  They are both linked as one-to-many relation.  The query will pull out all invoices related to a customer and where the customers city is either "new jersey" or "texas".  It also narrows the data down more by only selected the records where the invoice date is between 12/01/03 - 3/1/03

-Mike
0
 

Expert Comment

by:sydfaisal
ID: 10937139
Plz explain your both tables structure

From,
 Syed Faisal
0
 

Author Comment

by:manojgh
ID: 10948905
Thanks Mike.

I'm sorry about the way the Question was put. This Query has to come only from AR module of Oracle Apps 11i. So, the AP_INVOICES_ALL will NOT come in the picture. I'm using APPS.RA_CUSTOMER_TRX A, APPS.RA_CUSTOMER_TRX_LINES B
, APPS.RA_CUST_TRX_LINE_GL_DIST C, APPS.RA_COSTOMERS D.

Let me know if you have any questions.



0
 
LVL 1

Accepted Solution

by:
arora_ashish earned 100 total points
ID: 11025494
Manoj,

If you are matching invoice with PO then you can join ap_invoice_distributions_all with po_distributions_all on po_distribution_id column and po_distributions_all table with po_line_locations_v on line_location_id.

In the where clause you can put WHERE po_line_locations_v.SHIP_TO_LOCATION_CODE  in( <your location codes>)

GL_JE_LINES can also be joined to ap_invoice_distributions_all.


Hope this helps

Regards,
Ashish




0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question