cancel
Showing results for 
Search instead for 
Did you mean: 

grouping records based on identifier into seperate files

former_member203631
Participant
0 Kudos

Hi,

I have a file to file(s) scenario, where in the source file I will get a collection of records with identifier in the first place of a record, now I need to group the records in to seperate files based on the identifier.

Ex:SFile

identifier1,field1,field2

identifier2,field1,field2,field3,field4

identifier2,field1,field2,field3,field4

identifier1,field1,field2

identifier3,field1,field2,field3,field4,field5

identifier2,field1,field2,field3,field4

identifier1,field1,field2

identifier1,field1,field2

identifier3,field1,field2,field3,field4,field5

identifier4,field1,field2,field3,field4,field5,field6

..... and so on.

required:-

TFile1 with idetifier1 records

TFile2 with idetifier2 records

TFile3 with idetifier3 records

TFile4 with idetifier4 records

Can any one helpme how to handle this scenario.

Accepted Solutions (0)

Answers (5)

Answers (5)

ranjit_deshmukh
Active Participant
0 Kudos

Hi,

is your problem solved?

if so can you please close this thread?

Ranjit

ranjit_deshmukh
Active Participant
0 Kudos

Hi,

Do one thing- first of all create a source structure which can contain all the data given by you.

lets say like

<DATA1>

<identifier1>

<field1>

<field2>

<DATA2>

<identifier2>

<field1>

<field2>

<field3>

<field4>

.

.

.

and once you get this; create separate target message structure for each of these.

And in Mapping under 'Messages' tab add your diff target messages, and complete your mapping for each.

in this manner you will be able to achieve your target I think.

Ranjit

Former Member
0 Kudos

Hi,

Is there any fixed number of identifiers? if yes do as below....

take that many times your target structure in the target side.

for that just righy click duplicate node. And now you can map your source identifier to the target node to

create file based on each identifier.

Cheers

Ram

Former Member
0 Kudos

Hi,

you could use the split files functions with multi mapping and with BPM to create seperate files.

Here you need to decide the max

Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

here you are aware with two message types but now if you are looking for runtime to be decide about the no of message types, then I will suggest you to modify the BPM with belo logic,

1. On the basis of Identifires create multiple records in with single Message type structure on receiver end.

2. In BPM add the transformation and send step in loop to create new file for each record.

for similar Identifiers you need to add the records in single file with multiple occurance of sub-node under Identifier.

idetifier1 0...Unbounded

L--> records 0...Unbounded

This will be possible.

thanks

Swarup

Former Member
0 Kudos

hi,

Use keyword parameter in file content conversion ...