cancel
Showing results for 
Search instead for 
Did you mean: 

Help required in mapping

Former Member
0 Kudos

Hello Friends,

I am stuck with mapping, need a quick help.

My Scenario is one file to multiple file splitting based on some condition.

I have used the same structure at both side & changed the occurrence to 0..unbounded in signature tab.

I am able to create the required files based on the validation what i have put and able to replicate to details node correctly.  But I am getting problem while replicating the data properly to details node.

My Source & Target Structures are like below

Source Structures

Messages

Messages1

TavelExpenses 1

Records 1..1

   Header 1..1

   Details 0..unbounded


Target Structures

Messages

Messages1

TavelExpenses 1..unbound

Records 1..1

   Header 1..1

   Details 0..unbounded

for ex. my source file have to split to 3 files based on Ledger & CompanyCode..  Ledger & CompanyCode fields comes under details node.

When CompanyCode+Ledger as same then I have to create the different files.  For example company code & Ledger coming like below

Header

|||||||

Details

|||||1000|AU1-100

|||||1000|AU1-100  - I have to create one file.

||||1000|AU1-100

|||||1000|AU1-100

|||||4510|P15-100

|||||4510|P15-100

|||||1000|AU1-110

|||||1000|AU1-110

|||||4510|P15-100

|||||4510|P15-100



Here I have to create 3 files because 1000+AU1-100, 1000+AU1-110 & 4510+P15-100.  I am sorting data based on CompanyCode+Ledger no to get all records into one file.


Each File should contain header node, Details record should repeat acccordingly.


File1 - 1000+AU1-100


Header

4 Detail records


File2 - 1000+P15-100


Header

2 Detail records


File2 - 1000+AU1-110


Header

4 Detail records


I am able to create 3 files & Header node as well as Details Segments.  But I am facing the problem while splitting the data in detail records.


Please find the mapping that I have did for Detail Segment.


Can you please help me how to split detail segment data. 

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Satish,

Please create UDF similar to grouping UDF in this blog.

Please read comments in code.

sahithi_moparthi
Contributor
0 Kudos

Hi Satish,

Please provide the display queues for the above mapping.

Former Member
0 Kudos

Hi Satish,

Please find the queues for the detail function logic.

1st parameter queues

2nd & 3rd Parameter queues are same

Detail Segment Queue

I have done one to one mapping for fields in detailed segment.  Your help is much appreciated.

Thanks,

Satish.

sahithi_moparthi
Contributor
0 Kudos

Hi Satish,

Use Splibyeach value after useone as many .