on 11-30-2006 3:43 AM
I have a soap-XI-RFC scenario. I have to read the soap message and depending on the key field value, I have to send to two different SAP systems.
For EX:
Input Message:
<input_msgType>
<item>
<Key>ABC-123452</Key>
<value>test1</value>
</item>
<item>
<Key>ABC-342222</Key>
<value>test2</value>
</item>
<item>
<Key>XYZ-676767</Key>
<value>test2</value>
</item>
<item>
<Key>XYZ-565655</Key>
<value>test2</value>
</item>
</input_msgType>
Output Message1:
<BAPI_SEND_DATA>
<item>
<Key>ABC-123452</Key>
<value>test1</value>
</item>
<item>
<Key>ABC-342222</Key>
<value>test2</value>
</item>
</BAPI_SEND_DATA>
Output Message2:
<BAPI_SEND_DATA>
<item>
<Key>XYZ-676767</Key>
<value>test1</value>
</item>
<item>
<Key>XYZ-565655</Key>
<value>test2</value>
</item>
</BAPI_SEND_DATA>
I have to send the same rfc request data to two sap systems..all the key with ABC starting Key should go to SAP system1
and all the key with XYZ key should go to SAP system 2.
Should I split the message in mapping - if so how can i do it? What kind of BPM steps should I do?
Can I do this in receiver determination itself using condition? THanks for suggestions and help..
Thilothama
Hi, This can be achived by having the same SOAP message to RFC1 and SOAP- RFC2 so you will be having 2 message mapping and 2 interface mapping.
in the receiver determiantion if you have any condition specify that else just give the 2 different SAP system and in the interface determination specify the 2 RFC 's as 2 different interface.
I had the same scenarion and it worked perfectly.
If you need any more help send me your email i can send you the doc.
regards,
Shree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have two message/interface mappings one mapping that maps th source to bapi11 and target to bapi2.
Create 2 interface determinations with 2 recievers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do this in Message Mapping itself. You can use use "startsWith" function of Text category to check and use that to Map accordingly.
If your scenario is a synchronous scenario then u need to go for BPM.
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This you can do based on the Mapping.. ie. You need to search for all the key in the input xml and then generate corresponding structure for each key value.
For this it is prefer to use Java Mapping, where you can look for the key and group them together and post one RFC per Key...
anyway you have BPM inplace and you can execute this transformation step over there.
In this case, for each key it will create one RFC. ie even you can have ForEach Loop to call the RFC in the BPM
Hope this helps,
regards,
moorthy
Krishna Moorthy,
I came to a point where I decided that Java mapping would be the best for this. But do you have some sample starts for this??? I would appreciate if you can show me some light...
Would something like this help??
public void getPhonesById(String[] a, String[] b, String[] c, ResultList result, Container container){
Map map = (Map) container.getParameter("phones");
if (map == null){
map = new HashMap();
for (int i = 0; i<b.length; i++){ // if the payload is valid to xsd, b and c have equal length
List list = (List) map.get(b<i>);
if (list == null){
list = new ArrayList();
map.put(b<i>, list);
}
list.add(c<i>);
}
container.setParameter("phones", map);
}
List list = (List)map.get(a[0]);
for (int i = 0; i< list.size(); i++) result.addValue((String) list.get(i));
}
Thanks and appreciate your help
Thilothama
Message was edited by:
Thilothama v
> The weblog mentioned above splits the message into
> two different target messages. Can anyone point me to
> an example where the target message occurance is
> unbounded and based on the key values in input -
> group them and for every unique key, a target msg is
> created? Thank you...
Hi,
You can use multimapping without BPM for a single message as well. Your requirement is that you need to group your KEY into a single rfc request message.
Well, change the occurence of the target message to N in the message and interface mapping and do the mapping logic to create N numbr of RFC request messages to be sent via the RFC adapter and it will work fine.
Multi Mapping does not refer to only having multiple messages of different type it can also be multiple messages of the same type.
Regards,
Bhavesh
Hi,
><i>Can I do this in receiver determination itself using condition? THanks for suggestions and help..</i>
This cannot be done on the reciever determination as you need to filter records on the basis of the key values and then combine all key values into a single RFC message ( one each for every key value) .
You would need to use a Split / Multi Mapping and so, follow the blog in my previous reply and it can be achieved.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
No need for a BPM.
You can do a multimapping without a BPM from Sp14 onwards.
Take a lookat this blog,
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.