Split a record into multiple records

Hi,
I have situation where i need to split a record into multiple records.
InputData :
value|BeginDate |EndDate
15 |2002/10/15|2002/10/16
13 |2002/10/13|2002/10/20
19 |2002/10/19|2002/10/23
10 |2002/10/10|2002/10/12
OutPut :
10 |2002/10/10|2002/10/12
13 |2002/10/13|2002/10/15
15 |2002/10/15|2002/10/16
13 |2002/10/16|2002/10/19
19 |2002/10/19|2002/10/23
Thanks

Hi ,
As a far I understood from your example ,
I have few questions...
1. You have information about the patient in a 1 source table.
2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
Or give some more information with a example ..that would be great ...
Thanks

Similar Messages

  • Split a record into multiple records (rows)

    I am using ODI to move data from source system to target system .Both are Oracle . In the source system I have a record which I need to split into multiple records or rows in the target system based on some rules . How can I achieve this in ODI . Please explain

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • Split one record into multiple records in Update Rules

    Hello All,
    I am trying to split a single record from R/3 into 2 records.
    My data flow is form R/3 > PSA > ODS > Cube
    when loading data into ODS i have to add the original record as it is to ODS. For second record i have to check a condition, & change few keyfigure values to 0 and fill an extra field.
    Example:
    Record in R/3 :
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION|
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |
    Record in BW Comm_Structure.
    In Transfer rules i m writing an extra field to the R/3 record.
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION| NEW_FIELD |
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 | 2546352 |
    NEW_FIELD transfer routine :
    If employee NE 0
    Result  =  employee
    else.
    Result = 0 .
    Till this point everything works fine.
    Now i want to load this record into an ODS. I want to split the above single record into 2 records.
    Records in ODS should be :
    Month | %1 | %2 | %3 | % 4 | ORGUNIT | JOB| EMPLOYEE| POSITION| NEW_FIELD |
    02.2006 | 0 | 1 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |  0 |
    02.2006 | 0 | 0 | 0 | 0 | 3000000| 248 | 2546352 | 500000 |  2546352 |
    Condition for NEW_FIELD.
    For first record always NEW_FIELD =0.
    For Second Record
    If NEW_FIELD NE 0.
    Cahnge KF's  %1, %2, %3, %4 = 0.
    If EMPLOYEE is 0 then no need to create extra record.
    I tried to use achieve this using return table, but no success.
    Can any one help me with ABAP syntax please. I am bit weak in ABAP Programming.
    Thanks in advance.
    POPS

    Dear:
    You could do so in update routines. Select the 'return table' option.
    useful links:
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=2906656
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=913873
    https://forums.sdn.sap.com/click.jspa?searchID=10118555&messageID=2441579
    Thanks

  • Splitting the single record into multiple records based on validity

    Hi Guru's,
    basically i am an BI consultant with less knowledge on ABAP, can i request your help on the ABAP task.
    I am working on HR module which is integrated with SAP BI,  the reports will be executed based on calendar month the requirement is i should split the single record into a multiple records based on validity of the record.  basically the HR data would be in data from and date to. 
    below is the logic
    Check whether the start and end date of the record are in the same month and year.
    If yes  nothing changes
    If no  create multiple records
    1st record  original start date of the record u2018till end of that month
    Following record  1st of the next month  u2018till last day of the month
    u2026
    Last record  1st of the month u2018till original end date.
    All fields will have the same values, only the datefrom and dateto fields change.
    Can any one please provide me the same code to proceed on my task.
    Thanks and Regards,
    Venkat

    Hi,
    Using Rule group we can split it.
    Using Rule Group in SAP-BI  Part - 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20rule%20group%20in%20sap-bi%20%20part%20-%201.pdf
    Thanks
    Reddy

  • Split and reformat single record into multiple records

    Hi ,
    I need to split 1 record in to  2 records with 1 new field(event)
    I have one internal table in this format
    No country stdate          enddate
    1    us        12/01/2006  10/07/2007
    i need to reformat this record like ;
    NO country  event    pldate           acdate 
    1     us          ga      12/01/2006   12/01/2006
    1     us          es      10/07/2007   10/07/2007
    Can any one resolve this issue?

    Check the example.
    report zrich_0001 .
    data: begin of itab occurs 0,
          no type i,
          country(3) type c,
          stdate  type sy-datum,
          enddate type sy-datum,
          end of itab.
    data: begin of itab2 occurs 0,
          no type i,
          country(3) type c,
          event(2) type c,
          stdate  type sy-datum,
          enddate type sy-datum,
          end of itab2.
    itab-no = 1.
    itab-country = 'US'.
    itab-stdate = '20061201'.
    itab-enddate = '20071007'.
    append itab.
    loop at itab.
      clear itab2.
      move-corresponding itab to itab2.
      itab2-event = 'GA'.
      itab2-enddate = itab-stdate.
      append itab2.
      clear itab2.
      move-corresponding itab to itab2.
      itab2-event = 'ES'.
      itab2-stdate = itab-enddate.
      append itab2.
    endloop.
    loop at itab2.
      write:/ itab2-no, itab2-country, itab2-event,
              itab2-stdate, itab2-enddate.
    endloop.
    Regards,
    Rich Heilman

  • Spilting a record into multiple record

    Hi experts, need your help for your to frame a query for the below requirement
    Scenario 1
    For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
    If minimum then select that record alone as shown below
    Item DC Store Serviceare Bgn Date Service Area End date Priority
    9856698 1469 2952 3/5/2011 12/31/9999 100
    9856698 3107 2952 12/10/2011 8/3/2012 35
    Item DC Store St Date End date Priority
    9856698 3107 2952 12/10/2011 8/3/2012 35
    Scenario 2
    For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
    If not minimum split the records for that group as shown below and select the record which has the lowest priority(35) and with minimum startdate and end date range.
    Item DC Store Serviceare Bgn Date Service Area End date Priority
    9856698 1469 2952 3/5/2011 12/31/9999 35
    9856698 3107 2952 12/10/2011 8/3/2012 100
    Item DC Store St Date End date Priority
    9856698 1469 2952 3/5/2011 12/9/2011 35
    9856698 3107 2952 12/10/2011 8/3/2012 100
    9856698 1469 2952 8/4/2012 12/31/9999 35

    Here comes the scenarios.....
    Scenario 1                              
    Query should check for priority record(25), if the start_date and end_date of that priority record is the max i that group, records will not have any split.
    output will be the same.
    DC     Store     St Date     End date     Priority          
    955     3     1/1/2010     12/31/9999     25          
    966     3     4/5/2011     10/10/2011     50          
    977     3     10/12/2011 12/12/2012     100          
    output                         Priority     
    955     3     1/1/2010     12/31/9999     25     1     
    966     3     4/5/2011     10/10/2011     50     2     
    977     3     10/12/2011 12/12/2012     100     3     
    Scenario 2
    If priority record is not covering the max range, then split the records as shown below,
    1. during the time period 1/1/2011 & 4/30/2011 there were no other DC for that store so rank would be 1
    2. the next range would be 5/1/2011 to 6/29/2011 we have 2 records in service so the record with low priortiy would be ranked 1 and second priority would be ranked 2
    3. similarly, for 6/30/2011 to 10/1/2011 we have 3 records in service and it will be ranked accordingly on the priority.
    DC     Store     St Date     End date     Priority          
    966     3     6/30/2011     10/1/2011     25          
    955     3     5/1/2011     11/30/2011     50          
    977     3     1/1/2011     12/31/2011     100          
    output                         Priority     
    977     3     1/1/2011     4/30/2011     100     1     
    955     3     5/1/2011     6/29/2011     50     1     
    977     3     5/1/2011     6/29/2011     100     2     
    966     3     6/30/2011     10/1/2011     25     1     
    955     3     6/30/2011     10/1/2011     50     2     
    977     3     6/30/2011     10/1/2011     100     3     
    955     3     10/2/2011     11/30/2011     50     1     
    977     3     10/2/2011     11/30/2011     100     2     
    977     3     12/1/2011     12/31/2011     100     1     
    Scenario 3     
    This works similar to scenario 2
    DC     Store     St Date     End date     Priority          
    966     3     2/1/2011     12/31/2011     25
    955     3     1/1/2011     12/31/2012     50          
    977     3     5/1/2011     06/31/2011     100          
    output                         Priority     
    955     3     1/1/2011     1/31/2011     50     1     
    966     3     2/1/2011     12/31/2011     25     1     
    955     3     2/1/2011     12/31/2011     50     2     
    977     3     5/1/2011     6/30/2011     100     3     
    955     3     1/1/2012     12/31/2012     50     1

  • 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

  • I use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    i use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    I have loaded my Firefox bookmarks into Internet Explorer Favorited. I also uninstalled Safari.
    I go to iTunes on my phone and see no wat to connect my iPhone to my laptop. I see Music, Shows, etc., the kind of stuff I would expect, but no clue as to how to proceed.
    Would you please be so kind to fill me in on how to "That syncing is done via iTunes. Connect the device to iTunes, select it, then go to the Summary page and select to sync bookmarks."?
    I am not sure what you mean by "Summary Page"
    Thank you

  • Splitting of a CSV File with Multiple Records into Multiple XML File

    Dear All,
    <b> I am doing a Scenario of CSV to XML Files. I am using BPM for the same. My incoming CSV File has got multiple records. I want to break this Multiple records into Multiple XML Files having one record each.</b>
    Can someone suggest how can I break this rather Split this into Multiple XML Files.
    Is Multimapping absoltely necesaary for this. Can't we do this without Multimapping. Can we have some workaround in the FCC parameters that we use in the Integration Directory.
    Kindly reply ASAP. Thanks a lot to all in anticipation.
    Pls Help.
    Best Regards
    Chakra and Somnath

    Dear All,
    I am trying to do the Multimapping, and have 0....unbounded also. Someways it is not working.
    <b>
    Smitha please tell me one thing...Assigning the Recordsets per Message to 1, does it mean that it will write multiple XML Files as I want.</b>
    Also I am usinf Set to Read only. So once the File is read it becomes RA from A. Then will it write the other Records.
    I have to use a BPM because there are certain dependencies that are there for the entire Process Flow. I cannot do without a BPM.
    Awaiting a reply. Thanks a lot in anticipation.
    Best Regards
    Chakra and Somnath

  • Split XML into multiple records

    Hi All,
    I have to split an XML field from a data type into multiple records on the target side.
    For eg: If the source XML string is something like this:
    <XML_STRING>
    <Data>
       <name>abc</name>
       <place></place>
             <addr1> </addr1>
             <addr2></addr2>
        </place>
       <name>xyz<name>
       <place>
             <addr1></addr1>
             <addr2></addr2>
         </place>
    </Data>
    </XML_STRING>
    Since the above XML string has two records in it (each record includes name and place), I would like to split those two into two separate records in the target structure and send it to ECC.
    How can I achieve this in PI mapping. Here in this case I cannot even differentiate between <> </> to split the messages since a single records might have multiple sub nodes in it. It is only believed that when "<name>" repeats again in the XML that would be a start of new record. Based upon that I need to split the records.
    Thanks in advance!!

    Hi Shweta,
    Minor correction is required for you source structure. Please follow Amit or Vila suggestion for content conversion.
    Did mapping as per your requirement. Please find the screen shot below. Please note the structure and cardinality of the element and node field.
    Hope result is as per your requirement.
    Regards
    Jitender

  • Insert Insert XML file into multiple records in Oracle Database

    I would like to find out if it is possible to insert a single XML file into multiple records or tuples in a Oracle database table. I have a single XML file which is at multiple levels. The meta data for the levels are common and each level can have meta data of their own in addition. I do not have any meta data field which will uniquely determine whether the data belongs to Root level, Intermediate level or at the document level. Is there any way I can determine which level the meta data belongs to and thereby make a corresponding entry into the database table tuple? For example I could have an attribute called level which is going to be present only in the database table and not in the XML file. If level=1 then it corresponds to "Root" meta data, if level=2 then it corresponds to "Intermediate" level and if level=3 then it corresponds to meta data at document level. I need a way to calculate the value for level from the XML file and thereby insert the meta data element into a tuple in a single table in Oracle.

    Hi,
    extract your xml and then you can use insert all clause.
    here's very small example on 10.2.0.1.0
    SQL> create table table1(id number,val varchar2(10));
    Table created.
    SQL> create table table2(id number,val varchar2(10));
    Table created.
    SQL> insert all
      2  into table1 values(id,val)
      3  into table2 values(id2,val2)
      4  select extractValue(x.col,'/a/id1') id
      5        ,extractValue(x.col,'/a/value') val
      6        ,extractValue(x.col,'/a/value2') val2
      7        ,extractValue(x.col,'/a/id2') id2
      8  from (select xmltype('<a><id1>1</id1><value>a</value><id2>2</id2><value2>b</value2></a>') col from dual) x;
    2 rows created.
    SQL> select * from table1;
            ID VAL                                                                 
             1 a                                                                   
    SQL> select * from table2;
            ID VAL                                                                 
             2 b                                                                    Ants

  • Function Module to convert multiple records into single record and vice-ver

    hi,
    i have a requirement to convert 10 records in an internal table to single record which should be passed
    to a single variable and store in the database.Kindly let me know is there any function module
    which meets my requirement. Also i need to do split one single record to 10 records each of
    say 65 length interval.
    kindly provide me if there is nay functinon module as such.
    I can do with ABAP-OOPS.Please suggest function module.

    I dont think such FM exists, but if you wanna code one it would be simple. Just loop through the internal table, keep concatenating the currently processing record into a long character variable to convert 10 records into one record.

  • Displaying single value (Record) into multiple columns

    Hi All,
    I want to display the single record into multiple columns. Please let me know How to achieve this..
    Record:
    Lvl Activity Acre
    6 Week 4 (Same value to be displayed into 3 columns.)
    REquired output:
    lvl Activity PH1 PH2 PH3
    6 Week 4 4 4
    Thanks
    Kavi

    user533671 wrote:
    Hi,
    Thanks for immediate reply.
    PH1, PH2, PH3, ... will go more columns based on parameter , what we are passing.An single SQL statement cannot have a dynamic number of columns based on the data itself. The projection (columns returned) have to be known before any data is fetched... and that includes some 'parameter' value.
    {thread:id=2309172}
    You can build a query dynamically, based on a parameter or even on the data, but 99 times out 100 people use dynamic queries where they are not needed.
    Perhaps explain to us what you are really trying to achieve and why, and we could suggest some better way.

  • Tag an UCM document into multiple records

    What is the best way to tag a document into multiple records in UCM 11g ? In my webcenter application , a builder having site with many plots (say 100) wants a document in UCM to be tagged against some selective plots(say 1-10). He can again change the tagging (ie. he can add more plots or remove the tag from existing etc) . Each home owner will have either one or more plots . When the home owner logs in, he should be able to see that document which is tagged against that plot.
    Thanks ....

    Hi wilsonea,
    You're probably thinking of InDesign's Data Merge function.  Here are two links that may help you decide if this is what you're thinking of doing:
    InDesign Help | Data merge
    How to data merge in InDesign tutorial - YouTube
    If this is what you're thinking of, you'll need the design laid out in InDesign and a CSV file.  The above YouTube video provides a decent instructions on this.
    When you save your Excel file as a CSV file, I recommend that you also save it as a XLS (not XLSX) file too.  The CSV file will not save any formatting (like column widths and cell formatting), which makes it difficult to read the cell content whenever I have to use the file often.
    Hope this helps.  Cheers!

  • 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.

Maybe you are looking for

  • Bug in the copy cluster roles wizard - CSV reparse points cannot have names with spaces

    Hi All, I have identified a bug in the copy cluster roles wizard in 2012 R2, which is preventing me from migrating my clusters from 2008 R2 & 2012 to 2012 R2. The bug surfaces when you attempt to copy a VM role from a 2008 R2 or 2012 cluster that has

  • Java plug in 1.4.0.......????

    i installed java jdk1.4 and after that ,when running any applet on browser..it mension me that "java plug in 1.4.0 is not installed properly.." i unstalled java and installed it again and also ,it give me the same message ??????????????

  • Embedding javascript in a sql query

    Hello everybody, that is the question, how can a JavaScript function like: getElementById can be (if at all be embedded in a sql query? the thing is that when I do the query SELECT firstname, lastname etc WHERE branchnumber = here is where I want to

  • J!INQEFILE report TDS section wise

    Hi Gurus, In T-code J1INQEFILE, Report is not generated based on TDS section wise. Niether section code is provided in Selection screen nor in the report, as provided in selection screen of T-code J1INCHLN. While filing Quarterly TDS return, it is re

  • Excuting unix program.

    Hi. I just want excute java.exe in bw unix without using function 'SXPG_CALL_SYSTEM'. cause that function has limit number of command string. I think I can use this command but somehow it returns null. don't know what is problem and actually not sure