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

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

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

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

  • Urgent !!! Need help in modifying routine in transformation?

    Hi
    I am using following routine in a transformation for Location number characteristic.
        data: lv_country type /BIC/PZCUSTOMER-country.
        select single country
          into lv_country
          from /BIC/PZCUSTOMER
          where /BIC/ZCUSTOMER = SOURCE_FIELDS-CUSTOMER and
                objvers = 'A'.
        if sy-subrc = 0.
          RESULT = lv_country.
        endif.
    The modification is
    a.       Currently the ZLOCNO is set to be the country of demand, This is what I need it to be:
       i.      IF   Company Code = 70, then set ZLOCNO = “VS”,
               ELSE    set ZLOCNO = ZLOCNO__0COUNTRY from the ZLOCNO characteristics. Use the county code from the existing routine for lookup.
    Please help me out to write a routine for this

    Hi,
    In 7.0, global declaration of start routine will be in a specific place. Declare the variable under this part in the start routine.
    $$ begin of global - insert your declaration only below this line  -
    ... "insert your code here
    $$ end of global - insert your declaration only before this line   -
    Vivek

  • 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

  • ABAP Logic/Structure for a Start and Field Routine in Transformations

    My Requirment is to export data from Data Target to Application Server.
    And for that purpose i built a APD...
    In Transformations to read data from MAster Data Table i had written below Global & Field Routine.
    Start Routine:
    Glodal Declaration
    DATA: it_dep   type standard table of /BI0/MDEPT,
          is_dep   type /BI0/MDEPT.
    LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.
    if not SOURCE_PACKAGE[] is initial.
    SELECT * FROM /BI0/MDEPT INTO TABLE it_dep for all entries in
    SOURCE_PACKAGE
    WHERE depLOYEE    = SOURCE_PACKAGE-dep      AND
          OBJVERS     = 'A'                     AND
          DATETO     GE SY-DATUM.
    ENDIF.
    ENDLOOP.
    FIELD ROUTINE
    Clear:is_dep.
        Read table it_dep into is_dep with key
        depLOYEE = SOURCE_FIELDS-deployee binary search.
        if sy-subrc = 0.
          RESULT = is_dep-USERNAME.
        endif.
    Now for another field 'Manager' name.......
    My requirment
    Start Routine:
    (Sub Detp is an attribute to Dept and Sub Dept is referenced on dept)
    First it should copy all the Sub depts for the corresponding depts in the source field to a Temperoray table (TEMP1)
    For all sub depts in TEMP1 table it should copy manager names from dept master data table to a Temp2 table
    In start routine i need to first read temp1 and result from temp1 should be passed to temp2 and the result from tem2 can be passed to result field
    Please update

    Hi,
    i am providin you a sample code please modify it (field name and tables name's as per your requirement).
    Please write the code in transformation rule of field Emp_TDate.
    Map field Emp_SDATE  to the target field for Emp_TDATE .
        SELECT * FROM /BIC/AEMPPED00
                        WHERE Emp_SDATE NE ' '.
    if sy-subrc is initial.
    result = source_field-Emp_SDATE.
    else.
    result = ' '.
    endif.
    Please replace the emp_SDATE field with the source field name.
    But still i have some question...
    1. On what basis u decide the latest record ??
    Can u please explain scenarion bit mroe clearly.
    Thanks
    Dipika
    Edited by: Dipika Tyagi on Jun 24, 2008 8:47 AM

  • Start routine in DSO Self transformations

    Hi SCN,
    I need to write start routine to fill one of my target feild.
    Here my info object is ZCust and attribute zpur_grp
    My DSO have 0customer and zpur_grp.
    Am creating self transformations for my dso and need to fill zpur_grp from zcust if dso-zpur_grp is blank.
    condition is dso-0customer = info object-customer.
    Am new to abap code part and confused about specifying fields and tables(/bic/).
    Need suggestions to write sample format code.
    Thanks in advance.
    Chandra

    Hi Chandra,
    U need to write look-up code.
    Below s sample code. it might be help you.
    Declare Internal Table Like follow:
    TYPES: BEGIN OF TY_CUST,
                      ZCust TYPE /BIC/ ZCust ,
                      zpur_grp TYPE /BIC/ zpur_grp
                   END OF TY_CUST.
    select value for internal table.
    SELECT /BIC/ ZCust /BIC/zpur_grp
           FROM /BIC/PZCust
           INTO TABLE IT_CUST
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           WHERE /BIC/ZCust = SOURCE_PACKAGE-/BIC/0customer
           AND OBJVERS = 'A'.
    Then write Lookup code in start routine.
    LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
           clear : WA_CUST_DBDIV.
    * Read internal table for customer
           READ TABLE IT_CUST
           WITH KEY ZCust = <SOURCE_FIELDS>-/BIC/0custome
           INTO WA_CUST_DBDIV
           BINARY SEARCH.
    *Populate the corresponding Customer and DB Division in RESULT_PACKAGE
           IF SY-SUBRC = 0.
             <SOURCE_FIELDS>-/BIC/0custome = WA_CUST_DBDIV-ZCust.
             <SOURCE_FIELDS>-/BIC/zpur_grp = WA_CUST_DBDIV-zpur_grp.
    ENDLOOP.
    Hope it 'll help you.
    Regards,
    Mukesh

Maybe you are looking for

  • Dynamically updating data in ADF

    Hi, I am currently developing an adf application where I need to show some dynamic value to the user based on the user login in application. Now I am getting this user specific value by using API calls and feeding the view table of ADF, which in turn

  • Photoshop Elements 10 Mac Ongoing Install Failure - Exit Code 7

    Photoshop Elements 10 Mac Ongoing Install Failure - Exit Code 7 I downloaded Photoshop Elements 10 for Mac (not trial, with valid serial #) Mac OSX 10.7.2, 3.6 GHz Intel Core i5, 16 GB RAM I know the install package is valid because I installed it on

  • No digital video output from XVR-300 in Ultra-45

    I am switching from solaris 10/x86 to sparc. I have a new Ultra-45 with XVR-300 graphics adapter. It's running Solaris 10u4. The system was ordered as a standard configuration from the catalog. The XVR-300 graphics adapter currently produces no digit

  • Prgrmatic viewlink setting for hgrid is working for one level and not remai

    Hi All, I have create 2 VO objects dynamicaly and created 2 VL's dynamically .I have a static HGrid.and iam setting viewlinks dynamically.It is working for 1 level but not another leve..For Example.. Grid id displaying projects to Tasks but not tasks

  • A system error has occured while locking

    Message no. M3021 : A system error has occured while locking I get this message in TCODE MM42 (IS RETAIL) after mass updating articles using TCODE MM46. The lock table size was increased from 4 MB to 10 MB and still the issue occurs. It looks the loc