Split Single IDOC into Multiple IDOC's Based on Segment Type

Hi Experts,
I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on Segment Type
Outbound:
ZIdocName
Control Record
Data Record
Segment 1
Segment 2
Segment 3
Status Record
I should get output like below
Inbound:
ZIdocName
Control Record
Data Record
Segment 1
Status Record
ZIdocName
Control Record
Data Record
Segment 2
Status Record
ZIdocName
Control Record
Data Record
Segment 3
Status Record
Please suggest me step by step process to achieve this task.
Thanks.

Thanks a lot Harish for reply.
I have small doubt. According to your reply , If we have N number of segments in single IDOC with same fields in all segments then for splitting Single IDOC into Multiple IDOC's based on Segment Type we need to duplicate N number of target IDOC tree structure.
Is that possible to Split single IDOC into Multiple IDOC's based on Segment Type using only one Target IDOC structure without duplicating the Target IDOC structure tree.

Similar Messages

  • How can I split an Orders05 iDoc into multiple iDocs?

    Hello,
    Can one of you experts please tell me how I can split an ORDERS05 iDoc into multiple iDocs based upon Delivery addresses? 
    For example, if the iDoc contains 3 different Delivery Addresses then I need to split it into 3 iDocs.
    It has been suggested to me that I can Create a custom function module. In this custom fm split the idoc into 3 based on the delivery address and create it using the FM MASTER_IDOC_DISTRIBUTE.
    Problem is I don't know how to do this.  Any help is greatly appreciated.  Thanks.
    Dan

    Hi Dan Avis
    Write a Custom  Z program .
    1 get order05 idoc number....
    2 get the segment details...(Based on you condition...)
    3 In a loop  send the data to the FM MASTER_IDOC_DISTRIBUTE  (Based on you condition...)
    4 IDOC will generated,,,every loop and
    5 Change the status of original idoc .
    or
    Create Function module and use the FM as process code to create 3 idocs...and processs...new generated idoc and block original idocs...
    Call me if you have questions  @ 302 290 5677
    Thanks
    Ramesh

  • Split the IDOC into multiple IDOC if the IDOC has more than 500 records

    Hi All,
    I developed an outbound IDOC in which we are facing an issue.
    There is some limitation on the maximum idoc size it can handle.
    If number of records is more than 500, split the idoc into multiple iDoc's, e.g. if it would have 1300 records , the result would be 2 iDoc's with 500 records, and the last one would have 300 records
    How can i acheive this.
    Regards
    Jai

    Hi,
    1) first you need to know which message type/Idoc type you are triggering.
    2) Get the Corresponding processcode from Partner profiles(WE20/ WE41).
    3) Then the look for prper user-exit in the related processing FM.
    4) write logic to split the IDoc accordingly.
    if no proper user exit available then copy the standard processing FM and need to all ALE related configurations.
    Catch hold any ABAP expert in your team to do all these.
    Suresh

  • Splitting single video into multiple files - workflow improvements?

    I regularly need to split a single video into multiple separate files that are used by other programs.  I'm using Premiere Pro CS4 for a number of reasons including the ability to easily and accurately select a scene by individual frames, native audio and video effects/filters, and the ability to import and export various video types.  I'm open to using other tools, but I haven't yet found one that is even close to Premiere Pro when it comes to accurately selecting split points.
    I'm not a Premiere Pro expert.  I have been doing this for about four months and have read many resources (books, forum posts, help guides) to refine the workflow I'm currently using.  My question:  does anyone know any improvements that might save me time/keystrokes.
    Current workflow:
    I've bound F8 to File > Export > Media
    Import video file
    Open in source monitor
    Set In and Out points for scene in source monitor
    Ctrl-drag from source monitor to Project Panel (creates a subclip)
    Repeat 3 and 4 for all scenes/subclips
    Select all subclips from Project Panel and drag to timeline
    Set work area bar to first subclip in timeline by the following four keystrokes:  Home, Alt-[, PageDown, Alt-]
    Type F8 (File > Export > Media shortcut).  Type output file name, click OK and the first subclip is put in the AME queue
    For the remaining subclips, type: Alt-[, PageDown, Alt-], F8, output file name, OK and repeat until done
    Any thoughts/ideas on workflow improvements?
    Thank you!

    Thank you Hunt.
    For the sake of brevity, I didn't include all of the details about the various aspects of the projects.
    Early on I was doing what you suggested and yes, it is a little quicker.  I learned (painfully) a couple of months later that I sometimes have to go back and adjust the clips and this method (trim to timeline with no subclips) resulted in quite a bit of duplicate effort (to reobtain start/stop points).  I've since learned that managing the "scenes" as subclips in topical bins allows me to go back and make adjustments, long after I've totally forgotten about the project content, without a lot of unnecessary reworking.

  • Split single row into multiple rows containing time periods

    Hi,
    I have a table with rows like this:
    id, intime, outtime
    1, 2010-01-01 00:10, 2010-01-3 20:00
    I would like to split this row into multiple rows, 1 for each 24hr period in the record.
    i.e. The above should translate into:
    id, starttime, endtime, period
    1, 2010-01-01 00:10, 2010-01-02 00:10, 1
    1, 2010-01-02 00:10, 2010-01-03 00:10, 2
    1, 2010-01-03 00:10, 2010-01-03 20:00, 3
    The first starttime should be the intime and the last endtime should be the outtime.
    Is there a way to do this without hard-coding the 24hr periods?
    Thanks,
    Dan Scott
    http://danieljamesscott.org

    Thanks for all the feedback, Dan.
    It appears that the respective solutions provided will give you: a) different resultsets and b) different performance.
    Regarding your 'truly desired resultset' you haven't answered all questions from my previous post (there are differences in the provided examples), but anyway:
    I found that using CEIL or ROUND makes quite a difference, using my 'simple 3 record testset' (30 records vs. 66 records got initially returned, that's less than half of the original). That's quite a difference. However, I must call it a day (since it's almost midnight) for now, so there's room for more optimizement and I haven't thoroughly tested.
    But this might hopefully make a difference performancewise when compared to my previous 'dreaded example':
    SQL> drop table t;
    Table dropped.
    SQL> create table  t as
      2  select 1 id, to_date('2010-01-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-01-03 20:00', 'yyyy-mm-dd hh24:mi') outtime from dual union all
      3  select 2 id, to_date('2010-02-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-02-05 20:00', 'yyyy-mm-dd hh24:mi') outtime from dual union all
      4  select 3 id, to_date('2010-03-01 00:10', 'yyyy-mm-dd hh24:mi') intime, to_date('2010-03-03 00:10', 'yyyy-mm-dd hh24:mi') outtime from dual;
    Table created.
    SQL> select id
      2  ,      max(intime)+level-1 starttime
      3  ,      case
      4           when level = to_char(max(t.outtime), 'dd')
      5           then max(t.outtime)
      6           else max(t.intime)+level
      7         end outtime
      8  ,      level period      
      9  from   t
    10  connect by level <= round(outtime-intime)
    11  group by id, level
    12  order by 1,2;
            ID STARTTIME           OUTTIME                 PERIOD
             1 01-01-2010 00:10:00 02-01-2010 00:10:00          1
             1 02-01-2010 00:10:00 03-01-2010 00:10:00          2
             1 03-01-2010 00:10:00 03-01-2010 20:00:00          3
             2 01-02-2010 00:10:00 02-02-2010 00:10:00          1
             2 02-02-2010 00:10:00 03-02-2010 00:10:00          2
             2 03-02-2010 00:10:00 04-02-2010 00:10:00          3
             2 04-02-2010 00:10:00 05-02-2010 00:10:00          4
             2 05-02-2010 00:10:00 05-02-2010 20:00:00          5
             3 01-03-2010 00:10:00 02-03-2010 00:10:00          1
             3 02-03-2010 00:10:00 03-03-2010 00:10:00          2
    10 rows selected.
    SQL> By the way: I'm assuming you're on 10g, is that correct?
    Can you give us some information regarding the indexes present on your table?

  • Splitting a message into multiple Idocs

    Hi,
    IDOC adapter does not support MULTIMAPPING.
    You cannot use MultiMapping with the IDOC adapter.
    Instead , use IDOC packaging. Refer to note : 814393.
    Regards,
    Bhavesh

    Thankyou for the reply, but that's the same trick I already found in Michal's blog, so it isn't really an answer to the question!
    I was hoping that someone could direct me to some useful documentation of Integration Processes, as the SAP help is a bit limited in explaining how things actually fit together.
    Message was edited by: Nathan Shepperd

  • Split single transaction into multiple PDFs

    I have a single XML file that contains a form that overflows multiple times. I want each form to be treated as a separate transaction (i.e. I want each form to generate a separate pdf).
    From the FSISYS:
    < ExtractKeyField >
    SearchMask = 1,<Wrapper
    I want each of these Address Changes to result in a separate PDF.
    <Wrapper>
    <ProducerConfirmations beginTime="0001-01-01T00:00:00" endTime="0001-01-01T00:00:00" emailChange="true" nyFlag="NA">
    <AddressChange previousAddressId="ResidentAddr_Old" addressId="ResidentAddr" mode="email" responsys="e0740ace1f534391b464b03707874636" addressType="Residential" />
    <AddressChange previousAddressId="BusAddr1_Old" addressId="BusAddr1" mode="email" responsys="e0740ace1f534391b464b03707874636" addressType="BusinessAddress1" />
    <AddressChange previousAddressId="BusAddr2_Old" addressId="BusAddr2" mode="email" responsys="e0740ace1f534391b464b03707874636" addressType="BusinessAddress2" />
    <AddressChange previousAddressId="BusAddr3_Old" addressId="BusAddr3" mode="email" responsys="e0740ace1f534391b464b03707874636" addressType="BusinessAddress3" />
    <AddressChange previousAddressId="BusAddr4_Old" addressId="BusAddr4" mode="email" responsys="e0740ace1f534391b464b03707874636" addressType="BusinessAddress4" />
    </ProducerConfirmations>
    </Wraper>
    Any way I can force the PDF print driver to produce each page as a separate file?
    Muchas gracias,
    Dave

    You'd need to use class recipients and make this node the address field. There is not an other way to split at the transaction level.

  • Split single column into multiple column using sql /plsql

    create table test (name varchar2(255);
    insert into test values('DH  RED 20 12/10 10 2 ');
    insert into test values('PM  STUD 20 15/10 20 29.55' );
    insert into test values('LS  MENTHOl FILTER ASC 18/70 60 240.66');
    insert into test values('WINSTON WHITE CLASSIC 13    18/70 60 240.66');
    My Output should be like as below in other table :
    create table test_result (brand varchar2(255),packet   varchar2(50),amount varchar2(25),total varchar2(25));
    BRAND                                   PACKET       AMOUNT           TOTAL
    DH  RED 20                            12/10            10              2
    PM  STUD 20                           15/10            20              29.55
    LS  MENTHOl FILTER ASC               18/70            60              240.66
    WINSTON WHITE CLASSIC 13             18/70            60              240.66can you please help me to solve this issue
    thanks in advance
    Edited by: A on Apr 21, 2012 11:33 PM
    Edited by: A on Apr 21, 2012 11:34 PM
    Edited by: A on Apr 21, 2012 11:34 PM

    h4. # Database should be 10g. If version is below 10g query need to be modified as per string format.
    h4. # Split string into two parts by '/'. First part contain brand + packet(1), Second part contain packet(2) + amount + total
    h4. # Your brand name can be of any length.
    String Format* : <Brand Name><space><packet(1)>/<packet(2)><space><amount><space><total>
    SELECT name,
           REGEXP_SUBSTR(first_part,'.+[[:space:]]',1,1) brand,
           REGEXP_SUBSTR(first_part,'[^[:space:]]+/',1,1) || REGEXP_SUBSTR(second_part,'[^[:space:]]+[[:space:]]',1,1) packet,
           REGEXP_SUBSTR(second_part,'[^[:space:]]+[[:space:]]',1,2) amount,
           REGEXP_SUBSTR(second_part,'[^[:space:]]+$',1) total
    FROM
      (SELECT trim(name) name,
              trim(substr(name,1, instr(name,'/'))) first_part,
              trim(substr(name,instr(name,'/')+1)) second_part
       FROM test )
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Audio sync problem as soon as iMovie splits single DV into multiple MOV

    The original DV has perfect audio sync. When I split a clip (e.g. delete some frames), iMovie splits the files and changes to .MOV. The audio is now out of sync.
    Anyone else see this? Any work arounds?
    Thanks -- Sophie

    Hi
    Error -41   mFulErr  Memory full (open) or file won't fit (load)
    So if You've really got 40Gb free space on Start-Up (Mac OS) hard disk - Others DO NOT count as neither iDVD or Mac OS can use space there for it's temp files.
    Then I would close down Mac even disconnect Mains - Then re-start it and see if it got's it's memory right.
    Else
    • Audio from iTunes - use to give me problems - so I do - in iTunes
    • collect the needed audio into a new PlayList
    • Burn this out as an Audio-CD (.aiff) - NOT .mp3
    • Use thge files on this CD in movie projects
    Works for me.
    Yours Bengt W

  • Breaking up of, One IDoc to many IDocs & combing Many IDocs into one IDoc?

    Does anybody have any sample code of:
    Splitting an IDoc into multiple IDocs and
    Combining many similar IDocs into one IDoc
    Any pointers will be appreciated.
    Regards
    Mahesh

    This is the code for splitting of an inbound idoc into multiple idoc
    REPORT ztemp no standard page heading .
    ******************Data Declaration for selection screen***************
    TABLES: edidc,edidd.
    CALL SELECTION-SCREEN 9000.
    SELECTION-SCREEN: BEGIN OF SCREEN 9000,
                      BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS: idocno FOR edidc-docnum.
    SELECTION-SCREEN:END OF BLOCK b1 ,
                      END OF SCREEN 9000.
    *******************Data Declaration ************************************
    DATA : it_contrl LIKE TABLE OF edidc WITH HEADER LINE,
           it_hdata     LIKE TABLE OF edidd WITH HEADER LINE,
           it_fdata  LIKE TABLE OF edidd WITH HEADER LINE,
            it_gdata  LIKE TABLE OF edidd WITH HEADER LINE,
           it_data LIKE TABLE OF edidd WITH HEADER LINE,
           it_status LIKE TABLE OF bdidocstat WITH HEADER LINE,
           it_bdwfretvar LIKE TABLE OF bdwfretvar WITH HEADER LINE,
           it_bdi_ser LIKE TABLE OF bdi_ser WITH HEADER LINE,
           it_ldata LIKE TABLE OF edidd WITH HEADER LINE,
           it_tede2  LIKE  tede2,
           vbeln LIKE vbak-vbeln,
           idocnum LIKE  edidc-docnum,
           result LIKE bdwfap_par-result,
           it_stat LIKE edids.
    DATA : count TYPE i ,
           counter TYPE i ,
           temp TYPE i VALUE 1 ,
           line TYPE i ,
           tab LIKE sy-tabix.
    *********************passing values to control record*****************
    it_contrl-direct = '2'.
    it_contrl-rcvprn = 'ID3IDES802'.
    it_contrl-rcvprt = 'LS'.
    it_contrl-doctyp = 'ORDERS05'.
    it_contrl-idoctp = 'ORDERS05'.
    it_contrl-sndpor = 'ZSOFI'.
    it_contrl-sndprt = 'LI'.
    it_contrl-sndprn = '1000'.
    it_contrl-mestyp = 'ORDERS'.
    APPEND it_contrl.
    ************************Select query for data*************************
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_fdata
    WHERE   docnum IN idocno.
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_data
    WHERE   docnum IN idocno AND segnam NOT LIKE 'E1EDP%'  .
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_hdata
    WHERE   docnum IN idocno AND segnam  LIKE 'E1EDP%'.
    **************select query to count the no of E1EDP01 segment*********
    SELECT COUNT( * ) FROM edid4 INTO count  WHERE docnum IN idocno AND
    segnam = 'E1EDP01'.
    *************to determine the no of idocs to be generated************
    count = count / 5.
    PERFORM datasplit.
    **********************************for remaining idocs*****************
    counter = count MOD 5.
    IF counter NE 0.
      PERFORM dataremain. .
    ENDIF.
    *&      Form  datasplit
          text
    -->  p1        text
    <--  p2        text
    FORM datasplit  .
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      DO count TIMES.
        PERFORM split.
        perform idoccreate.
        enddo.
    ENDFORM.                   " datasplit
    *&      Form  SPLIT
          text
    -->  p1        text
    <--  p2        text
    FORM split .
      LOOP AT it_hdata.
        IF temp <= 5.
          ON CHANGE OF it_hdata-segnam.
            IF it_hdata-segnam = 'E1EDP01'.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
            ELSE.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
              temp = temp + 1.
            ENDIF.
          ENDON.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SPLIT
    *&      Form  dataremain
          text
    -->  p1        text
    <--  p2        text
    FORM dataremain .
      CLEAR it_gdata[].
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      LOOP AT it_hdata .
        IF sy-tabix  > 10.
          MOVE-CORRESPONDING it_hdata TO it_gdata.
          APPEND it_gdata.
        ENDIF.
      ENDLOOP.
      perform idoccreate.
    ENDFORM.                    " dataremain
    *&      Form  idoccreate
          text
    -->  p1        text
    <--  p2        text
    form idoccreate .
    ***********************for creating the inbound idocs****************
    CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
       EXPORTING
         pi_status_message             = it_stat
         pi_do_handle_error            = 'X'
       PI_NO_DEQUEUE                 = ' '
         pi_return_data_flag           = 'X'
      PI_RFC_MULTI_CP               = '    '
       IMPORTING
         pe_idoc_number                = idocnum
         pe_state_of_processing        = sy-subrc
         pe_inbound_process_data       = it_tede2     "for process code
        TABLES
          t_data_records                = it_gdata
      T_LINKED_OBJECTS              =
        CHANGING
          pc_control_record             = it_contrl
    EXCEPTIONS
       IDOC_NOT_SAVED                = 1
       OTHERS                        = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      COMMIT WORK.
    *it_contrl-status = '64'.
    modify it_contrl index 1.
    ****************for posting the idoc**************************
      CALL FUNCTION 'IDOC_INPUT_ORDERS'
        EXPORTING
          input_method                = 'A'
          mass_processing             = '1'
       IMPORTING
         workflow_result             = result
      APPLICATION_VARIABLE        =
      IN_UPDATE_TASK              =
      CALL_TRANSACTION_DONE       =
       DOCUMENT_NUMBER             = vbeln
        TABLES
          idoc_contrl                 = it_contrl[]
          idoc_data                   = it_gdata[]
          idoc_status                 = it_status[]
          return_variables            = it_bdwfretvar[]
          serialization_info          = it_bdi_ser[]
      EDI_TEXT                    =
      EDI_TEXT_LINES              =
       CLEAR : it_contrl-docnum.
      COMMIT WORK.
    endform.                    " idoccreate

  • How to Split Single Outbound Idoc into Multiples

    Hi guys
    Hope you all are doing good.
    Can you please let me know , How to Split Single Outbound IDOC into multiples.
    I am looking for some sought of configuration in IDOC/from SHIPMENT Configuration level.  Because this needs to be implemented for Shipment IDOCS.  Please let me know if this can be done through configurations apart from implementing  User exit or copying the outbound shipment function module.
    Awaiting for your valuable replies.
    Best Regards
    Shiva

    Hello,
    1. Routes
    2. Packaging used
    3. Shipment Type
    Regards
    Waza

  • Split single row in multiple rows based on date range

    I need sql script that can split single row in multiple rows based on start date and end date column in table.
    Thank you

    I agree to your suggestion of having a dates table permanently in the database. Thats how we also do for most of our projects as well
    But in most projects the ownership  of table creation etc lies with the client as they will be the DBAs and will be design approval authorities. What I've seen is the fact that though
    many of them are in favour of having calendar table they dont generally prefer having a permanent table for numbers in the db. The best that they would agree is for creating a UDF which will have
    tally table functionality built into it based on a number range and can be used in cases where we need to multiply records as above.
    Wherever we have the freedom of doing design then I would also prefer creating it as a permanent table with required indexes as you suggested.
    >> many of them are in favour of having calendar table they dont generally prefer having a permanent table
    Those people do not understand about database and are not DBAs :-)
    It is our job to tell them what is right or wrong.
    ** This is a real story! I had a client several years back, who was the CEO of a software company.
    He use the query:
    select * from table_name
    In order to get the last ID!
    The table_name was actually a view that took data from several tables, and the main table that he wanted to get the ID included several string columns, with lot of data!
    he actually pulled all this data to the application, just to get the lat ID in a specific table!
    It is our job as Consultants or DBAs to fix's his misunderstanding :-)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Single file to multiple IDOC's

    I have a scenario (File to IDOC) where single file creates multiple IDOC's.
    I got message mapping error in production for record 622.
    Question here is will the IDOC's till entries 621 be created in the ECC system or the entire messaged failed.?
    It is sure that from 622 nothing was processed.
    Thanks.

    So, in Mapping Mapping, in outbound interface, you certainly used an external definition with option "maxOccurs=Unbounded". is that right?
    Anyway, as in moni, you have only one XML message, and as you said to us that this message is in error in moni (so red flag), it's the wole message (file) which has been rejected.
    Have you check the WE02 (ECC) and IDX5 (PI) ?... because you will have directly your answer of your question "does my file is treated partially ? or completly rejected?" !
    regards.
    mickael

  • Split one IDoc into two IDocs ?

    hello all,
    I wanna split one IDoc into two IDocs in XI?
    how can implement it?
    plx give some suggestions.
    thx in advance
    best regards
    Yaning
    Message was edited by:
            Yaning Liu

    Yaning,
    Please find the below blog for changing the ocurrences of IDOC
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Best regards,
    raj.

  • C# Split xml file into multiple files

    Below i have an xml file, in this file, i need to split this xml file into multiple xml files based on date column value,
    suppose i have 10 records with 3 different dates then all unique date records should go into each file . for ex here i have a file with three dates my output should get 3 files while each file containing all records of unique date data. I didn't get any idea
    to proceed on this, thats the reason am not posting any code.Needed urgently please
    <XML>
    <rootNode>
    <childnode>
    <date>2012-12-01</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-01</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-02</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-03</date>
    <name>SSS</name>
    </childnode>
    </rootNode>
    </XML>

    Here is full code:
    using System.Xml.Linq;
    class curEntity
    public DateTime Date;
    public string Name;
    public curEntity(DateTime _Date, string _Name)
    Date = _Date;
    Name = _Name;
    static void Main(string[] args)
    XElement xmlTree = new XElement("XML",
    new XElement("rootNode",
    new XElement("childnode",
    new XElement("date"),
    new XElement("name")
    string InfilePath = @"C:\temp\1.xml";
    string OutFilePath = @"C:\temp\1_";
    XDocument xmlDoc = XDocument.Load(InfilePath);
    List<curEntity> lst = xmlDoc.Element("XML").Element("rootNode").Elements("childnode")
    .Select(element => new curEntity(Convert.ToDateTime(element.Element("date").Value), element.Element("name").Value))
    .ToList();
    var unique = lst.GroupBy(i => i.Date).Select(i => i.Key);
    foreach (DateTime dt in unique)
    List<curEntity> CurEntities = lst.FindAll(x => x.Date == dt);
    XElement outXML = new XElement("XML",
    new XElement("rootNode")
    foreach(curEntity ce in CurEntities)
    outXML.Element("rootNode").Add(new XElement("childnode",
    new XElement("date", ce.Date.ToString("yyyy-MM-dd")),
    new XElement("name", ce.Name)
    outXML.Save(OutFilePath + dt.ToString("yyyy-MM-dd") + ".xml");
    Console.WriteLine("Done");
    Console.ReadKey();

Maybe you are looking for

  • HD Channels freeze after 5 minutes

    Since the launch of BT sport my HD channels including new BT sport freeze after about 5 minutes.  Help suggests I restart Home Hub and BT vision box. This gets the system going for the next 5 minutes.  Note this is the behaviour whether accessing BT

  • Using OpenDoc to open a pdf in the exisiting window

    I figured out the syntax for opening a document in the same folder with no path.  But it opens it in a new window.  I would really like it to open in the same window as my original document, just like it would if I were to use the "open a file" comma

  • SSAS TechNet Gurus Announced for June 2014!

    The Results are in! and the winners of the TechNet Guru Competition June 2014 have been posted on the Wiki Ninjas Blog. Below is a summary, heavily trimmed to fit the size restrictions of forum posting.  BizTalk Technical Guru - June 2014   Steef-Jan

  • Incoterms in purchase order should appear only in header.

    Hi All, When the inter company purchase order is created with reference to purchase requistion, in some scenarios the header and item level incoterms are copied in the purchase order. 1. Incoterms in the header level of purchase order are copied from

  • ADF UIX cancel/rollback button?

    Hi We're having a fair amount of trouble implementing a "cancel" button in our ADF UIX application (JDev 10.1.2). Apologies to those who read this same post on the ODTUG mailing list..... I'm hunting for even a hint of an answer before I approach Ora