Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

AP & AR module query

Posted on 2004-04-27
5
Medium Priority
?
2,461 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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 Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

618 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