SELECT * FROM
(SELECT --dla.line_id,
--dha.header_id,
dha.order_number "Order Number",
hp.party_name "customer",
hp.country "country",
(NVL(dla.ordered_qty,0) * NVL(dla.unit_selling_price,0)) amount,
(SELECT attribute_char3
FROM doo_headers_eff_b dheb
WHERE dheb.header_id = dha.header_id
AND CONTEXT_CODE='Subscription') region,
Revenue_Management.attribute_ char8 "workday contract name",
Subscription.attribute_char1 "billing_offset",
ACCOUNTS_RECEIVABLES. attribute_char1 "invoice group by number",
ACCOUNTS_RECEIVABLES. attribute_char2 "invoice group by description",
ACCOUNTS_RECEIVABLES. attribute_char3 "management group",
SF_SUBSCRIPTION.ATTRIBUTE_ CHAR10 "align billing from",
SF_SUBSCRIPTION.attribute_ char11 "custom billing",
Conversion.ATTRIBUTE_CHAR4 "Misc info",
Conversion.attribute_char2 "PS billed amount",
Conversion.attribute_char3 "PS unbilled amount",
Conversion.attribute_char5 "supplier purchase order",
TO_CHAR(SNOW.attribute_ timestamp1,'MM/DD/YY HH:MI') "cloud provision date",
TO_CHAR(SNOW.attribute_ timestamp2,'MM/DD/YY HH:MI') "on-perm provision date",
IB.attribute_char2 "asset line identifer",
IB.attribute_char3 "life cycle pid ",
SFDC.attribute_char1 "PO requied",
SFDC.attribute_char2 "PO Number",
SFDC.attribute_char3 "PO Line Number",
SFDC.attribute_char4 "invoice trigger event",
SFDC.attribute_char5 "site id",
SFDC.attribute_char6 "bundle id",
SFDC.attribute_char7 "advanced billing flag",
SFDC.attribute_char10 "used inventory flag",
SFDC.attribute_char11 "GSS validation flag",
SFDC.attribute_char16 "suppress fulfillment",
Procurement.attribute_char1 "cabinet position",
Procurement.attribute_char2 "PO vendor cost/transfer price",
Procurement.attribute_char3 "related manual order",
Tax.attribute_char2 "0% tax rate flag",
BRAZIL.attribute_char1 "CFOP-line order",
CSP.attribute_char1 "CSP flag",
CSP.attribute_char3 "private order flag",
esib.item_number,
esib.description item_description,
bill_to_party.party_name bill_to_customer,
ship_to_party.party_name ship_to_customer,
SF_SUBSCRIPTION.ATTRIBUTE_ CHAR5 sf_subscription_number,
SF_SUBSCRIPTION.ATTRIBUTE_ CHAR2 "SF Line Identifier (Model)",
revenue_management.attribute_ char6 "Rev Contract Grouping" ,
(SELECT header_curr_duration_ext_amt
FROM doo_order_pricing_details_v dopdv
WHERE dopdv.fulfill_line_id = dfla.fulfill_line_id
AND dopdv.PRICE_ELEMENT_CODE='QP_ NET_PRICE'
AND dopdv.ROLLUP_FLAG ='Y' ) Total_Amount_for_Duration
FROM doo_headers_all dha,
doo_lines_all dla,
doo_fulfill_lines_all dfla,
doo_fulfill_lines_eff_b ACCOUNTS_RECEIVABLES,
doo_fulfill_lines_eff_b Revenue_Management,
doo_fulfill_lines_eff_b Subscription,
doo_fulfill_lines_eff_b CONVERSION,
doo_fulfill_lines_eff_b SFDC,
doo_fulfill_lines_eff_b SNOW,
doo_fulfill_lines_eff_b IB,
doo_fulfill_lines_eff_b Procurement,
doo_fulfill_lines_eff_b Tax,
doo_fulfill_lines_eff_b BRAZIL,
doo_fulfill_lines_eff_b CSP,
doo_fulfill_lines_eff_b SF_SUBSCRIPTION,
hz_parties hp,
egp_system_items esib,
doo_order_addresses bill_to,
doo_order_addresses ship_to,
hz_cust_accounts bill_to_cust,
hz_parties bill_to_party,
hz_parties ship_to_party
WHERE 1=1
---AND dha.order_number='00026264'
AND dha.header_id=dla.header_id
AND dla.line_id= dfla.line_id
AND dfla.fulfill_line_id = accounts_receivables.fulfill_ line_id (+)
AND accounts_receivables.context_ code (+)='ACCOUNTS RECEIVABLES'
AND dfla.fulfill_line_id = Revenue_Management.fulfill_ line_id (+)
AND Revenue_Management.context_ code (+)='Revenue_Management_ Information_Line'
AND dfla.fulfill_line_id = Subscription.fulfill_line_id (+)
AND Subscription.context_code (+)='Subscription'
AND dfla.fulfill_line_id = Conversion.fulfill_line_id (+)
AND Conversion.context_code (+)='Conversion'
AND dfla.fulfill_line_id = SFDC.fulfill_line_id (+)
AND SFDC.context_code (+)='SFDC'
AND dfla.fulfill_line_id = SNOW.fulfill_line_id (+)
AND SNOW.context_code (+)='SNOW'
AND dfla.fulfill_line_id = IB.fulfill_line_id (+)
AND IB.context_code (+)='IB - Asset Line Identifier Model'
AND dfla.fulfill_line_id = Procurement.fulfill_line_id (+)
AND Procurement.context_code (+)='Procurement'
AND dfla.fulfill_line_id = Tax.fulfill_line_id (+)
AND Tax.context_code (+)='Tax'
AND dfla.fulfill_line_id = BRAZIL.fulfill_line_id (+)
AND BRAZIL.context_code (+)='BRAZIL-Localization'
AND dfla.fulfill_line_id = CSP.fulfill_line_id (+)
AND CSP.context_code (+)='CSP Details'
AND dfla.fulfill_line_id = SF_SUBSCRIPTION.fulfill_line_ id (+)
AND SF_SUBSCRIPTION.context_code (+)='SF Subscription - SF Line Identifier Model'
AND dha.sold_to_party_id = hp.party_id
AND dla.inventory_organization_id =esib.organization_id
and dla.inventory_item_id = esib.inventory_item_id
AND dha.header_id = bill_to.header_id (+)
AND bill_to.address_use_type (+)= 'BILL_TO'
AND bill_to.cust_acct_id = bill_to_cust.cust_account_id (+)
AND bill_to_cust.party_id = bill_to_party.party_id
AND dha.header_id = ship_to.header_id (+)
AND ship_to.address_use_type (+) = 'SHIP_TO'
AND ship_to.party_id = ship_to_party.party_id (+)
)
WHERE region = NVL(:p_region,region);
Regards,
Amar Alam
1 comments:
Social Theka", a digital marketing company based in Mohali, Punjab has notably made a name for itself.
This company ranking amongst the top 10 in the city has established this strong reputation since it places a premium
on achieving and maintaining a culture of accomplishment and innovation. Among the diverse range of services available
from Social Theka are search engine optimization (SEO), social media marketing, and content creation.
BEST DIGITAL MARKETING COMPANY IN MOHALI
DIGITAL MARKETING AGENCY IN MOHALI
Post a Comment