Customer to order..........urgent

Here post Oracle Order Management related topics.
Post Reply
shekhar_lonkar
Posts: 12
Joined: Mon Mar 26, 2007 4:21 am
Location: India

Customer to order..........urgent

Post by shekhar_lonkar »

Hi friends

I m having following requirement.....

Is there any API in oracle apps which gives information as follows..

Suppose i have entered aperticular customer number..
That API should return the all Sales order against that perticular Customer...

Awaiting for reply...
ahmadbilal
Posts: 615
Joined: Mon Sep 18, 2006 1:32 am
Location: United Arab Emirates
Contact:

Post by ahmadbilal »

<b>Get Customer Id By using this query</b>
select CUSTOMER_NAME,CUSTOMER_ID from ra_customers rc


<b>Pass Customer Id in below query you can get Complete order header</b>
SELECT ooh.org_id ou, ooh.header_id hdr_id, ooh.order_category_code CATEGORY,
ooh.order_number ord_num, ott.NAME ord_typ, ooh.ordered_date,
ooh.transactional_curr_code curr, ooh.agreement_id, ooh.open_flag,
ooh.booked_flag, NVL (ooh.cancelled_flag, 'N') cancelled_flag,
NVL (ooh.upgraded_flag, 'N') upgraded_flag,
ooh.flow_status_code hdr_flow_status,
(SELECT customer_name
FROM ra_customers rc
WHERE rc.customer_id = ooh.sold_to_org_id) sold_to,
ooh.ship_to_org_id ship_to, ooh.invoice_to_org_id invoice_to,
ooh.ship_from_org_id ship_from, ood.organization_code warehouse,
NVL (ooh.partial_shipments_allowed, 'Y') ship_partial,
ooh.cust_po_number cust_po, os2.NAME sdt, ooh.source_document_id sdi,
os1.NAME os, ooh.orig_sys_document_ref osdr
FROM oe_order_headers_all ooh,
oe_transaction_types_tl ott,
oe_order_sources os1,
oe_order_sources os2,
org_organization_definitions ood
WHERE ooh.order_type_id = ott.transaction_type_id
AND ooh.order_source_id = os1.order_source_id(+)
AND ooh.source_document_type_id = os2.order_source_id(+)
AND ott.LANGUAGE = (SELECT fl.language_code
FROM fnd_languages fl
WHERE fl.installed_flag = 'B')
AND ooh.ship_from_org_id = ood.organization_id(+)
AND ooh.sold_to_org_id = :custid
shekhar_lonkar
Posts: 12
Joined: Mon Mar 26, 2007 4:21 am
Location: India

Post by shekhar_lonkar »

Dear Ahmad

Thanks....

[quote]<b>Get Customer Id By using this query</b>
select CUSTOMER_NAME,CUSTOMER_ID from ra_customers rc


<b>Pass Customer Id in below query you can get Complete order header</b>
SELECT ooh.org_id ou, ooh.header_id hdr_id, ooh.order_category_code CATEGORY,
ooh.order_number ord_num, ott.NAME ord_typ, ooh.ordered_date,
ooh.transactional_curr_code curr, ooh.agreement_id, ooh.open_flag,
ooh.booked_flag, NVL (ooh.cancelled_flag, 'N') cancelled_flag,
NVL (ooh.upgraded_flag, 'N') upgraded_flag,
ooh.flow_status_code hdr_flow_status,
(SELECT customer_name
FROM ra_customers rc
WHERE rc.customer_id = ooh.sold_to_org_id) sold_to,
ooh.ship_to_org_id ship_to, ooh.invoice_to_org_id invoice_to,
ooh.ship_from_org_id ship_from, ood.organization_code warehouse,
NVL (ooh.partial_shipments_allowed, 'Y') ship_partial,
ooh.cust_po_number cust_po, os2.NAME sdt, ooh.source_document_id sdi,
os1.NAME os, ooh.orig_sys_document_ref osdr
FROM oe_order_headers_all ooh,
oe_transaction_types_tl ott,
oe_order_sources os1,
oe_order_sources os2,
org_organization_definitions ood
WHERE ooh.order_type_id = ott.transaction_type_id
AND ooh.order_source_id = os1.order_source_id(+)
AND ooh.source_document_type_id = os2.order_source_id(+)
AND ott.LANGUAGE = (SELECT fl.language_code
FROM fnd_languages fl
WHERE fl.installed_flag = 'B')
AND ooh.ship_from_org_id = ood.organization_id(+)
AND ooh.sold_to_org_id = :custid


<i><div align="right">Originally posted by ahmadbilal
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests