Skip to Content

grouping records based on identifier into seperate files

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2008 at 06:57 AM

    hi,

    Use keyword parameter in file content conversion ...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2008 at 07:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2008 at 07:51 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2008 at 08:16 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 05:32 AM

    Hi,

    is your problem solved?

    if so can you please close this thread?

    Ranjit

    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.