INV库存
organization 两个含义:
1. 经营单位,A/B/C分公司,A下面有A1,A2等工厂,主题目标是为了独立核算此组织
ORG,ORG_ID;
2. 库存组织,例如制造商的仓库,例如A1,A2等工厂
Organization_id;
HR_ORGANIZATION_UNITS
Org_organization_definitions
Mtl_subinventory_ 库存组织单位
MTL_PARAMETERS -库存组织参数(没有用ID,直接用name)
MTL_SYSTEM_ITEMS_b -物料信息(同上,应用了库存组织name)
MTL_SECONDARY_INVENTORIES -子库存组织 -
MTL_ITEM_LOCATTIONS -货位 - SUBINVENTROY_CODE
Mtl_Material_Transactions - (库存)物料事物表
成本 mtl_transaction_accounts
transaction_cost是事物成本;
ACTUAL_COST是通过成本算法计算出来的实际成本,主计量单位
现有量
汇总历史记录(正负合计)
Mtl_Material_Transactions
MTL_ONHAND_QUANTITIES现有量表,组织/子库存/货位/物品 summary可能按照挑库先进先出统计,如果设置了"不允许负库存",这样就不可能出现负数
PO
请购单头表
Po_Requisition_Headers_all
行表
Po_Requisition_lines_all
采购订单
PO_HEADER_ALL
PO_LINES_ALL
采购接收-退货/组织间转移/正常状态都需要使用这个模块
RCV_TRANSACTIONS
1. 接收100单位货物,放入“待质检”货位
2. 接受/拒绝
3. 库存/退回
有三个不同的状态!例如:接收100个,80个接受入库,20个退回,那么有80个接受事务/20个退回事物
select TRANSACTION_TYPE,DESTINATION_TYPE_CODE from RCV_TRANSACTIONS
可以看出以下阶段:
A1.RECEIVE – RECEIVING
A2.ACCEPT – RECEIVING
A3.DELIERY – INVETORY(影响库存现有量)
如果按照正常模式,最后会触发产生MTL_MATERIAL_TRANSACTIONS
销售订单
OE_ORDER_headers_all
SOLD_FROM_ORG_ID
SOLD_TO_ORG_ID 就是客户层
SHIP_FROM_ORG_ID
SHIP_TO_ORG_ID 就是客户收货层
INVOICE_TO_ORG_ID 就是客户收单层
DELIVER_TO_ORG_ID
和客户结构有关
客户 RA_customers
客户Address Ra_Addresses
Address 货品抵达 site RA_SITE_USES_ALL
Address 发票抵达 site
OE_ORDER_LINEs_all
GL凭证
gl_je_batches
凭证日期: DEFAULT_EFFECTIVE_DATE
会计期间: DEFAULT_PERIOD_NAME
原币种凭证批借贷方汇总: RUNNING_TOTAL_DR/CR 比如美元
本位币凭证批借贷方汇总: RUNNING_TOTAL_ACCOUNTED_DR/CR
gl_je_headers日记账头信息
批号: JE_BATCH_ID
会计期间: PERIOD_NAME
币种: CURRENCY_CODE
汇率类型: CURRENCY_CONVERSION_TYPE
汇率日期: CURRENCY_CONVERSION_DATE
帐套: SET_OF_BOOKS_ID 参考 GL_SETS_OF_BOOKS
凭证类型: JE_CATEGORY 参考 GL_JE_SOURCES
凭证来源: JE_SOURCE
gl_je_lines日记账体信息
CODE_COMBINATION_ID 科目组合编号
GL_BALANCES 总帐余额
PERIOD_NET_DR/CR 净值
BEGIN_BALANCE_DR/CR 期初额
AR应收发票
RA_CUSTOMER_TRX_ALL
CUSTOMER_TRX_ID 发票编号
BILL_TO_SITE_USE_ID 客户收单方编号
PRIMARY_SALES_ID销售员
REFERENCE是Oracle提供的外部编号输入框,但是由于版本问题和长度(<=30),不建议用户使用,如果要使用外部编号,请使用说明性弹性域
RA_CUSTOMER_TRX_LINES_ALL
LINE_ID 行号
INVENTORY_ITEM_ID 可以为空,比如非物料的服务,只在DESCRIPTION中出现 /税行
DESCRIPTION
QUANTITY_INVOICE 开票数量
LINE_TYPE 行类型 (一般/税)
EXTEND_PRICE 本行金额
注意:税行是隐藏行,所以至少会有两行
收款情况
AR_CASH_RECEIPTS_ALL(还包含了非收款信息)
CASH_RECEIPT_ID 内部code
RECEIPT_NUMBER 收款号
RECEIPT_DATE 收款日期
AMOUNT 总额
RECEIPT_TYPE 现金/杂项 Cash/Misc
FUNCTIONAL_AMOUNT 本位币计量金额
UI上为RECEIPTS
核销关系不是一一对应,也不是一次核销100%,UI上右下方的Application 按钮
AR_RECEIVABLE_APPLICATIONS_ALL
APPLIED_CUSTOMER_TRX_ID 发票编号
APPLIED_CUSTOMER_TRX_LINE_ID 发票行编号
STATUS APP表示核销 /UNAPP表示未核销
AMOUNT_APPLIED 匹配金额
注意:红冲收款报表时间跨月的问题;必须联查 AR_CASH_RECEIPTS_ALL和 AR_CASH_RECEIPT_HISTORY_ALL
AP
应付帐款(是我方人员按照供应商提供的纸张发票信息录入)UI 上的invoice
AP_INVOICES_ALL
实际付款PAYMENT
AP_CHECKS_ALL
核销关系同AR,右下方的Payment 按钮
AP_INVOICE_PAYMENTS_ALL客户余额表,情况比较复杂:比如两个用户合并,应收应付差额,预付款
资产信息FA_ADDITIONS
名称
编号
分类
数量
资产类别
FA_CATEGORIES
资产帐簿
FA_BOOK_CONTROLS 和会计帐簿有什么关系?
FA_BOOKS
UI中的Inquiry
Mothed是折旧方法(直线法/产量法)
FA_DISTRIBUTION_HISTORY分配assignment,给什么部门使用多少
LOCATION_ID 部门联查FA_LOCATIONS
折旧信息(分摊方法)
FA_DEPRN_DETAIL
period_counter 折旧期间编号
折旧事务(新增、重建、转移、报废)
FA_TRANSACTION_HEADERS
select fnd_profile.VALUE('ORG_ID') FROM DUAL
select * from hr_operating_units hou where hou.organization_id=204
--fnd
select * from fnd_application
select * from fnd_application_tl where application_id=101
select * from fnd_application_vl where application_id = 101
----值集
select * from fnd_flex_value_sets
select * from fnd_flex_values
select * from fnd_flex_values_vl
----弹性域
select * from fnd_id_flexs
select * from fnd_id_flex_structures where id_flex_code='GL#'
select * from fnd_id_flex_segments where id_flex_code='GL#' and id_flex_num=50671
select * from fnd_profile_options_vl
select * from fnd_concurrent_programs 程序表
select * from fnd_concurrent_requests 请求表
select * from fnd_concurrent_processes 进程表
--inv
select * from org_organization_definitions 库存组织
select * from mtl_parameters 组织参数
select * from mtl_system_items_b where inventory_item_id = 171 and organization_id=204 物料表
select * from mtl_secondary_inventories 子库存
select * from mtl_item_locations 货位
select * from mtl_lot_numbers 批次
select * from mtl_onhand_quantities 现有量表
select * from mtl_serial_numbers 序列
select * from mtl_material_transactions 物料事务记录
select * from mtl_transaction_accounts 会计分录
select * from mtl_transaction_types 事务类型
select * from mtl_txn_source_types 事务来源类型
select * from mfg_lookups ml where ml.LOOKUP_TYPE = 'MTL_TRANSACTION_ACTION'
--po
select * from po_requisition_headers_all 请求头
select * from po_requisition_lines_all 请求行
select * from po_headers_all 订单头
select * from po_lines_all 订单行
select * from po_line_locations_all
select * from po_distributions_all 分配
select * from po_releases_all 发送
select * from rcv_shipment_headers 采购接收头
select * from rcv_shipment_lines 采购接收行
select * from rcv_transactions 接收事务处理
select * from po_agents
select * from po_vendors 订单
select * from po_vendor_sites_all
--oe
select * from ra_customers 客户
select * from ra_addresses_all 地址
select * from ra_site_uses_all 用户
select * from oe_order_headers_all 销售头
select * from oe_order_lines_all 销售行
select * from wsh_new_deliveries 发送
select * from wsh_delivery_details
select * from wsh_delivery_assignments
--gl
select * from gl_sets_of_books 总帐
select * from gl_code_combinations gcc where gcc.summary_flag='Y' 科目组合
select * from gl_balances 科目余额
select * from gl_je_batches 凭证批
select * from gl_je_headers 凭证头
select * from gl_je_lines 凭证行
select * from gl_je_categories 凭证分类
select * from gl_je_sources 凭证来源
select * from gl_summary_templates 科目汇总模板
select * from gl_account_hierarchies 科目汇总模板层次
--ar
select * from ar_batches_all 事务处理批
select * from ra_customer_trx_all 发票头
select * from ra_customer_trx_lines_all 发票行
select * from ra_cust_trx_line_gl_dist_all 发票分配
select * from ar_cash_receipts_all 收款
select * from ar_receivable_applications_all 核销
select * from ar_payment_schedules_all 发票调整
select * from ar_adjustments_all 会计分录
select * from ar_distributions_all 付款计划
--ap
select * from ap_invoices_all 发票头
select * from ap_invoice_distributions_all 发票行
select * from ap_payment_schedules_all 付款计划
select * from ap_check_stocks_all 单据
select * from ap_checks_all 付款
select * from ap_bank_branches 银行
select * from ap_bank_accounts_all 银行帐号
select * from ap_invoice_payments_all 核销
客户:
select addr.cust_account_id,
loc.address1,
loc.address2,
loc.address3,
loc.address4,
addr.cust_acct_site_id,
addr.status,
sysdate EXPIRED_DATE,
addr.creation_date,
addr.created_by,
addr.last_update_date,
addr.last_updated_by,
hp.party_name '客户'
from hz_cust_acct_sites_all addr,
hz_party_sites party_site,
hz_locations loc,
hz_parties hp
where addr.party_site_id = party_site.party_site_id
and party_site.location_id = loc.location_id
and party_site.party_id = hp.party_id
and hp.party_type = 'ORGANIZATION'
order by addr.cust_account_id
供应商:
SELECT v.vendor_id "供应商ID",
v.segment1 "供应商编号",
v.vendor_name "供应商名称",
v.VENDOR_NAME_ALT "供应商简称",
vs.vendor_site_code "供应商地点名称",
hrl1.location_code "收货地点",
hrl2.location_code "收单地点"
FROM po_vendors v,
po_vendor_sites_all vs,
hr_locations_all_tl hrl1,
hr_locations_all_tl hrl2
WHERE v.vendor_id = vs.vendor_id
AND vs.ship_to_location_id = hrl1.location_id
AND hrl1.LANGUAGE(+) = userenv('LANG')
AND vs.bill_to_location_id = hrl2.location_id(+)
AND hrl2.LANGUAGE(+) = userenv('LANG')
AND v.segment1 = 'D028'