Skip to Content

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

UDF in mesage mapping.

Hi

I am trying to create a message mapping where the input and output messages are as follows.

Input:

<MT_Request >(1..1)

<ItemData>(1..1)

<Item>(0..unbounded)

<Invoice/>(1..1)

<TaxCode/>(1..1)

</Item>

</ItemData>

<TaxData>(0..1)

<Tax>(0..unbounded)

<TaxCode/>(1..1)

<TaxIndetifier/>(1..1)

<TaxAmt/>(1..1)

</Tax>

</TaxData>

</MT_Request>

Output:

<MT_Response>(1..1)

<Response>(1..1)

<ResponseData>(0..unbounded)

<Invoice/>(1..1)

<ServiceTax/>(1..1)

</ResponseData>

</Response>

</MT_Response>

The mapping as follows

Invoice --> Invoice

If {(TaxCode in Item = TaxCode in TaxData) and

TaxIndetifier = constant value like A}

ServiceTax = TaxAmt

Here the Item Tag in request message is repeated as well as Tax Tag. So for each TaxCode under Item Tag, the programme should go and check all theTaxTag for the same Taxcode. If the values are same, then Taxfinder check will be done and then the TaxAmt value will be put in ServiceTax.Is there any way to do this by UDF???

Also please tell me when we are taking a parent node with child nodes (like TAX) and giving that as an argument to the UDF as a string array, what values will come inside the array???

regards,

Biranchi

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