cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping one ID with several entries

former_member69608
Participant
0 Kudos

Hi,

I got a problem I'm not sure how to resolve.

My data looks something like below. The numbers is representing a customer, and the text next to it what type of message that customer can use.

What I need is to take the unique customer number and tell the target side what messages this customer can use. Also, the optimal solution for my target side would be if each type of message could be represented as an "X". The messagetype needs to be in the same order for all customers.

123456 INVOICE

123456 ORDER

123456 ORDERRESPONSE

654321 ORDER

654321 DISPATCHADV

111111 INVOIC

So target could look something like this:

123456 ORDER, ORDERRESPONSE, INVOICE, ,

654321 ORDER, , ,DISPATCHADV

111111 , ,INVOICE

And the optimal solution:

123456 X, X, X, ,

654321 X, , ,X

111111 , ,X

So the "X" states what kind of message type it is, and the comma separates the message types from each other.

any idea how to solve this? I need to write this to a text file, so I guess I'm going to use content conversion.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Stefan,

You can use Target Structure like below then it is easy to use it in receiver FCC.

Customer

    Item (0...unbounded)

         CustomerNumber(1..1)

         OrderIndicator(1..1)

         OrderRespIndicator(1..1)

         InvoiceIndicator(1..1)

         DispatchAdviceIndicator(1..1)

Regards,

Praveen.

former_member69608
Participant
0 Kudos

Hi,

I'm almost there, the problem now is that each row creates a entry. Look at this picture. I'm sorry the elements have other names now, im just trying to figure out how this works.

Each CSENDER should create a "Supplier".

former_member184720
Active Contributor
0 Kudos

CSENDER -> remove context -> sort -> split by value (value change)-> collapse context -> "Supplier" node

For the fields under it, you should use sort by key with CSENDER and then at the end you should add Split by value.

former_member182412
Active Contributor
0 Kudos

Hi Stefan,

  • Use below mapping for Supplier and GLN field.

  • Use below mapping for Indicator fields.


Regards,

Praveen.

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Stefan,

If you have the below data in XML format then you can transform that data in below structure

123456 INVOICE

123456 ORDER

123456 ORDERRESPONSE

654321 ORDER

654321 DISPATCHADV

111111 INVOIC

Target structure

Data (0...n)

     Customer ID - 123456 (1...1)

     MesTyp - ORDER (1..n)

Then this information can be transform into flat file using FCC.

regards,

Harish