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

Similar Messages

  • 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

  • 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

  • Split a single avi into multiple avi files?

    Hi there, totally new to PS Elements Premier 10.
    I have some VHS video tapes that I converted to AVI format.  I'd like to separate the videos into segments (ie; separate Christmas 1982 from Easter 1983) - and store them in multiple AVI files.  I tried to do this in MS movie maker, but that was taking forever.  I bought Premier Elements because I figured it should be easier; and it probably is, but I'm noob...
    I have split the video into the scenes I want.  I have added markers... but I am having trouble splitting the actual video into chunks of clips - ie; one big avi file would become 10 smaller avi files.  I am trying to watch these on a boxee box, so I do want the to be separate files - I dont want to do a "web dvd" output.
    I have tried this:
    I dont see export functions.
    I go to "SHARE" but it only lets me export to a single output.
    How can I do this?  It's for Christmas presents, so it's a little urgent - any help you can give me would be soooooo appreciated.
    thanks!

    Thanks everyone.  I ended up figuring it out - whether or not I did it the best / easiest / fastest way is up for debate
    I split the video into clips.
    Separated the clips into different timelines.
    "left aligned" all the clips in their respective timelines so they all start at 0:00 (just for simplification)
    Disable all clips / timelines (right click, enable = false)
    Enable the individual clip/timeline that I want to save
    Set up the work area bar so that it starts at 0:00 and ends at the end of the specific clip I enabled.  With the "snap top" functionality turned on, this is pretty easy. 
    Go to "SHARE" and configure my outputs
    Make sure that "Share Work Area Bar Only" is checked on the "Share" tab before committing
    It creates an avi of only the enabled clip, for the timeline I created.
    Important:
    Make sure you set the work area bar properly, or you'll have a 10 minute clip followed by 2 hours of blackness.... did that a few times ha.
    Make sure you click the "Share Work Area Bar Only" on the share tab - or the same will happen. 
    Thanks for the replies everyone - let me know if there is a better way to acheive this in PE10.
    Thanks!

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

  • Split the incoming data into multiple grouped output records

    I have three fields in the source, Student ID, Student name and Student Marks. I need to map the details in the destination, by grouping the data on the basis of marks obtained. Each time there's a new mark , the corresponding details of names and student
    ID is saved under the a new mark group that is created. how do i come about it when there are n number of new marks?

    for your scenario i used below xml as input,
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsIn">
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student> 
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>30</StudentMarks>
      </Student>   
    </ns0:Students>
    and here is the output, hope this is what you are looking for. 
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsOut">
    <StudentMarks>10</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>20</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>30</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    </ns0:Students>
    Please find the below xslt which you can use, it is basically based on the Muenchian grouping suggested by Ashwin
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0"
    xmlns:ns0="http://BTSTempProj.StudentDetailsOut" xmlns:s0="http://BTSTempProj.StudentDetailsIn">
      <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
      <xsl:template match="/">
        <xsl:apply-templates select="/s0:Students" />
      </xsl:template>
      <xsl:key name="groups" match="Student" use="StudentMarks"/>
      <xsl:template match="/s0:Students">
        <ns0:Students>
          <xsl:for-each select="Student[generate-id(.)=generate-id(key('groups',StudentMarks))]">
            <xsl:sort select="StudentMarks" order="ascending"/>
            <StudentMarks>
              <xsl:value-of select="StudentMarks/text()"/>
            </StudentMarks>    
            <Student>    
              <xsl:for-each select="key('groups',StudentMarks)">
                <StudentName>
                  <xsl:value-of select="StudnetName/text()"/>
                </StudentName>
                <StudentID>
                  <xsl:value-of select="StudentID/text()"/>
                </StudentID> 
                </xsl:for-each>
            </Student>
          </xsl:for-each>        
        </ns0:Students>
      </xsl:template>
    </xsl:stylesheet>
    Regards, Amit More

  • Regarding ssis - split multi value column into multiple records

    Hi,
    I have one scenario
    Table
    Col1. Col2
    1. A,b,c,df,ghf
    2. C,b
    3. B
    Output should be
    Col1. Col2
    1. A
    1. B
    1. C
    1. Df
    1. Ghf
    2. C
    2. B
    3. B
    please help

    Try the below:
    Create TVF as below:
    CREATE FUNCTION [dbo].[split]
    ( @String NVARCHAR(4000), @Delimiter NCHAR(1) )
    RETURNS TABLE
    AS
    RETURN
    With Split(stpos, endpos)
    AS (
    SELECT 0 AS stpos, CHARINDEX(@Delimiter, @String) AS endpos
    UNION ALL
    SELECT endpos + 1, CHARINDEX(@Delimiter, @String, endpos + 1)
    FROM Split
    WHERE endpos > 0
    SELECT 'Id' = ROW_NUMBER() OVER (ORDER BY (SELECT 1)),
    'Data' = SUBSTRING(@String, stpos, COALESCE(NULLIF(endpos,0), LEN(@String)+1)-stpos)
    FROM Split
    Test script:
    create Table Test_Table(id int, data varchar(4000))
    Insert into Test_Table Values(1,'a,F,c, G'),(2,'LASD,wer,yy')
    Select A.id,upper(Left(b.Data,1)) + lower(Right(b.data, Len(b.data) - 1)) From Test_Table A
    Cross Apply dbo.split(A.data,',') B
    Drop table Test_Table

  • Splitting a single video into multiple sub-videos

    I have CS4 Master Suite on MAC.
    I want to take a single video and split it into consecutive chunks and store each chunk as a separate video file (Eventually to put in a database to allow web uses to select which chunk(s) they want to view.
    I can do this "by hand" in Premiere but I want to eventually do this in a semi-automated way. (Visually decided where to place the splits, but automate the splitting, naming conventions etc.
    Suggestions?
    Is there a scripting language interface that could help me do some of this?
    Thanks

    I did not make clear, that of course I don't one to do this with ONE video, but with hundreds of hours of video in typically 20-30 second chunks. So perhaps there are good alternate suggestions to do what I want to do?
    I want eventually to give the enduser the possibility to run a database query to select one or more of the final chunks/chapters for viewing

  • How to Split 1 Order into Multiple Deliveries based on Partner Function ?

    Hello,
    How can I split one Sales Order into multiple deliveries, based on the partner function "managed by" ?
    The requirement is that one order will be created for different "managed by".
    If partner function "managed by" is same at line item level in order, than the items having same "managed by" can be combined in one delivery, else delivery will split and multiple deliveries will be created from 1 Order.
    Jatin Mistry

    Hi,
    You need to create a new requirement in tcode VOFM for that, together with your ABAP consultant. This requirement will be used in copy contol.
    http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
    MdZ

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

  • Syndicator Server: possible to split the export file in multiple file?

    Hello,
    is it possible to split the export files into multiple files e. g. at 5000 records?
    Perhaps there is a possibility in the mdss.ini? Or a setting in the mapping?
    Thank your for your responses!
    Melanie

    Hi Melanie,
    - If you are syndicating in the Xml format you have the option to syndicate one xml for every record. or multiple records one xml.
    For this you have to make a simple setting in the Syndicator-> Map properties->XML file output->(multiple files/single file)
    Other way around is:
    - If you are syndiacting in any other format say text then the output file goes as one file for all records present in the MDM repository, for this you can use the search options.
    - Create a search on some field value which will select a set of records from the lot.
    - Then you can syndicate only those records which satisfies the  search criteria.
    - In this way it is possible to syndicate in parts
    Hope It Helped,
    Kindly Reward Points if found useful
    Thanks & Regards
    Simona Pinto

  • I can't split a home DVD into multiple events. Why?

    I have a DVD of old super 8 movies that I converted into a DVD years ago and want to extract selected segments as short movie clips. I have been able to load the entire DVD as a single event but I wanted to break this single event into multiple events based on various themes. My problem is that I don't seem to be able to split the content at all. The "Split event before selected Clip" always appears to be grayed out. What am I doing wrong?
    paulfromcrystal

    I just figured it out.  Somehow I didn't change it to the correct code of 1.  So on the second shot of 5 allowed I realized I didn't change and save.  Now the dvd played.

  • 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

Maybe you are looking for

  • Any solutions to Snow Leopard 10.6.1 R2880 total failure on iMac

    Everything was fine on Snow Leopard 10.6, but now - on 10.6.1 - I can print nothing to the Epson R2880 from my main desktop machine. When I went to print, the Epson Printer software had been removed and I had a message that new printer drivers should

  • Too many wrong password entries?

    Hi people. My brother has forgotten his ipod password and has entered too many incorrect tries. The message that comes up is in red background that says "iPod is disabled connect to itunes". But when I connect to itunes it says that it needs a passco

  • Modify the Due Date in a GP Process

    Hello everybody, I need to modify the Due Date on a given Process. All I have is the Process ID, that i get from a Parameter in my function... I got some code form several pages in the SAP Library, but i get an error in the line:           IGPProcess

  • TS1367 My MacBook Pro will not go past the grey screen with apple logo in the middle

    How do I fix this issue  is there anything I can do

  • NWDI - How to control EAR deployment order

    We are developing a custom application in NWDI. We have created a software component for the this and have created all required DCs under this software component. All the J2EE DCs are deployed through separate EAR DCs and there are references from on