Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Mapping Problem . or help in UDF

Hi...

I am having problem in mapping.

I am having 3 messages in the source structure and 1 message in the target structure. 3:1 mapping.

Source Messages:

Message1: Warehouse Details(plant name,warehouselocation)

Message2:Supplier Details(suppid,suppname,leadtime,matname,cost)

Message3:Input(matname,plant,unit,item,itemname,ReqQty,OrderQty,Cost,suppid,suppname,leadtime,date,warehouseloc)

Target Message:

Output

If the Availability field in Message3 !=0, then it should map warehouseloc of message 1 to the Output mesage. or else it should map 0 to the warehouse and map message 2 items to the output message.

Source messages are 0:unbounded.

Could you please help me out in this issue. or else can you please tell how to write the userdefined function for that.

Below is the structure.

Source Message:

-


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:getWareHouseDetailsResponse xmlns:ns1="http://DefaultNamespace">

<getWareHouseDetailsReturn>

<Plant>

<plantName/>

<wareHouseLocation>W001</wareHouseLocation>

</Plant>

</getWareHouseDetailsReturn>

</ns1:getWareHouseDetailsResponse>

</ns0:Message1>

<ns0:Message2>

<ns2:GetPreferredSuppliersResponse xmlns:ns2="http://tempuri.org/">

<ns2:GetPreferredSuppliersResult>

<ns2:Supplier>

<ns2:SupplierId>S001</ns2:SupplierId>

<ns2:SupplierName>TRW</ns2:SupplierName>

<ns2:LeadTime>1111</ns2:LeadTime>

<ns2:MaterialName>M001</ns2:MaterialName>

<ns2:Cost>1000</ns2:Cost>

</ns2:Supplier>

</ns2:GetPreferredSuppliersResult>

</ns2:GetPreferredSuppliersResponse>

</ns0:Message2>

<ns0:Message3>

<ns3:MT_Output xmlns:ns3="http://BlockTest">

<Material>

<Matname>M001</Matname>

<Plant>P001</Plant>

<Unit>KG</Unit>

<Item/>

<Itemname/>

<ReqQty>5</ReqQty>

<AvailQty>0</AvailQty>

<Cost/>

<Suppid/>

<Supname/>

<LeadTime/>

<Date>12.05.2008</Date>

<OrderQty>0</OrderQty>

<WarehouseLoc/>

</Material>

<Material>

<Matname>M002</Matname>

<Plant>P002</Plant>

<Unit>PC</Unit>

<Item/>

<Itemname/>

<ReqQty>5</ReqQty>

<AvailQty>5000</AvailQty>

<Cost/>

<Suppid/>

<Supname/>

<LeadTime/>

<Date>12.05.2008</Date>

<OrderQty>0</OrderQty>

<WarehouseLoc/>

</Material>

<Pcost/>

<Tcost/>

<Ocost/>

</ns3:MT_Output>

</ns0:Message3>

</ns0:Messages>

Target Message:

-


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns3:MT_Output xmlns:ns3="http://BlockTest">

<Material>M001</Material>

<Plant>P001</Plant>

<Unit>KG</Unit>

<Item></Item>

<Itemname></Itemname>

<ReqQty>5</ReqQty>

<AvailQty>0</AvailQty>

<Cost>1000</Cost>

<Suppid>S001</Suppid>

<Supname>TRW</Supname>

<LeadTime>1111</LeadTime>

<Date>12.05.2008</Date>

<OrderQty>0</OrderQty>

<WarehouseLoc>0</WarehouseLoc>

</Material>

<Material>M002</Material>

<Plant>P002</Plant>

<Unit>KG</Unit>

<Item></Item>

<Itemname></Itemname>

<ReqQty>5</ReqQty>

<AvailQty>0</AvailQty>

<Cost>1000</Cost>

<Suppid/>

<Supname/>

<LeadTime/>

<Date>12.05.2008</Date>

<OrderQty>0</OrderQty>

<WarehouseLoc>W001</WarehouseLoc>

</Material>

</ns3:MT_Output>

</ns0:Message1>

</ns0:Messages>

Edited by: leelaratnam morampudi on Oct 14, 2008 1:13 PM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question