http://www.samuelog.cn/category/sap-related-topic/05-sap-abap/
今天又学习了一下Idoc的知识,包括Idoc的概念、开发、配置和管理。
Concept
EDI:公司之间的电子数据交换。
ALE:公司之内不同系统之间的数据交换。
IDOC:基本上就是EDI的一种实现形式,用于SAP。
- Control record, data record, status record
- Outbound and inbound
- Sender and receiver
- Partner(协议) and port(发送的形式eg:File, RFC,XML)
- Status
IDoc Development
Message type WE81, identifies type of data : MATMAS (material master)
Idoc type WE30, indicates the SAP format of the data : MATMAS05 ( 05-version)
Segment WE31, structures used to define data: E1MARAM (material master general data)
Link message type with basic type WE82
Outbound – outbound process code/outbound function module WE41, only for application outbound
Inbound – inbound process code/inbound function module WE42
Link inbound function module to message type and Idoc type WE57
Mtn. inbound function module attribute BD51
IDoc Configuration
General: RFC destination SM59, 定义 transactional RFC port destination
Logical System BD54,定义LS partner type
Partner Profile WE20, 用于定义数据交换的参数
Port WE21,用于定义各类port
For Master data outb : distribution model BD64
For Application data outb :outb process code WE41
Condition type NACE
Demo: 1)master data outbound and inbound
从IDES 800 发到 IDES 810:
1. develop idoc type in 800
2. config destination LS/port/partner profile in 800
3 config LS/partnerprofile in 810
4. test with BD10
5. check with WE02
Demo: 2) purchase order output to file
1. use standard message type ORDERS,idoc type orders05,define process code(WE41)ME10
2.config port, LS, partner profile; for application only : process code and condition type
3. configure condition type(同义:message type, output type) : NACE 1output type 2procedure
4.test with create PO
5.check with WE02 , AL11 check directory
IDoc administration
Transactions:
WEDI: Area Menu
WE02/WE05: display Idoc
BD87: Monitor/process Idoc message
WE19: Test/Reprocess Idoc
Program:
RSNAST00: create idoc for message(application data)
RSEOUT00: process all selected Idocs (EDI)
RBDAPP01: Inbound Processing of Idocs ready for transfer
Tips:
Tables: EDIDC(control record : idoc)
EDID4: Idoc records from 4.0 onwards
EDIDS: status record
NAST: Message record (application data)
Function modules:
IDOC_WRITE_AND_START_INBOUND: create Idoc and process Idoc
MASTER_IDOC_DISTRIBUTE: create outbound Idoc