Transformation rule routine to split a record into several

Dear Experts
I have a small requirement but I am not good in programs.
I have a DSO with data at year level.
I want to transfer this data to a second DSO but split the yearly data into Quarters evenly  by copying the source KF value (PRICE) into the Quarters where each quarter value equals the yearly value of the first DSO.
This is because the KF value is valid for the whole year. Thus, I need to copy this value into each quarter.
So, I have an Additional field in the 2nd DSO for the Quarter.
I have mapped the fields in the transformation but not sure how to write the Rule routine to for this additional field in the 2nd DSO.
Is this possible using a Routine Rule?  Or must use an Start routine?
Source: FY2010  KF $100
Target DSO :
FY 2010   QTR1 KF $100
FY 2010   QTR2 KF $100
FY 2010   QTR3 KF $100
FY 2010   QTR4 KF $100
Please point me to a suitable routine or kindly give me some code structure to follow.
Thank you very much.
Best regards
Pascal

Dear Durgesh
I am unable to find 'Time Distribution' radio button in the transformation mapping screen.
I tried writting a start routine but not sure which stage in the code structure to insert the following :
The error message is : tyt_sc_1 is unknown.  But i have checked this forum that this is how its declared. I inserted this data declaration in different places in the code but the error or other error persists.
Data : wa_source_package type tyt_sc_1,
           i_fq  like /BIC/ZFQ.
Loop at source_package into wa_source_package.
i_fq = '1'.
concatenate wa_source_package-/bi0/fiscyear i_fq into wa_source_package-/bic/ZFQ.
append wa_source_package  to  Source_package.
i_fq = '2'.
concatenate wa_source_package-/bi0/fiscyear i_fq into wa_source_package-/bic/ZFQ.
append wa_source_package  to  Source_package.
i_fq = '3'.
concatenate wa_source_package-/bi0/fiscyear i_fq into wa_source_package-/bic/ZFQ.
append wa_source_package  to  Source_package.
i_fq = '4'.
concatenate wa_source_package-/bi0/fiscyear i_fq into wa_source_package-/bic/ZFQ.
append wa_source_package  to  Source_package.
ENDLOOP.
Please help . Thanks.
regards
Pascal

Similar Messages

  • Split table record into several lines - pdf forms

    hello experts
    im trying to split a table record into several lines in order to present the whole table record in the form.
    for example:
    table T has 4 fields F1 F2 F3 F4
    if the tables has 2 records - R1 and R2 (every record contains 4 data fields) then i want to present my table in the following way:
    R1-F1 R1-F2
    R1-F3 R1-F4
    R2-F1 R2-F2
    R2-F3 R2-F4
    please do not refer me to links - i really need a specific procedure
    thanks ahead to all
    Eyal
    P.S i am using the adobe lifecycle - SFP tran.

    hey everyone
    it has been solved
    for the record:
    subform table (flowed content) contains 2 positioned subforms
    subforn header
    subform lines contains 2 flowed subforms 1 for the first two fields and 1 for the ladt two fields
    thank anyway
    Eyal

  • 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

  • Splitting HTML forms into several files

    I have an HTML form that has a lot of text inputs. I want to split this form into several pages using JSTL and Struts tags in the following manner:
    main file
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h" %>
    <h:form action = ...>
    <c:import url=' file1' />
    <c:import url=' file2' />
    </h:form>
    file 1
    <h:text name=' ...' />
    <h:text name= '...' />
    file2
    <h:text name=' ...' />
    <h:text name= '...' />
    The problem here is that the <h:form> is on the "main file" and therefore I get an error in file1 and file2. Is there a way to pass the "prefix=h" variable from the main file to file1 and file2?
    Can anyone help find a solution for this problem?
    thanks,
    sgs.

    Instead of
    <c:import url=' file1' />
    <c:import url=' file2' />
    Can you test with ..
    <%@ include file="file1.jsp" %>
    <%@ include file="file2.jsp" %>
    My guess is that it should work since your stuts form tags in the 2 files will be ultimately compiled as one jsp [in the main one].
    -Rohit

  • 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

  • Transformation Routine to convert single record into multiple

    All,
    I need your help with ABAP Syntax.  My requirement is to take a single record and convert it to multiple records into a DSO with a condition to not create a record if a KF value is 0.
    R/3 Data Record:
    Employee | Date | Char1 | KF1 | Char2 | KF2 | Char3 | KF3 | Char4 | KF4
    Conversion Result into DSO:
    Employee | Date | Char1 | KF1
    Employee | Date | Char2 | KF2
    Employee | Date | Char3 | KF3
    Employee | Date | Char4 | KF4 (This record will not be written if no value is in KF4)
    I have read about the result table in update rules, however within BI 7.0 Transformations I am unfamiliar as to where the RESULT_TABLE function applies.  Has this been replaced by the Expert Routine?
    Could any ABAP expert provide sample code as to how I would perform this conversion in a Transformation Routine?
    Thanks,
    David

    Thanks Alex for your response.
    I did find a solution to this as it turns out to be fairly simple, however I executed the routine as an Expert Routine instead of a Start Routine.  I was advised to do the transformation here.
    The basic concept is defined below:
    Loop at source_package assigning -kf2.
              Append result_fields to result_package.
           Endif.
    -- Kf3u2026  and so on
    Endloop.
    Basically the APPEND statement is used to create the additional records.

  • How to split  the records into two parts

    Hi experts,
    I have a field with 75 char length, this field have records also, Now i want to split the field into two differnt fields. That means upto first 40 char goes to one field, from 41st char to 70 char goes to another field, for that how to split record into two parts.
    Plz advice this,
    Mohana

    Hi,
    Do the following:
    f1 = fsource(40).
    f2 = fsource+40(30).
    where fsource is the 70 character original string and target strings are f1 (length 40) and f2 (length 30).
    Cheers,
    Aditya
    Edited by: Aditya Laud on Feb 22, 2008 2:10 AM

  • How To Split One Record  into 30 Records(Number of days in a Month)

    Hi Experts,
      we are getting the montly(yearmonth) Forecast data from flat file we need to generate the report which shows the daily Forecast data,
    For example for the month of June Forecast we have  150EA.
    Flat file data is like this
      0calday    Qty
      201006     150
    we need to show the report like datawise
       Calday                                     Forecast qty
    20100601                                          5
    20100602                                          5
    20100603                                          5
    20100604                                          5
    20100605                                          5
    20100606                                          5
    20100630                                           5
    its like month forecast / Number of days in a month.
    we can achive these  in two ways as per my knowledge
    1. At the time loading data
    2. Reporting level
    Which is the best way
    how can we achive this.
    Thanks
    Chandra

    Hey.  There was a similar posting I gave a suggestion on a while back.  Here is the link...
    Re: Spliting records into cube
    As far as the correct time of doing this, I would definitely do this at the time of data load and not time of reporting. 
    Hope you find it helpful.
    Thanks

  • Export splits 1 cell into several

    hi
    I would like to export the results of the query:
    select * from user_views;
    when i run the query, the result looks ok, i.e. each row is separate
    when i export this , the content of the views gets splitted into different rows;
    how can i export so the content of each cell stays in 1 cell?
    is this possible?
    thanks in advance for any tips!
    rdgs

    hi
    thanks for your answer; however this format still splits the cell into many rows;
    however i tried one by one every single format in this export and the following one keeps the data in 1 cell:
    html
    my version: 3.0.0.4
    so my issue is solved;
    rgds

  • Split Edge document into several folders.

    I need tio upload to Skura Platform my Edge Project, but the requirements of Skura are stricts. Each HTML into his html folder, the same with JS (js folder), etc. In spite I tried to change the roots in right way, the main HTML doesn´t recognize the links, What can I do? Thank you for for support.

    Thanks for reply, this big XML document is generated from Oracle by JDBC, I found OracleXMLQuery class is very useful, there are two methods
    like : setSkipRows(int rows) and setMaxRows(int num), using these two methods I can split the OracleXMLQuery into some small OracleXMLQuery, the use getXMLDOM() to get the corresponding XML documents.
    Regards

  • 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

  • Splitting of records into different rows

    Hi,
    I have a table 'test' which has three columns :
    ID varchar2(10), Product varchar2(100), source varchar2(100).
    I have provided two sample records below :
    ID PRODUCT SOURCE
    ID1 | P1,P2 | S1,S2
    ID2 | P1,P3 | S2,S3
    I need to split the product and source values (they are comma separated) and make different rows out of them. The result set required looks like below :
    ID PRODUCT SOURCE
    ID1 | P1 | S1
    ID1 | P1 | S2
    ID1 | P2 | S1
    ID1 | P2 | S2
    ID2 | P1 | S2
    ID2 | P1 | S3
    ID2 | P3 | S2
    ID2 | P3 | S3
    Could someone help me regarding this ? The number of comma separated values will be dynamic and we can have null between two commas too.
    Kind regards,
    Mainak
    Edited by: user11183570 on Jul 14, 2011 4:43 AM

    SQL> CREATE TABLE test (ID varchar2(10), Product varchar2(100), source varchar2(100));
    Table created.
    SQL> insert into test values ('id1','P1,P2','S1,S2');
    1 row created.
    SQL> insert into test values('id2','P1,P3','S2,S3');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> WITH tbl AS
      ( SELECT DISTINCT id col1,
        regexp_substr (product, '[^,]+', 1, level) col2 ,
        source col3
      FROM test
        CONNECT BY level <= LENGTH (regexp_replace (product, '[^,]+')) + 1
    SELECT DISTINCT col1,
      col2,
      regexp_substr (col3, '[^,]+', 1, level) col3
    FROM tbl
      CONNECT BY level <= LENGTH (regexp_replace (col3, '[^,]+')) + 1
    ORDER BY 1;  2    3    4    5    6    7    8    9   10   11   12   13 

  • Mapping: split different nodes into several occurence of a single one

    Hello experts,
    I would like to do the following mapping :
    Source message :
    <Employee1>
    <P0000>
    </P0000>
    <P0001>
    </P0001>
    <Pxxxx>
    </Pxxxx>
    </Employee1>
    And get this result in an Idoc :
    <E1PITYP>
    <P0000>
    </P0000>
    </E1PITYP>
    <E1PITYP>
    <P0001>
    </P0001>
    </E1PITYP>
    <E1PITYP>
    <Pxxxx>
    </Pxxxx>
    </E1PITYP>
    I have tried to duplicate subtrees in my Idoc definition to map each node Pxxxx with a duplicate of field E1PITYP, but the Idoc definition is so big that I am lacking of java memory.
    Do you have any other clue ?
    Many thanks,
    Best regards,
    Guislain

    For graphical mapping, there's no clue.
    That's the proper way to do it (duplicate subtree in the target node).
    With XSLT/Java mapping, maybe you could accomplish it with something more simple.
    Something like:
    <xsl:template match="/Employee">
       <IDOC_ROOT_TAG>
          <xsl:for-each select="child::node()">
             <E1PITYP>
                <xsl:copy-of select="."/>
             </E1PITYP>
          </xsl:for-each>
       </IDOC_ROOT_TAG>
    </xsl:template>
    Regards,
    Henrique.

  • Split records into two files based on lookup table

    Hi,
    I'm new to ODI and want to know on how I could split records into two files based on a value in one of the columns in the table.
    Example:
    Table:
    my columns are
    account name country
    100 USA
    200 USA
    300 UK
    200 AUS
    So from the 4 records I maintain list of countries in a lookup file and split the records into 2 different files based on values in the file...
    Say I have records AUS and UK in my lookup file...
    So my ODI routine should send all records with country into file1 and rest to file2.
    So from above records
    File1:
    300 UK
    200 AUS
    File2:
    100 USA
    200 USA
    Can you help me how to achieve this?
    Thanks,
    Sam

    1. where and how do i create filter to restrict countries? In source or target? Should I include some kind of filter operator in interface.
    You need to have the Filter on the Source side so that we can filter records accordingly the capture the same in the File. To have a Filter . In the source data store click and drag the column outside the data store and you will have Cone shaped icon and now you can click and type the Filter.
    Please look into this link for ODI Documentation -http://www.oracle.com/technetwork/middleware/data-integrator/documentation/index.html
    Also look into this Getting started guide - http://download.oracle.com/docs/cd/E15985_01/doc.10136/getstart/GSETL.pdf . You can find information as how to create Filter in this guide.
    2. If I have include multipe countries like (USA,CANADA,UK) to go to one file and rest to another file; Can I use some kind of lookup file...? Instead of modifying filter inside interface...Can i Update entries in the file?
    there are two ways of handling your situation.
    Solution 1.
    1. Create Variable Country_Variable
    2. Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3. Create a new Package Country File Unload
    4. Call the Variable in Country_Variable in Set Mode and provide the Country (USA )
    5. Next call the First Interface
    6. Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    7. Now run the package .
    Solution 2.
    If you need a solution to handle through Filer.
    1. Use this Method (http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value ) to call the File where you wish to create store the country name into the variable Country_Variable
    2. Pretty much the same Create a Filter in the Source datastore in the First Interface ( SOURCE.COLUMN = #Country_Variable)
    3.Create a new Package Country File Unload
    4.Next call the Second Interface where the Filter condition will be ( SOURCE.COLUMN ! = #Country_Variable )
    5. Now run the package .
    Now through this way using File you can control the File.
    Please try and let us know , if you need any other help.

  • Start routine for insert a record by each day in a range of dates

    Hi all,
    I need create a start routine for insert 1 record by each day in a range of dates:
    example:
    Actual.
    DATE_I             DATE_F          TIME_I       TIME_F      TIME_minutes
    04/04/2008       05/04/2008     13:40:00     23:00:00        2000
    Result:
    DATE_I             DATE_F          TIME_I       TIME_F      TIME_minutes
    04/04/2008       04/04/2008     13:40:00     24:00:00        X
    05/04/2008       05/04/2008     00:00:00     23:00:00        Y
    I thanks any help.
    regards.
    Alberto.

    Hi Alberto,
    What I understood from your requirement is that you want to split the record into 2 since you have 2 dates coming from the source.
    In the transformations you will have to create new rule group one for each of the dates.
    You can create the new rule group by clicking on the 'Rule Group' button and then clicking on the 'New Rule Group'.
    In the newly created rule groups take care to distribute data for each date separately.
    Hope it is clear.
    All the best...
    Regards,
    Krishna

Maybe you are looking for