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.

Similar Messages

  • 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

  • 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

  • Can we use Perform statement in start routine ,Form and endform.

    Hi,
    Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
    Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
          Form ABC,
          ......<ABAP> code .....
          Endform.

    Hi,
    In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
    But you can surely try both the approaches.
    Reards,
    Durgesh.

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

  • Start Routine in Update Rule

    I want to replace all '# ' values showing up in a report with  space. For this I plan to write a Start Routine in the Update Rules which should scan all the data coming in into the cube and replace all  null or '' with space.
    What is the best way to write this routine. It should check all data in all the fields of the data load coming in.
    Thanks

    Hi,
         The space is shown as # in the BW Reports, to confirm check the value in the cube for this field, so
          you need to change that to some other character like X or Y or explain your end users that SAP
          designates a space as # and it will be displayed that way in the reports.
    Regards,
    Raj

  • How to add new records in Start routine or end routine.

    Hi All,
            My requirement is to transfer data from one DSO to anothe DSO. But while transfering a single record frorm DSO1 i want to add 7 records to DSO2 for each record in DSO1 with slight change in data( with a different key). I want to do it in start routine or end routine. How can i do it. If you have any ABAP code for this then please send.
    Regards
    Amlan

    you can use this code, replace the fields where i have marked with <>.
    DATA : WA_RESULT_PACKAGE TYPE DSO2,
           WA_RESULT_PACKAGE1 LIKE WA_RESULT_PACKAGE.
    DATA : IT_RESULT_PACKAGE LIKE TABLE OF WA_RESULT_PACKAGE.
    DATA : DATE1 TYPE SY-DATUM.
    DATA : DAYDIFF TYPE i.
    DATA : RECORD_NO type rsarecord.
    SORT RESULT_PACKAGE BY <KEY FIELDS> "specify the key fields here
    RECORD_NO = 1.
    LOOP AT RESULT_PACKAGE INTO WA_RESULT_PACKAGE.
         IF WA_RESULT_PACKAGE_1-<KEYFIELDS> NE WA_RESULT_PACKAGE-<KEYFIELDS>.
              WA_RESULT_PACKAGE_1 = WA_RESULT_PACKAGE.
              DAYDIFF = WA_RESULT_PACKAGE-ENDDATE - WA_RESULT_PACKAGE-STARTDATE.
                   WHILE DAYDIFF NE 0.
                        DATE1 = WA_RESULT_PACKAGE-STARTDATE + DAYDIFF.
                        MOVE DATE1 TO WA_RESULT_PACKAGE-<KEYFIELDDATE>.
                        MOVE RECORD_NO TO WA_RESULT_PACKAGE-RECORD.
                        APPEND WA_RESULT_PACKAGE INTO IT_RESULT_PACKAGE.
                        DAYDIFF = DAYDIFF - 1.
                        RECORD_NO = RECORD_NO + 1.
                        CLEAR DATE1.
                   ENDWHILE.
              CLEAR DAYDIFF.
         ENDIF.
    ENDLOOP.
    DELETE RESULT_PACKAGE[].
    RESULT_PACKAGE[] = IT_RESULT_PACKAGE[].
    Reg Point 3.
    The Key figures will then show up in the report aggregated.Hope that is fine with you.
    Note:
    Before loading data, in DTP set the semantic key with the key field of the DSO1.This brings all the similar data w.r.t the key fields from the PSA together in a single package.
    rgds, Ghuru

  • 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

  • BI End Routine MONITOR entry overwrites Start Routine MONITOR entries

    Hi Colleagues,
    I'm using MONITOR TYPE rstr_ty_t_monitors in start routine as well as in end routine of transformations.
    But DTP request monitor shows only my end routine monitor entries under "Start routine" and my start routine monitor entries are not shown.
    msgid = RSM1
    msgty = W or E
    msgno = 799
    Any suggestions?
    Thanks and regards,
    Wolfgang

    Fixed by SAP by means of support package.

  • 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

  • Update Routine & Start Routine in BI 7.0

    Hi Experts,
    We have recently upgraded from BI 7.0 , I am confused about where to write start routine & update routine in transformations of BI 7.0?
    Please mention any pointers?
    Thanks.
    Sharat.

    Hi
    When you open the start routine you will see a routines info which gives you help on this.
    A summary would be:
    Update routine in transformation.
    RESULT = source_field-material.
    Basically you can acess the value of the record by using source_field.
    Start routine.
    The data comes in the form of an internal table with name SOURCE_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT SOURCE_PACKAGE assigning <source_fields>.
    ENDLOOP.
    End routine(This is a new feature in BI 7.0 where you can modify data when transformations are complete and before data is updated to info-providers)
    The data comes in the form of an internal table with name RESULT_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT RESULT_PACKAGE assigning <result_fields>.
    ENDLOOP.
    Hope this helps you to understand the basics of the abap used in the transformations .
    Regards
    Samarpita

  • 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

Maybe you are looking for