Start Routine in Transformations

Hi,
For my reporting purpose i need to Transfer data from Cube to DSO
I need a start routine for the following requirment when transfering data from Cube to DSO
The Key fields in DSO are Location & Emp_ID and Date fields are ZAP_DTE (DATS)
CUBE-->DSO
While doing the transfer...i need to compare Emp and his ZAP_DTE AND need to transfer only if AP_DTE for that EMP is greater than the exisisting one else ignore the record
As i new to BW please update with the routine
Thanks

Hi Shambhu
We usually write out code in the section:
$$ begin of routine - insert your code only below this line        -
What is the difference between writing the code in
$$ begin of 2nd part global - insert your code only below this line  *
and
$$ begin of routine - insert your code only below this line        - ?
Kind regards
Erik

Similar Messages

  • Start Routine on Transformations

    Hi Friends
    I've Start routine on transfer rules with internal table and it was working fine.
    Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
    How can we define an internal table in start routine of transformations in BI7?
    The code as follows for internal table.
    data: begin of it_ord occurs 0,
    AUFNR(000012) TYPE C,
    ZZARBPL(000008) TYPE C,
    WERKS(000004) TYPE C,
    end of it_ord.
    Regards,
    Chandu.

    Hi
    I've defined as follows
        types: begin of it_ord ,
                AUFNR(000012) TYPE C,
                ARBPL(000008) TYPE C,
                WERKS(000004) TYPE C,
              end of it_ord.
        data: temp_tabix like sy-tabix,
              is_datapak type tys_SC_1.
        data it_ordt type table of it_ord .
    It's throwing error saying it_ort is a table with no header line and therefore has no component called aufnr.
    If I define with header line then header line not supported.
    What could be the problem?
    I've changed like you said but it's giving the following error.
    E:"IT_WA" is not a table with header line.
    Regards,
    Chandu.
    Edited by: Chandu on Feb 18, 2009 8:44 AM

  • Raising cx_rsrout_abort exception in Start Routine of Transformations

    Hello Abap OO Gurus:
    This is likely a very simple question but I'm brand new to Abap OO and despite reading and searching, I cannot convert some old abap code used in the start routine of business content in BW to be used in the Transformation start routine in SAP BI.
    My Start Routine inside a BI 7.0 transformation rule has a method declared like this:
    <b>METHODS
    start_routine
    IMPORTING
    request type rsrequest
    datapackid type rsdatapid
    EXPORTING
    monitor type rstr_ty_t_monitors
    CHANGING
    SOURCE_PACKAGE type tyt_SC_1
    RAISING
    cx_rsrout_abort.</b>
    The Exception "cx_rsrout_abort" has replaced what used to be a simple ABORT data field. The <u>old code I want to replace was just "abort = 1'.</u>
    But now it seems like I have to use TRY... ENDTRY statement to raise Exception "cx_rsrout_abort". I am inside the abap code of the Method "start routine"
    METHOD start_routine.
    *=== Segments ===
    Could some kind soul educate me as to how to raise the Exception "cx_rsrout_abort" inside the Method start routine?
    thanks in advance, David

    Tx HDev:
    we are almost there...  I have that PDF but never got thru to the rest of the Appendix B as my project is just too crazy...
    When try what Appenix B suggest..
    <u>"raise exception type CX_RSROUT_SKIP_RECORD."</u>
    I get the following Warning msg which makes sense...
    <b>"W:The exception CX_RSROUT_SKIP_RECORD is neither caught nor is it
    declared in the RAISING clause of "START_ROUTINE".</b>
    The METHOD statement in the start routine never declares another exception other than cx_rsrout_abort as seen below:
        METHODS
          start_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              SOURCE_PACKAGE              type tyt_SC_1
            RAISING
              cx_rsrout_abort.
    Maybe NW2004s has a bug here... I'm hoping that a SAP Developer reads this posting and can enlighten us all... otherwise I'll have to post a OSS msg
    So the mystery is still how to do
    "raise exception type CX_RSROUT_ABORT" and make this equal to ABORT = 1
    which makes the start routine skip a record
    tx again,  David

  • Declaration in start routine in transformations

    Hi guru's
    What is the difference between first and second global declaration in the start routine of a transformation?
    First: $$ begin of global - insert your declaration only below this line  -
    Second: $$ begin of 2nd part global - insert your code only below this line  *
    Kind regards
    Erik

    Hi Shambhu
    We usually write out code in the section:
    $$ begin of routine - insert your code only below this line        -
    What is the difference between writing the code in
    $$ begin of 2nd part global - insert your code only below this line  *
    and
    $$ begin of routine - insert your code only below this line        - ?
    Kind regards
    Erik

  • Get the request id from a PSA in start routine in transformation

    Hello All,
    I need to get the request id of the PSA (source_package) during the start routine or field routine and then use it to look up the Date when requested was created using the table RSREQDONE.
    I'm extracting data from ECC, and then I load the data from the Datasource, then I use DTP/Transformation to load data into a ODSO.
    <removed>
    Thanks Guys,
    JMelo
    Edited by: Arun Varadarajan on Feb 6, 2009 12:09 PM

    Hi John,
    its pretty simple to read data from a Info-cube.
    Use the Function Module :RSDRI_INFOPROV_READ".
    You can pass the name of fields and filters which you want to read from the cube.
    Hope this wil help.

  • Start routine in transformation

    Hi,
        I need to read master data in a start routine only once.If I write a select statement in the start routine , the select is executed for every data package.I want the select to be executed only once and data can be used by all data packages.I tried keeping the code in the global section of the start routine class and that didn't help either.
       Any ideas.
    Thanks in advance

    Hi Siva,
    Then..Use Static Internal table...
    Structured Static Internal Table Definition
    - STATICS itab TYPE tabtype [WITH HEADER LINE].
    - STATICS itab TYPE tabkind OF linetype
    [WITH [UNIQUE|NON-UNIQUE] keydef]
    [INITIAL SIZE n] [WITH HEADER LINE]. 
    - STATICS itab LIKE tabkind OF lineobj
    [WITH [UNIQUE|NON-UNIQUE] keydef]
    [INITIAL SIZE n] [WITH HEADER LINE].
    - STATICS itab TYPE linetype OCCURS n [WITH HEADER LINE].
    - STATICS itab LIKE lineobj OCCURS n [WITH HEADER LINE].
    - STATICS: BEGIN OF itab OCCURS n,
    END OF itab [VALID BETWEEN f1 AND f2].
    STATICS itab TYPE RANGE OF type.
    STATICS itab LIKE RANGE OF f
    @@@@@@@@@@@@@22
    Logic: make flag variable as static variable in global area.
    First data package...
    IF flag EQ ' '.
    Read Master data table and put in STATIC internal TABLE.
    So the next time(next data package)..not read from master data table
    flag = 'X'.
    ENDif.
    LOOP DATA_PACKAGE.
    ENDLOOP.
    @@@@@@@@@@@@2
    Regards,
    San!
    Message was edited by:
            Sandeep Khatri(San!)

  • How to write the start routine in the transformations ?

    Hi Experts,
    I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find.
    *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I had made comment to allow the G/L accounts. since I have some GL Accounts which does'nt have the cost center data, so in this case I have to write a ABAP code to allow this G/L accounts with cost center data.
    So Let me know if anyone can help me how to write the ABAP code in the start routine.
    Thanks
    sekhar

    Hi Experts,
    I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find.
    *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I had made comment to allow the G/L accounts. since I have some GL Accounts which does'nt have the cost center data, so in this case I have to write a ABAP code to allow this G/L accounts with cost center data.
    So Let me know if anyone can help me how to write the ABAP code in the start routine.
    Thanks
    sekhar

  • Start Routine to load flat file - how to track filename in transformation

    Hi,
    Could you please help me to write a start routine to bring data from a flat file with a file name week45_c1_pri_2006, where the wekk name week-- changes per week. how to track the filename in the routine and how in data transfer process knows to load data from each flat file.
    Message was edited by:
            Anima M

    PROGRAM trans_routine.
          CLASS routine DEFINITION
    CLASS lcl_transform DEFINITION.
      PUBLIC SECTION.
    Attributs
        DATA:
          p_check_master_data_exist
                TYPE RSODSOCHECKONLY READ-ONLY,
    *-    Instance for getting request runtime attributs;
        Available information: Refer to methods of
        interface 'if_rsbk_request_admintab_view'
          <b>p_r_request
                TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.</b>
    <i>The bold area above where you get the requestid, here I am stuck.
    The below code does not bring the correct requestid of PSA</i>
    CALL METHOD P_R_REQUEST->GET_REQUID30
          RECEIVING
            R_REQUID30 = IREQUID.
        CALL METHOD P_R_REQUEST->GET_REQUID
          RECEIVING
            R_REQUID = IREQUID.
        SELECT FILENAME INTO IFILENAME FROM rsseldone WHERE rnr =  IREQUID  AND lnr = '        1'.
    Hope this can give a better picture where I am currently stuck not able to get the PSA request id in the <b>start routine of transformation</b> to read the data and filename from there.
    Thanks alot
    Anima

  • Start Routine

    Hi Friends
    I've Start routine on transfer rules  with internal table and it was working fine.
    Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
    How can we define an internal table in start routine of transformations in BI7?
    The code as follows for internal table.
    data: begin of it_ord occurs 0,
            AUFNR(000012) TYPE C,
            ZZARBPL(000008) TYPE C,
            WERKS(000004) TYPE C,
          end of it_ord.
    Regards,
    Chandu.

    Change your code like the one below
    TYPES : begin of it_ord ,
    AUFNR(000012) TYPE C,
    ARBPL(000008) TYPE C,
    WERKS(000004) TYPE C,
    end of it_ord.
    DATA : temp_tabix TYPE sy-tabix,
    is_datapak TYPE tys_SC_1.
    DATA : it_ordt TYPE STANDARD TABLE of it_ord ,
    it_ordtt_wa TYPE it_ord.
    This should solve your problem.

  • How to write a start routine in the trasnformations ?

    Hi Experts,
    I am working on BI 7, As I want to write a start routine in transformations of 0FIGL_O02 DSO, to allow the GL accounts with cost center data. Already there is a delete statement please find.
    *DELETE SOURCE_PACKAGE where BAL_FLAG = 'X'. I had made comment to allow the G/L accounts. since I have some GL Accounts which does'nt have the cost center data, so in this case I have to write a ABAP code to allow this G/L accounts with cost center data.
    So Let me know if anyone can help me how to write the ABAP code in the start routine.
    Thanks
    sekhar

    Hi,
                Yopu can write the below lines of code adn try
        SORT source_package BY Receive nr  Type ASCENDING.
        DELETE ADJACENT DUPLICATES FROM source_package COMPARING Receive nr  Type.
    But you should make sure which record of the either rows need to deleted
    i.e in
    F9001;LU;J001;662;
    F9001;LU;J002;662
    You need to decide to eliminate 1st or 2nd one.(depends on your requirement)

  • Identify the last data package in start routine

    Hi Everyone
    We have a start routine in transformations. We require to do some special processing in the start routine only when the last data package is executing. How can we determine in the start routine that current package is last one or not ? Any pointers in this direction are appreciated.

    Hi,
    You can get packet Id from datapackid in start routine and end routine. But I'm not so sure how to identify the last packet ID, alternatively you can store this packet id in some where else and read the same value in End routine if your logic(processing) permits to do this in End routine instead of Start routine.
    METHODS
          start_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              SOURCE_PACKAGE              type tyt_SC_1
            RAISING
              cx_rsrout_abort.
    hope it helps...
    regards.
    Raju

  • Start routine error ....,

    Hi
    i written start routine in transformations. it showing some error. please suggest correct way.
    TYPES : begin of fs_pctr,
                  profit_ctr type /BIC/PZPRFTCTR-/BIC/ZPRFTCTR,
                 end of fs_pctr.
    DATA : it_pctr type standard table of fs_pctr,
                wa_pctr like line of it_pctr.
    select /BIC/ZPRFTCTR from /BIC/PZPRFTCTR into table it_pctr where objvers  = 'A'.
    loop at source_package assigning <source_fields>.
    read table it_pctr with key profit_ctr = <source_fields>-/BIC/ZPRFTCTR.
       if sy-subrc ne 0.
        delete source_package.
       endif.
    endloop.
    Error: E:In the OO context either an INTO or an ASSIGNING specification or the         
    addition "TRANSPORTING NO FIELDS" must be used. addition "TRANSPORTING          
    NO FIELDS" must be used.
    waiting for suggestions.
    Regrds
    swetha

    Hi,
    you can work around with the code as below... this would be much faster as you are deleting transaction data based on some master. so looping master is lesser and deleting transaction in that is faster.
    Declaration
    - internal table is correct but for work area declare as under
    data wa_pctr type fs_pctr.
    after select statement
    loop at it_pctr into wa_Pctr.
    delete source_package where /bic/zprftctr = wa_pctr-profit_ctr
    endloop.
    Hope this helps.
    Regards
    Raj

  • How do you identify the Logical system in start routine of a transformation

    My scenario is this.  I have five r3 systems that I am extracting from.   In the start routine of the transformation from the r3 data source to my data store I  am going to delete data and I need to know the source system id.    How do I identify the logical system or source system id in the transformation.  Is there a system field that contains this information.    I do not want to hard code the source system id in the routine.

    hi
    have a lool at tables rsreqdone and rsbkrequest with a join you should be able to determine the source.
    regards
    Boujema
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).
    Edited by: Boujema Bouhazama on May 9, 2008 12:04 AM

  • Transformation Start Routine

    Hi,
         I have installed the infocubes (0PS_C08, 0PS_C081) from the Business content but I can't activate any of the transformations because of a problem in the start routine.
    the message of the error:
         ----> E:A line of "GT_SOURCE" and "<SOURCE_FIELDS>" are not mutually
         convertible. In a Unicode program, "GT_SOURCE" must have the same
         structure layout as "<SOURCE_FIELDS>", irrespective of the length of a.
    Does anyone have any idea how to solve the problem?
    Best Regards,

    Hi,
           In fact generally this error should occur when you migrate a flow from 3.x to 7.x, but in my case this problem showed just after the business content installation ( I didn't migrate the flow it is a 7.X standard flow).
         I have checked the start routine, and no field is missing. <Source_Fields> and GT_SOURCE did have the same structure but their fields weren't put in the same order, so when I used the APPEND command it generated this error.
    I've put the fields in the same order and the transformation could be activated which resolved the problem.
    Thank you.

  • ABAP code for BI 7.0 transformations start routine

    Hi all,
    I am trying to update data from DSO1 (Source1: transaction data) to Infocube(TARGET)
    In the transformations Start routine, I have to read DSO2(Source2: Master data) for some fields.
    DSO1 has CUSTOMER as part of key
    DSO2 has CUSTOMER (key) and other fields....FIELD1, FILED2, FIELD3
    Infocube to be updated with FIELDS1,2 & 3 WHILE READING DSO2.
    WHERE DSO1 CUSTOMER matches with DSO2 CUSTOMER.
    Also, data NOT TO BE UPLOADED into Infocube if FIELD1 in DSO2= NULL
    Please give me the abap code for the above logic.
    Appreciate any help in this regard.
    Thanks.

    This is a doc from this site:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    Ravi Thothadri

Maybe you are looking for