SELECT
Ho.name OU Name,
T.name type of order transaction processing,
T.description Transaction Processing Description,
B.transaction_type_code transaction type Code,
B.order_category_code transaction type set,
B.start_date_active start Time,
B.end_date_active End Time,
B.currency_code Currency,
B.conversion_type_code type of folding,
K1. Concatenated_segments Sales Cost accounting,
Apps.cux_get_gl_code_name (b.cost_of_goods_sold_account) Sales Cost accounting Description,
Ood.organization_name Warehouse,
B.agreement_type_code protocol type,
b.attribute1 Elastic Field 1,
Rct.name type of receivable processing,
K2. Concatenated_segments Accounts receivable,
Apps.cux_get_gl_code_name (K2. CODE_COMBINATION_ID) Accounts receivable description,
K3. Concatenated_segments Income account,
Apps.cux_get_gl_code_name (K3. CODE_COMBINATION_ID) Income account Description,
K4. Concatenated_segments Tax Account,
Apps.cux_get_gl_code_name (K4. CODE_COMBINATION_ID) Tax Account description,
K5. Concatenated_segments Shipping Account,
Apps.cux_get_gl_code_name (K5. CODE_COMBINATION_ID) Freight Account description,
K6. Concatenated_segments settlement Account,
Apps.cux_get_gl_code_name (K6. CODE_COMBINATION_ID) Settlement Account Description
From
APPS.GL_CODE_COMBINATIONS_KFV K6,
APPS.GL_CODE_COMBINATIONS_KFV K5,
APPS.GL_CODE_COMBINATIONS_KFV K4,
APPS.GL_CODE_COMBINATIONS_KFV K3,
APPS.GL_CODE_COMBINATIONS_KFV K2,
APPS.GL_CODE_COMBINATIONS_KFV K1,
Apps.org_organization_definitions Ood,
Hr_organization_units Ho,
Ra_cust_trx_types_all RCT,
Oe_transaction_types_tl T,
Oe_transaction_types_all b
WHERE b.transaction_type_id = t.transaction_type_id
and t.language = ' ZHS '
and B.transaction_type_code = ' ORDER '
--and b.transaction_type_id = 1359
and RCT. cust_trx_type_id = b.cust_trx_type_id
and ho.organization_id = b.org_id
and b.warehouse_id = ood.organization_id (+)
and B.cost_of_goods_sold_account = K1. CODE_COMBINATION_ID (+)
and Rct.gl_id_rec = K2. CODE_COMBINATION_ID (+)
and Rct.gl_id_rev = K3. CODE_COMBINATION_ID (+)
and Rct.gl_id_tax = K4. CODE_COMBINATION_ID (+)
and rct.gl_id_freight = K5. CODE_COMBINATION_ID (+)
and rct.gl_id_clearing = K6. CODE_COMBINATION_ID (+)
-- and ho.name like ' 1% '