Skip to Content
author's profile photo Former Member
Former Member

Message Mapping

Hi

I am facing the issue in message mapping.

could any one of you please tell me how i can move for my mapping.

we have a flat file with the Header & Items, further we can have multiple line Items for each header.

and a single file can have have the muttiple header & for each header the file can have multiple Items.

That means the data Type for a single record set in the XI will be

Parent Node (o...Unbounded)

Header(1..1)

Key

OperationType

DocumentID

Items(0...unbounded)

Key

ItemNo

Quantity

further in header we have two fields Operaiton type & Document ID.

If the OperationType & DocumentID in the file are equal for a header then i have to combine all the Items for all that headers into a single header.

and there is no relationship given betwen the Header & Items.

for example if i am getting the input data as

HR123

I123

I213

I325

I426

HR124

I123

I213

I325

I426

HR123

I123

I213

I325

I426

then the output will be

HR123

I123

I213

I325

I426

I123

I213

I325

I426

HR124

I123

I213

I325

I426

could any one of you please tell me how i cna proceed for this

Thanks

Rinku Gangwani

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 02, 2009 at 08:34 AM

    Hi Rinku,

    This is a complex requirement and I think it be difficult to explain it here.

    But you need to use sort by key built in function to get the desired result

    Regards

    Suraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2009 at 03:54 AM

    Lets say in target you have Recordset, header and line. The mapping will be as follows.

    Recordset Mapping:

    Concatenate A & B --> remove context --> sort --> Split by value change --> collapse context --> Recordset.

    Header Mapping:

    Source Header to target header- 1:1 Mapping

    Header Field mapping:

    Header Field --> remove context --> sort --> Split by value change --> collapse context --> split by each value --> target header field.

    Line node:

    (Line node) will be first input to format by example and (Concatenate A & B --> remove context --> sort --> Split by value change) will be second input to format by example. Pass output of format by example to target line node.

    Line node field mapping:

    (Concatenate A & B --> remove context) will be first input to sort by key and (source field --> remove context) will be second input to sort by key function. Pass output of sort by key to Split by each value and then to target line item field.

    I have tested this and it works. Let me know if u face any issue

    Warm Regards,

    Gouri

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.