The relationship is maintained in the table okc_k_rel_objs. following is the sql that will give you the contract number when provided order number.
Release 12 query:
select hdr.contract_number,hdr.contract_number_modifier
from oe_order_headers_all oe,
okc_k_rel_objs rel,
okc_k_headers_all_b hdr
where rel.chr_id = hdr.id
and rel.jtot_object1_code = 'OKX_ORDERHEAD'
and rel.object1_id1 = oe.header_id
and oe.order_number = '
Release 11i query:
select hdr.contract_number,hdr.contract_number_modifier
from oe_order_headers_all oe,
okc_k_rel_objs rel,
okc_k_headers_b hdr
where rel.chr_id = hdr.id
and rel.jtot_object1_code = 'OKX_ORDERHEAD'
and rel.object1_id1 = oe.header_id
and oe.order_number = '
0 comments:
Post a Comment