Chinaunix首页 | 论坛 | 博客
  • 博客访问: 586254
  • 博文数量: 154
  • 博客积分: 10208
  • 博客等级: 上将
  • 技术积分: 2225
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-16 14:02
文章分类

全部博文(154)

文章存档

2012年(4)

2011年(44)

2010年(50)

2009年(4)

2008年(52)

我的朋友

分类:

2008-08-21 12:41:19

    有时候会存在这样的需求:存在一个发送方系统和多个接收方系统,XI需要根据发送方的信息内容的不同而将消息转发给不同的系统。比如一个集团公司下有多个生产基地,这些基地属于不同的子公司,生产不同的物料;同时每个子公司有自己的管理系统。而客户采购时向集团ERP系统发送采购单,这时就面临着一个这样的问题,如果客户采购A商品,则消息需发送到A子公司系统,如果采购B商品,则需要转发给B子公司系统,等等。
    我们可以采用如下两种方式实现:一是使用BPM,但是BPM相对来说比较耗资源,放弃。二是可以采用SAP提供的Enhanced Receiver Determination来实现。第二种方式主要是通过mapping 程序来动态的决定接收方,这样的话就可以在mapping的过程中,根据发送方的消息来动态决定接收方。
    在实现的过程中我们需要做以下额外的开发配置:
一、在IR中开发Message Mapping,其中接收方的消息为SAP提供的Message type--Receivers;
二、在IR中开发Interface Mapping,其中接收方的消息为SAP提供的Message Interface--ReceiverDetermination;
注意:其中SAP提供的消息类型和消息接口在SAP BASIS (namespace )。
三、在ID中需要定义一个enhanced ReceiverDetermination.
 
 
具体的实现过程可以参考一下SAP官方链接:
   

Integration

During the definition of the interface mapping, you assign the abstract message interface ReceiverDetermination as the target interface. The message interface ReceiverDetermination is in the Integration Repository in the software component SAP BASIS (namespace ).

The message interface uses the message type Receivers and the data type Receivers. The data type Receivers describes a list of receivers and has the following structure:

Example

The following instance of the data type Receivers contains two receivers. The first receiver comprises a party and service and is identified by a DUNS number; the second receiver comprises a service without a party.

    123456789

    MyService

   

    ABC_200

You can specify party and service for each receiver.

Activities

...

       1.      Integration Repository: Define the interface mapping. Assign the message interface ReceiverDetermination as the target interface (see above).

       2.      Integration Repository: Define the message mapping or mapping program that is to determine the receivers at runtime. Assign the message mapping or mapping program to the interface mapping.

       3.      Integration Directory: Define an (enhanced) receiver determination.

     Enter the outbound interface of the interface mapping from step 1 in the key of the receiver determination as the outbound interface.

     Assign the interface mapping created in step 1 to the receiver determination.

阅读(1407) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~