on 07-01-2008 5:07 PM
Hi all,
I am following this example.
http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm
However i have a requirement such that the occurence of internalRequest and externalRequest of the target message should be 1..1
Thus when the source message has only <request type="internal">, externalRequest still needs to be created and the elements would be fill by empty constants.
Do i have to modify it to a field level kind of mapping?
Is there an easy way to achieve this?
Hi,
You can use mapWithDefault and enter a default value. Just mention an empty constant in that and map it with each field under external request. Whenever the value is not coming from source it will insert the constant. so your elements will be created but without any value.
Kulwinder
Reward if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is
Source message
<RequestListMsg>
<request type="internal">
<creator>
creator1
</creator>
<contact>
contact1
</contact>
<description>
description1
</description>
</request>
<request type="external">
<creator>
creator2
</creator>
<contact>
contact2
</contact>
<description>
description2
</description>
</request>
</RequestListMsg>
Target Msg
<ns0:RequestListEIMsg xmlns:ns0="workshopDemo">
<internalRequest>
<initiator>
creator1
</initiator>
<contact>
contact1
</contact>
<issue>
description1
</issue>
</internalRequest>
<externalRequest>
<initiator>
creator2
</initiator>
<contact>
contact2
</contact>
<issue>
description2
</issue>
</externalRequest>
</ns0:RequestListEIMsg>
So if source msg does not have <request type="external">, i would like to still create the <externalRequest> in the target message and fill in the elements with empty values.
How can this be achieve?
Edited by: SAP noob on Jul 2, 2008 9:01 AM
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.