Transformation routine for record manipulation DSO to cube

Hi Experts
My scenario is this
1 row going into the transformation will be transformed into 1 or more rows out of the transformation. Same consept as return table in v3.5.
Does any one have a sample code for this?
I am thinking this should be put into the start routine and include a loop and manipulation of the the source_package.
I just can't figure out the syntax. Perhaps this is not even the right way to go. Any suggestions?
Help will be rewarded with points.
best regards,
Nina

Hi Shambhu ,
thanks for reply...
My DSO  key fileds are PR No and PR Line item No
Data field is Indicator ( R/D ) for every line item .
per example One PR No contains 3  line ietms and indicators are D / R
        PR No -
Item No -
Indicator
         1000            10              D
         1000            20              D
         1000           30              R
next day i will recieve delta -
1000 , 30 , D   ---then my data will be in DSO
          PR No -
Item No -
Indicator
            1000            10              D
            1000            20              D
            1000           30               D
i want to report ,  how many PR No are deleted or released  in Calander day ?
Report conditions :
if at least one line item indiactor has 'R' then that PR No is called as Released PR.
if all line item indicator has 'D' then the PR No is called as Deleted PR.
Plz tell me , how can i write routine ...and where can write ?
i assign points...
Regards,
PSR

Similar Messages

  • Need clarification to write transformation routine for my requirement

    Hi all,
    I have a requirement as mentioned below...
    I have a keyfigure amount which will hold the amount value..now i have been asked to add amount_2000 key figure...it has been done..
    But the real problem is that
    They will give a filter value in DTP selection for the field "area".
    now if they give area as 1000 then the amount field should populat with the respective amount value
    but whereas amount_2000 should populate with only the amount of the area 2000 irrespective of the filter condition given...
    i need to write the routine in the transformation...But the problem is that when we give the filter value in DTP i coudnt get value for amount_2000 as only it gets the value for 1000.
    I hope the requirement is clear...
    can any one help me in this.
    Thanks & Regards,
    Hari.

    Write a routine for the InfoObject amount_2000.
    Use amount and area as source fields.
    Now the coding should look like:
    IF source_fields-area = '2000'.
      RESULT = source_fields-amount.
    ELSE.
      RESULT = 0.
    ENDIF.
    This is independent of the filter values in the DTP.
    Best regards
    Dirk

  • Transformation Routine for checking condition only once

    Hello,
    I would like to perform he calculations based on certain criteria which goes like this...
          LOOP AT ITab WHERE EMPno  = ITAB Empno AND
                            ATYPE = ITAB-stype .
            IF ITAB-LTYP = '1000'.
              CHECK ITab-ABEGIN GE YR_BEGDT AND ITab-ABEGIN LE YR_ENDDT.
              CHECK FLAG_ST <> 1.
              ITAB-PENDING_ST = ITAB-PENDING_ST + ( ( ITab-BAL / 825 ) * 100 ).
            ELSEIF ITAB-STPE = '2000'.
              CHECK FLAG_SL <> 1.
              ITAB-PENDING_SL = ITAB-PENDING_ST + ( ( ITab-BAL  / 825 ) * 100 ).
              ENDLOOP.
          IF ITAB-stype  = '1000'.
            FLAG_ST = 1.
          ENDIF.
          IF ITAB-stype  = '2000'.
            FLAG_SL = 1.
          ENDIF.
          MODIFY ITAB.
    How to implement this logic in Transformation roles ... as this flag checks only once.... to perform the calculation.
    Thanks
        ENDLOOP.

    Hi there,
    You must be aware of start and end routine in a transformation.
    Assumin that you would like to modify the code before sending it to individual( field wise transormation) transformation , you can write your code in start routine tab of the transformations.
    Code written in Start routine in a transformation can manipulate the data data package wise..
    say for eg if u need to fill the values in indivual routine  then u can save all  the values in an internal table ( say for eg ur itab) in the start routine and this data is available for u in the transformation routines.. so anything written in start rotuine shall work as global modification for the transformation routines.
    Similarly code written in end rotuine shall work for chunk of data which is modified individually in transformation routine.
    you ca go thr this link for more clarification
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417700)ID2067718350DB10090875593766856688End?rid=/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e&overridelayout=true
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/a9ea964a86b04dbe4df20af6e598cf/frameset.htm
    Regards,
    kk

  • Transformation routine for Infoobject lookup

    Hey guys,
    I am aware of Update rule routines but never done Transformation routine before. I didnt get any related post for my req.
    My requirement is on WBS element I have some attributes which is coming from std WBS Attr extractor but I have one custom attribute infooject which I want to populate through an Infoobject which is also a master data Infoprovider. For this I have to write a Tranfer rule routine.
    Please note these are transfer rules in BW 3.5 not BI 7. Please provide exact code. Appreciate your help.
    Thanks.
    BMW M///

    Declaration of Types table for your master data object in the declaration area....
    Replace your attributes in place of plant, GSRCSYS and CALMONTH
        TYPES: BEGIN OF TY_WBS,
                     /BIC/GPLANT TYPE /BIC/OIGPLANT,
                     /BIC/GSRCSYS TYPE /BIC/OIGSRCSYS,
                     CALMONTH TYPE /BI0/OICALMONTH,
               END OF TY_WBS.
        DATA: IT_WBS TYPE TABLE OF TY_WBS,
                    WA_WBS TYPE TY_WBS.
    /BIC/AWBS = your master data table name
    SELECT * FROM /BIC/AWBS INTO WA_WBS
        WHERE OBJVERS = 'A'.
    THen in the transformation Routine on field level use the below code to populate the value
    "  /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
       substitute your objects here to query the master data object to get values.
    READ TABLE IT_WBS INTO WA_WBS WITH KEY
          /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
    RESULT = WA_WBS-Your object name.
    Hope this will help you...

  • Data load from DSO to cube

    Hi gurus
    We have a typical problem, we have to combined 2 records into one when they reach to DSO.
    One source is flat file and the other is R3. so few fields I am geting from flat file and few from R3 . They are creating one record when they loaded to DSO . Now I am getting one record in active data table but when I load the data to cube from that DSO ( Data is going from change log to cube ) to cube , I am getting 2 seperate records ( one which is loaded from flat file and one which is loaded from R3 ) in cube which I dont want. I want only one record in cube just like i have in my active data table in DSO.
    I cant get the data from Active data table because I need delta load.
    Would you please advise what can I do to get that one record in Cube?
    Pl help

    Ravi
    I am sending the data thro DTP only but is there any solution to get one record bcos in other scenario I am getting data from 2 different ERP sources and getting one record in DSO and cube as well.
    but that is not happening for this second scenario where i am getting data from FLAT file and ERP and traing to create one record.

  • Target value in transformation routine

    Hi
    How can I get the value of target field, which is already present, in the transformation routine?
    For Example, I have a transformation between ODS DS1 and ODS DS2. DS1 has fields DS1_F1, DS1_F2 and DS2 has fields DS2_F1, DS2_F2. Now I have written a transformation routine for target field DS2_F1 with input DS1_F1. In this routine, I want to get the value of DS2_F1, which is already present, before the result is being updated. How can I get it?
    Thanks & Regards
    Tejo

    Hi,
    Use end routine concept here .
    Regards,
    Anil Kumar Sharma .P

  • REGEX statement not working in transformation routine?

    hi,
    I need to include the REGEX ABAP key word in transformation routine for one of the fields--
    FIND all OCCURRENCEs OF REGEX
    But when i include this statement it says:
    E: statement "REGEX" is not defined.check your spelling--
    but same statement when i copy in SE38 ABAP editor it works very fine--
    May i know what is the reason?
    i had tried with all possible single quotes before posting here

    Is that the entire statement?  It looks like it is interpeting REGEX as a variable.  It should look something like this:
    FIND all OCCURRENCEs OF REGEX '(\b\S+\b)(-?)' IN g_result

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

  • Routine for Update rule in cube

    Hi Friends,
           I have added a field to a cube, now i need to populate the same during the data is loading from the DSO to Cube.  Inupdate rule since we will get only te key figures, is it possible to access the dimensions in the routine. Please help me in giving some coadings for the routine for update rule.
    Thanks
    Prem

    Hi,
    one more suggestion..
    create a end routine and update the key figures based on ur dimension values by useing resuly_package.
    sample code:
    [Transformation end routine|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/203eb778-461d-2c10-60b3-8a94ee91cbfc]
    thnks.

  • Why do we create indexes for DSOs and Cubes.What is the use of it?

    Hi All,
    Can you please tell me why are indexes created for DSOs and Cubes.
    What is the use with the creation of indexes.
    Thanks,
    Sravani

    HI ,
    An index is a copy of a database table that is reduced to certain fields. This copy is always in sorted form. Sorting provides faster access to the data records of the table, for example, when using a binary search. A table has a primary index and a secondary index. The primary index consists of the key fields of the table and is automatically created in the database along with the table. You can also create further indexes on a table in the Java Dictionary. These are called secondary indexes. This is necessary if the table is frequently accessed in a way that does not take advantage of the primary index. Different indexes for the same table are distinguished from one another by a separate index name. The index name must be unique. Whether or not an index is used to access a particular table, is decided by the database system optimizer. This means that an index might improve performance only with certain database systems. You specify if the index should be used on certain database systems in the index definition. Indexes for a table are created when the table is created (provided that the table is not excluded for the database system in the index definition). If the index fields represent the primary keys of the table, that is, if they already uniquely identify each record of the table, the index is referred to as an unique index.
    they are created on DSO and cube for the performance purpose ..and reports created on them wil be also more efficent ..
    Regards,
    shikha

  • Create Multiple records in transformation routine

    Hi,
    Could anyone let me know how to do creation of multiple records (from one source record) in BI 7.0 transformation routine, E.g.
    Source record
    Cost Center   Period 01       Period 02
           1234          $30                $50
    --> (After transformation)
    Period    Cost center    Total cost
    01              1234             $30
    02              1234             $50
    Many thanks,
    Alvin

    The problem was with the following code segment:
    tmp_curr_rec_id := get_block_property( :system.current_block, current_record );
    set_record_property( tmp_curr_rec_id, :system.current_block, status, new_status );
    After omitting these two lines, the code worked properly.
    Thansk for all whoe replied.
    Regards,
    Tamas

  • 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

  • Delta records not updating from DSO to CUBE in BI 7

    Hi Experts,
    Delta records not updating from DSO to CUBE
    in DSO keyfigure value showing '0' but in CUBE same record showing '-I '
    I cheked in Change log table in DSO its have 5 records
    ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M -  -1
    ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M -   0
    ODSR_4LIF02ZV32F1M85DXHUCSH0DL -   0
    ODSR_4LIF02ZV32F1M85DXHUCSH0DL -   1
    ODSR_4LH8CXKUJPW2JDS0LC775N4MH -   0
    but active data table have one record - 0
    how to corrcct the delta load??
    Regards,
    Jai

    Hi,
    I think initially the value was 0 (ODSR_4LH8CXKUJPW2JDS0LC775N4MH - 0, new image in changelog) and this got loaded to the cube.
    Then the value got changed to 1 (ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 0, before image & ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 1, after image). Now this record updates the cube with value 1. The cube has 2 records, one with 0 value and the other with 1.
    The value got changed again to 0 (ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - (-1), before image &
    ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - 0, after image). Now these records get aggregated and update the cube with (-1).
    The cube has 3 records, with 0, 1 and -1 values....the effective total is 0 which is correct.
    Is this not what you see in the cube? were the earlier req deleted from the cube?

  • Test for Permitted Characters in Transformation Routine

    Hello,
    Background: There is a data quality issue when loading 3rd party data to BW, which cannot be solved at source. Therefore, initial transformation rules when loading to data warehouse level DSO, should identify and deal with error values.
    Possible Solution: Test validity of value within transformation routine via a custom function module.
    Execution: Function module would require to check lowercase character handling of target InfoObject (RSDCHABAS-LOWERCASE) and scan source value against permitted character set (RSKC).
    Questions: How can the permitted list of characters be returned within transformation routine? Is there an available delivered function module to handle accessing permitted character set?
    I would appreciate any answers to the above questions or alternative suggestions to the above strategy.
    Thanks -
    Brendan.

    There is a function module "RSKC_ALLOWED_CHAR_GET". Use SE37 to check it out.

  • Recording Routine for Tables

    Hi ,
    Can you please explain me about   Recording Routine for Tables..
    I came to know that we can get do it via SE55 tcode..
    Can you please explain me the process to do this..
    Regards
    Parnith..

    Hi Raj,
    Thanks for your solution..
    Can please suggest how can i solve following requirement..
    I had to update the  Recording Routine for one my custom tables from 'Standard recording routine' to 'No,or user,recording routine'.
    I need to update and transport this..
    When i went via SE55..
    There are four Radio button..
    Can you please let me know the exact steps to solve the above problem..
    Regards,

Maybe you are looking for

  • Application Server Data Source settings help needed (10.1.2.0.2)

    Hi, Can someone tell me what maximum values can I set in the following properties under Connection Attributes when I define a DataSource on Application Server. I have almost 25+ web application deployed on my 10.1.2.0.2 server that all uses one data

  • How to handle system errors in XI using BPM? please help!

    Hi Experts,      I have a requirement where I have to handle system errors. For example when I am making RFC call using RFC adapter if the remote destination is down then I have create a understandable error message and store it in another SAP table.

  • Change Diagram Type in Control Chart in QE51N

    Hi I'm using the QE51N to record the results. I press the Control Chart Button and it's OK. I change the Diagram Type from "Lines" to "XY" (Dispersion), but the change isn't keep it for the other characteristics, or if another day I execute the QE51N

  • XSLT formatting a string

    Hi there. I'm new to XML/XSLT etc. I am connecting to an rss feed on another site, all is working well but I just want to show the first 50 characters of the description (tag?). I am as asp developer and would have used <%=Left(mystring,50)%> - is th

  • Elements in Content Div not Solid White

    I can't seem to make the "contentwrap" or the "content" div, both of which I've requested to have white backgrounds and encompass the sidebars, be white. Instead I get all this gray mess in between in the body. Here is the website: http://kaufmanphot