EDI、IDoc、RFC、PMI概念
EDI是电子数据交换,是联合国标准化组织的一种通用的数据交换标准
IDOC是中介文档,是符合EDI标准的一种的数据格式,它一般是整个的消息报文,包含了事务数据、主数据、控制数据,用以控制数据的整个交换流程,其中呢,主数据一般是XML格式,所以我们可以方便解析。
RFC是远程函数调用,在SAP中是基于TCP协议来实现的,实际上是一种底层通信技术
PMI是进程监视架构,配置好后,用以监视接口数据的进出站。
所以呢,以上这些名词,一般都是用来做接口时候用到的,RFC作为接口,是需要编写RFC客户端来建立与SAP主机通信的;IDOC其实是建立在RFC基础之上,大多的数据接口都可以通过配置完成,而且与第三方系统集成时可以使用XML来传输数据,比较方便。
EDI主要用于公司之间的数据交换。 例如:在SAP下销售订单处理期间,可通过EDI接口发送和接收各式各样的输出。
IDoc是一种信息系统之间(通常是ERP)进行事务性或数据交换使用的标准数据格式,其中比较公认的是符合EDI标准的IDoc。
IDoc是SAP接口功能中主要的组成部分,是一个依赖IDOC type的数据实例。
IDoc结构是SAP系统的标准,它由三部分组成。
Control Record: 控制记录字段的内容。可以认为是文件头,它包含发送和接收端,IDOC ID,发送日期等信息,当IDoc出被触发时,SAP会首先检查这些信息是否正确。
Data Record : 装载传输的数据。当发送或接收这些IDoc时,数据将会被解析到特定的数据段中。
Status Record: 用来记录IDoc从发送方到接收方的历史状态信息。
Outbound IDOC status codes with status description.
- 01: IDoc generated
- 02: Error passing data to port (It’s an error status)
- 03: Data passed to port OK
- 04: Error within control information of EDI subsystem
- 05: Error in translation
- 06: Translation successful.
- 07: Error on syntax check (It’s an error status)
- 08: Syntax check successful
- 09: Error on interchange handling (It’s an error status)
- 10: Interchange handling successful
- 11: Error on dispatch (It’s an error status)
- 12: IDOC Dispatch successful
- 13: Retransmission successful
- 14: Interchange Acknowledgement positive
- 15: Interchange Acknowledgement negative (It’s an error status)
- 16: Functional Acknowledgement positive
- 17: Functional Acknowledgement negative (It’s a warning error status)
- 18: Triggering EDI subsystem successful
- 19: Data transfer for test successful
- 20: Error on triggering EDI subsystem (It’s an error status)
- 21: Error on passing data for test (It’s an error status)
- 22: Dispatch successful, acknowledgement still due
- 23: Error on retransmission (It’s an error status)
- 24: Control information of EDI subsystem successful
- 25: Processing despite syntax error (It’s a warning error)
- 26: Error during syntax check of IDoc (It’s an error status)
- 27: Error in ALE dispatch level (It’s an error status)
- 29: Error in ALE service (It’s an error status)
- 30: IDoc is ready for dispatch in ALE service
- 31: IDOC is marked for deletion.
- 32: IDoc was edited
- 33: Original of an IDoc which was edited
- 34: Error in control record of IDoc (It’s an error status)
- 35: IDoc reloaded from archive
- 36: Timeout error on Electronic signature not performed (It’s an error status)
- 37: IDoc added incorrectly (It’s an error status)
- 38: IDoc archived
- 39: Arrival of IDOC in target system confirmed
- 40: Application document not created in target system (It’s an error status)
- 41: Application document created in target system
Inbound IDOC status codes with status description.
- 42: IDoc was created by test transaction
- 50: IDoc added
- 51: Application document not posted (It’s an error status)
- 52: Application document partially posted (It’s an error status)
- 53: Application document posted successfully.
- 54: Error during formal application check (It’s an error status)
- 55: Formal application check successful
- 56: IDoc with errors added (It’s an error status)
- 57: Test IDoc: Error during application check (It’s an error status)
- 60: Syntax error on IDOC (It’s an error status)
- 61: Processing despite syntax error (It’s a warning error status)
- 62: IDoc passed to application
- 63: Error passing IDoc to application (It’s an error status)
- 64: IDoc ready to be transferred to application
- 65: Error in ALE service (It’s an error status)
- 66: IDoc is waiting for predecessor IDoc in serialization process
- 68: IDOC is marked for deletion.
- 69: IDoc was edited
- 70: Original of an IDoc which was edited
- 71: IDoc reloaded from archive
- 73: IDoc archived
- 74: IDoc was created by test transaction
Simple Steps:
Step 1. Create Package(ZAPPLE): SE21
Step 2: Create Segment: WE31
Step 3: Create IDoc Type: WE30
Step 4: Create Message Type: WE81
Step 5:
Step 6: Creare RFC Destination: SM59
Step 7: Create Processing Port: WE21
Step 8: Logical Systems:SALE
[Outbound Configure]
Step 9: Add Outbound Partner profile: WE20
Step 10: Test IDoc using ABAP: SE38
[Inbound Configure]
Step 11: Creare Inbound Process Function Module: SE37
Step 12: Sign Inbound Processing Function: BD51
Step 13: Assign Function Module to IDoc Type and Message Type: WE57
Step 14: Create Inbound Process Code: WE42
Step 15: Add Inbound Partner profile: WE20