All_从PO - INV - AP - SLA - GL重要数据表和接口程式(概念)

简介: 2014-07-09 Created By BaoXinjian 一、采购模组数据流 1. 建立请购单 (1). 接口信息 接口程式: 导入申请 接口Form: 接口Interface: po_requisitions_interface_all 接口API: 案例: (2).

 2014-07-09 Created By BaoXinjian

一、采购模组数据流


1. 建立请购单

(1). 接口信息

  • 接口程式: 导入申请
  • 接口Form:
  • 接口Interface: po_requisitions_interface_all
  • 接口API:
  • 案例:

(2). 数据库表

select * from po_requisition_headers_all

where segment1 = '14304'

and type_lookup_code = 'PURCHASE'

and wf_item_type = 'REQAPPRV'

select * from po_requisition_lines_all

where requisition_header_id = 181271

select * from po_req_distributions_all

where requisition_line_id = 208479

 

2. 建立询价单

(1). 接口信息

  • 接口程式
  • 接口Form
  • 接口Interface
  • 接口API

(2). 数据库表

select * from po_headers_all

where segment1 = '308'

and type_lookup_code = 'RFQ'

select * from po_lines_all

where po_header_id = 110415

select * from po_line_locations_all

where po_header_id = 110415

 

3. 建立报价单

(1). 接口信息

  • 接口程式
  • 接口Form
  • 接口Interface
  • 接口API

(2). 数据库表

select * from po_headers_all

where segment1 = '503'

and type_lookup_code = 'QUOTATION'

select * from po_lines_all

where po_header_id = 110411

select * from po_line_locations_all

where po_header_id = 110411

 

4. 建立采购单

(1). 接口信息

  • 接口程式:  Import Standard Purchase Order
  • 接口Form: NA
  • 接口Interface: po_headers_interface / po_lines_interface / po_distributions_interface
  • 接口API: NA

(2). 数据库表

select * from po_headers_all

where segment1 = '6028'

and type_lookup_code = 'STANDARD'

select * from po_lines_all

where po_header_id = 110386

select * from po_line_locations_all

where po_line_id = 173315

select * from po_distributions_all

where line_location_id = 264461

and req_distribution_id = 206998

 

5. 接收采购单

(1). 接口信息

  • 接口程式: 接收事务处理处理器
  • 接口Form
  • 接口Interface: rcv_headers_interface / rcv_transactions_interface
  • 接口API
  • 案例: 运费导采购、MRP导申请、POP导申请

(2). 数据库表

select * from rcv_shipment_headers

where receipt_num = 8458

and creation_date > trunc(sysdate)

select * from rcv_shipment_lines

where shipment_header_id = 4815907

and creation_date > trunc(sysdate)

 

二、库存模组数据流


1. 入库采购单

(1). 接口信息

  • 接口程式
  • 接口Form
  • 接口Interface
  • 接口API

(2). 数据库表

select * from mtl_material_transactions

where creation_date > trunc(sysdate)

 

三、付款模组数据


1. 建立发票

(1). 接口信息

  • 接口程式: 应付款管理系统开放接口导入
  • 接口Form
  • 接口Interface: ap_invoices_interface / ap_invoice_lines_interface / ap_invoice_rejections
  • 接口API
  • 案例: 运费导AP、费用导AP

(2). 数据库表

select status from ap_invoices_interface

where creation_date > trunc(sysdate)

select * from ap_invoice_lines_interface

where invoice_id = 2283731

select * from ap_invoices_all

where creation_date > trunc(sysdate)

select * from ap_invoice_lines_all

where invoice_id = 211380

select * from ap_invoice_distributions_all

where invoice_id = 211380

select * from ap_payment_schedules_all

where invoice_id = 211380

 

2. 建立付款

(1). 接口信息

  • 接口程式
  • 接口Form
  • 接口Interface
  • 接口API

(2). 数据库表

select * from ap_checks_all

where creation_date > trunc(sysdate)

select * from ap_invoice_payments_all

where check_id = 77570

creation_date > trunc(sysdate-10)

select * from ap_payment_distributions_all

where creation_date > trunc(sysdate-1)

 

四、在SLA中的数据流


1. 抛账至SLA

select * from xla_events

where event_id = 3322714

select * from xla_transaction_entities

where creation_date > trunc(sysdate-1)

select * from xla_ae_headers

where event_id = 3322714

select * from xla_ae_lines

where ae_header_id = 4947978

select * from xla_distribution_links

where ae_header_id = 4947978

 

五、总账中的数据流


1. 抛账至总账

(1). 接口信息

  • 接口程式:
  • 接口Form:
  • 接口Interface: gl_interface
  • 接口API:
  • 案例: ADI导日记账、返利导日记账

(2). 数据库表

select * from gl_interface

where accounting_date > trunc(sysdate-90)

select count(*) from gl_import_references

where creation_date > trunc(sysdate)

and je_header_id in (4681155, 4681156)

select * from gl_je_headers

where creation_date > trunc(sysdate)

and je_header_id in (4681155, 4681156)

select * from gl_je_lines

where creation_date > trunc(sysdate)

and  je_header_id in (4681155, 4681156)

 

2. 总账中过账

select * from gl_balance

 

六、接口开发注意事项


1. 库存事务接口:mtl_transactions_interface

  • 1)一般用来做各类杂收发、Cost Update,对于和业务有关的事务一般不建议使用,比如SO发货,如果自己发会导致Workflow没有往下走
  • 2)成功导入之后运行Cost Manager生成会计分录
  • 3)平均成本更新也通过此接口;如果该Item没有交易,则成本数据不会进入cst_item_costs

2. 固定资产接口:fa_mass_additions

  • 1)fa_mass_additions这个表有几个Trigger需要注意;会自动去插其他表,删除的时候也是
  • 2)折旧方法接口表无法给,而是自动从Category继承下来,所以导入之后需要Update表
  • 3)不是通过AP引过来的FA,是没有Source Lines信息的;如果需要,可以通过插表来实现
  • 4)数据进接口之后从Navigator:Mass Additions/Post Mass Additions提交请求集,这样会有个报表显示导入结果。不过我的测试程序可以直接提交请求集。

3. 总账分录接口:gl_interface

  • 1)最简单的接口,不说了

4. 应付发票接口:ap_invoices_interface/ap_invoice_lines_interface

  • 1)Profile AP: Use Invoice Batch Controls定义是否使用批控制
  • 2)仅支持CREDIT/STANDARD;注意金额正负,小于零用CREDIT,大于零用STANDARD
  • 3)PREPAYMENT/DEBIT/EXPENSE REPORT/MIXED不支持,先用CREDIT或者STANDARD,进去之后再Update正式表ap_invoices_all
  • 4)导入之后可再调用请求Invoice Validation自动Validate发票

5. 应收发票接口:ra_interface_lines_all/ra_interface_salescredits_all

  • 1)几个接口表之间的关系和其他接口不同,不是通过ID关联,而是通过描述性弹性域Line Transaction Flexfield定义
  • 2)接口给ID还是Name,要根据Transaction Source上的定义,不能随便给
  • 3)ra_interface_distributions_all这个表可以不插,让系统自动生成分配行
  • 4)如果没有销售员,可以提供一条ID=-3的No Sales Person记录给接口。这个要看AR System Option Miscellaneous上的设置是否要求销售员

6. 应收收据接口:ar_interim_cash_receipts_all

  • 1)AR Receipt标准接口是Lockbox,需要预先定义Format;Oracle根据Format定义把接口数据写到ar_interim_cash_receipts_all;我们可以跳过第一步,直接把数据插入到ar_interim_cash_receipts_all,不过Batch需要我们直接插表
  • 2)在Batch界面查看:数据在ar_interim_cash_receipts_all的Batch Type为 Mannual Quick
  • 3)Batch的Currency取本位币即可,收据用需要的货币

7. 客户导入接口:ra_customers_interface_all/ra_customer_profiles_int_all/ra_contact_phones_int_all

  • 1)要导Customer,ra_customer_profiles_int_all需要有记录
  • 2)orig_system_party_ref相同的话,Customer_Number不同,可以在一个Party下建多个Customer
  • 3)ship to的bill_to_orig_address_ref可用bill to的orig_system_address_ref,这样可以自动关联
  • 4)需要打Patch 3606744和3558213,否则Statement和Dunning类型的Site Use导不进去
  • 5)不是所以字段都可以从Interface进去;以HZ_Cust_Site_Uses_all为例,导入之后需要直接Update如下比较重要的字段:payment_term_id、order_type_id、warehouse_id、territory_id、primary_salesrep_id
  • 6)更新HZ_Cust_Site_Uses_all的Primary_flag的时候注意同时更新hz_cust_acct_sites_all的bill_to_flag和ship_to_flag为P(Primary)或者Y

8. 销售订单接口:oe_headers_iface_all/oe_lines_iface_all/oe_actions_iface_all

  • 1)整张Close的订单可以通过接口表;Close的订单,Oracle几乎是直接插表;其他的要做很多验证
  • 2)部分行Close的订单,可以给行Assign一个仅负责Close(Enter/Fulfill/Close/End)的工作流,这样Workflow Back Ground Process起来之后就会Close
  • 3)非Close的订单行号不能重复,所以接口表我们给空;如果有需要待导入后Update Line表即可
  • 4)数量正负要与Line Type的类型一致,正的对Order,负的对Return,否则接口报Inventory Item错误
  • 5)订单号更新需要更新几个表:oe_order_headers_all/wsh_delivery_details/mtl_sales_orders
  • 6)订单行在收货或者发货不足的情况下会拆行,拆行的时候系统几乎是拷贝所有的字段,如果碰到Unique的字段会失败。我碰到的问题是把源系统的line_id记录在弹性域上,并给这个弹性域建了Unique索引,导致Dropship的订单采购部分收货老是报错

9. 采购订单接口:po_headers_interface/po_lines_interface/po_distributions_interface

  • 1)PO接口有问题可察看错误信息表po_interface_errors,可以解决大部分问题
  • 2)本位币导入之后,头上的Rate Date为空,需要Update表
  • 3)quantity_billed也可以事后更新,这样AP不会再Match过来
  • 4)审批记录可以直接插入表po_action_history
  • 5)注意采购的Valdiate ORG
  • 6)如果Item没有Assign给Ship_to_org,会报No data found错误

10.采购接收接口:rcv_shipment_headers/rcv_transactions_interface

  • 1)收据头直接写表;收据行和收货事务通过接口
  • 2)注意parent_transaction_id,Receive需要放空
  • 3)PO接口有问题可察看错误信息表po_interface_errors,可以解决大部分问题
  • 4)如果要再现原来的Receiving Transaction,可按如下顺序分批进入接口RECEIVE、TRANSFER、ACCEPT、REJECT、DELIVER、RETURN TO RECEIVING、RETURN TO VENDOR、CORRECT

11.库存项目接口:mtl_system_items_interface

  • 1)在Master Org新增Item比较简单,给足需要的字段即可
  • 2)在其他组织增加Item(相当于从Master Assign后再Update),需要注意Master Org Conctrol的字段需要保持主组织的值(比较多,看mtl_item_attributes的Conctrol_level = 1)
  • 3)在其他组织增加Item还需要注意一些字段需要保持主组织的值,否则接口会报错,它们是create_supply_flag、dual_uom_control、buyer_id、allowed_units_lookup_code、purchasing_item_flag、internal_order_flag、inventory_item_flag
  • 4)如果要给Item Assign Category,可以通过mtl_item_categories_interface,对应的请求是Item Category Assignment Open Interface

 

七、总账中的数据流


 

 

 

 

参考:

http://blog.csdn.net/pan_tian/article/details/7770412/

http://zhangzhongjie.iteye.com/blog/1977931

http://blog.chinaunix.net/uid-324202-id-3413901.html

ERP技术讨论群: 288307890
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建
相关文章
|
9月前
ENVI_IDL:批量重投影ModisSwath产品(调用二次开发接口)+解析
ENVI_IDL:批量重投影ModisSwath产品(调用二次开发接口)+解析
140 1
|
前端开发 JavaScript
【TP5项目统一规范】删除数据
【TP5项目统一规范】删除数据
216 0
【TP5项目统一规范】删除数据
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(1)
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(1)
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(1)
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(2)
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(2)
SAP WM 使用Storage Location Reference实现IM层面的存储地点和WM层面的存储类型之间的软关联(2)
|
存储 监控 BI
SAP QM 模块的弊端?
SAP QM 模块的弊端?
|
前端开发
SAP RETAIL 如何查看分配表是参考哪个PO来创建的?
SAP RETAIL 如何查看分配表是参考哪个PO来创建的?
SAP RETAIL 如何查看分配表是参考哪个PO来创建的?
SAP QM QAC1事务代码不能修改含有HU的检验批里的数量
SAP QM QAC1事务代码不能修改含有HU的检验批里的数量
SAP QM QAC1事务代码不能修改含有HU的检验批里的数量