Clarification regarding start routines!

Dear all,
I would like to know what exactly the start routines are and how they can be used to manipulate the data coming into the BW system from the R/3 system. If anybody can explain it with an example I would be very greateful. Thanks.
Regards,
Sumit

hi Sumit,
take a look
http://help.sap.com/saphelp_nw2004s/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/c3963dfbde4dede10000000a422035/frameset.htm
other samples
start routine in transfer rules
Look up to load master data
excluding
Start Routine in Transfer Rules
Sample code in Update Rule to restrict data selection?
Append Datapak - transfer start routine
Excluding Blank field in Infopackage Filter
Trans Routine ABAP help ..
start routine in update rules
Is it possible to read a third ODS in update rules between two ODS?
update rule coding while loading data from ODS to CUBE
Start Routine in Update Rules to populate additional fields from ODS
Coding in Update Rules accessing a Z-Table
Start routine
hope this helps.

Similar Messages

  • Regarding start routine used for lookups

    Hi All,
    I am doing a lookup whose logic is being defined in start routine. My requirment is like this.
    I am having an infoobject(1) having a master data and it also have an attribute having the master data too.
    Now I am having one more object(2) having the masterdata and an attribute with out data.
    In my routine I have defined a logic to compare two infoobjects. If they are equal then load the data of the attribute of first infoobject into the second infoobject.
    I have defined the logic like this in routine.
    SELECT /BIC/Z_LOOKUP2
                         FROM /BIC/Z_LOOKUP1
        INTO /BIC/Z_LOOKUP4
           FOR ALL ENTRIES IN SOURE_PACKAGE[]
        WHERE  /BIC/Z_LOOKUP3 = SOURCE_FIELDS-/BIC/Z_LOOKUP1
        END SELECT.
    I am geeting an error as /BIC/Z_LLOKUP1 IS NOT defined in ABAP dictionary as a table,.
    How can I resolve this.
    Please help me.
    Z_LOOKUP1 is having Z_LOOKUP2 as an attribute and,
    Z_LLOKUP3 is having Z_LLOKUP4 as an attribute.
    Thanks.
    Vinay,

    Hi,
    Just check the master data table created for your infoObject Z_LOOKUP1. It would be something like /BIC/PZ_LOOKUP100.
    If you are still getting the error, post your exact code here and we can take a look.
    Hope this helps!
    Regards,
    Saurabh

  • Regarding start routine in transfer strucutre.

    hai
    I need to remove bad characters from source system . For that im using client standard 'function module' and then im calling this funcation module at each Infoobject's transfer routine.
    1)Function module is
    FUNCTION zbw_remove_bad_characters .
    ""Local interface:
    *"  CHANGING
    *"     REFERENCE(STRING)
    Program Name: zbw_remove_bad_characters Create Date:06/12/2000
    Author#s Name:Rohan Williams Last Update:     
    Program Title: Convert non-permittired BW chars to a '.'.
    Development Request #:          *
      DATA: l_allowed_char  LIKE rsallowedchar-allowchar.
      DATA: wf_badchars TYPE i VALUE 1,
            wa_strlen TYPE i,
            wa_chklastchar.
      DATA: l_bad_char_flag.
      wa_strlen = strlen( string ).
      CALL FUNCTION 'RSKC_ALLOWED_CHAR_GET'
           IMPORTING
                e_allowed_char = l_allowed_char.
    *--- added 03/09/2004 Olu takes care of only one unallowed
    *... char at first position.
    if wa_strlen = 1.
        wa_strlen = 2.
    endif.
    *...end.
      WHILE wf_badchars NE wa_strlen.
        IF string CN l_allowed_char.
          IF sy-fdpos < wa_strlen.
            MOVE '.' TO string+sy-fdpos(1).
            wf_badchars = sy-fdpos.
          ELSE.
            wa_chklastchar = string+sy-fdpos.
            IF wa_chklastchar CN l_allowed_char.
              MOVE '.' TO string+sy-fdpos(1).
              wf_badchars = sy-fdpos.
            ENDIF.
          ENDIF.
        ELSE.
          wf_badchars = wa_strlen.
        ENDIF.
      ENDWHILE.
    replace bad character '#' with 'X'
      CLEAR l_bad_char_flag.
      WHILE l_bad_char_flag NE 'X'.
        SEARCH string FOR '#'.
        IF sy-subrc EQ 0.
          REPLACE '#' WITH 'X' INTO string.
        ELSE.
          l_bad_char_flag = 'X'.
        ENDIF.
      ENDWHILE.
    replace bad character '!' with 'X'
      CLEAR l_bad_char_flag.
      WHILE l_bad_char_flag NE 'X'.
        SEARCH string FOR '!'.
        IF sy-subrc EQ 0.
          REPLACE '!' WITH 'X' INTO string.
        ELSE.
          l_bad_char_flag = 'X'.
        ENDIF.
      ENDWHILE.
    *---- ??1234112AR
    CLEAR l_bad_char_flag.
    WHILE l_bad_char_flag NE '·'.
       SEARCH string FOR '·'.
       IF sy-subrc EQ 0.
         REPLACE '·' WITH '.' INTO string.
       ELSE.
         l_bad_char_flag = 'X'.
       ENDIF.
    ENDWHILE.
    translate string to upper case.
    ENDFUNCTION.
    2)Funcation module calling routine at each Infoobject of Transfer Routine ...
    RESULT = TRAN_STRUCTURE-
    zzinputcal(source filed).
    translate RESULT to upper case.
    call function 'ZBW_REMOVE_BAD_CHARACTERS'
    changing
    string = RESULT.
    So i have 25-infoobjects in transfer structure .So i need to call 25 times above function module . It is very length process.
    I think we can write in Start Routine of transfer structure .
    Is it possible to write in start rouinte.If possible pls given the code ..............
    i ll assing the points
    bye
    rizwan

    Hi,
    that was the code:
    <b>data: idx like sy-tabix.
    LOOP AT DATA_PACKAGE.
    idx = sy-tabix.
    1.call infoobject 1
    call function 'ZBW_REMOVE_BAD_CHARACTERS'
    changing
    string = DATA_PACKAGE-iobjnr1.
    2.call infoobject 1
    call function 'ZBW_REMOVE_BAD_CHARACTERS'
    changing
    string = DATA_PACKAGE-iobjnr2.
    . + next 23 calls for your infoobjects.
    modify DATA_PACKAGE index idx.
    endloop.</b>
    /manfred

  • Filter data in transfer rules using start routine

    Hi all!
    I am an absolute newbie here, but I have a question regarding start routines and I noticed many questions get solved around here. My situation is the following: I have to create a start routine where the data to be transferred is filtered on an attribute "DESTINAT" in info object "0BILL_TYPE". DESTINAT can be 'M' or 'D' and depending on that letter, data must flow to a separate ODS.
    Well,I came up with the following:
    somewhere in my start routing I guess I'll have to put:
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'D'
    endloop.
    When I place this in my start routine of my transfer rules leading to the ODS where data must be of DESTINAT type 'M', will this do the trick?
    I want to put the following code in the transfer rules leading to my other ODS, where data must be of type DESTINAT = 'D':
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'M'
    endloop.
    I'm sorry that this is a very basic question, but like I said: I'm a newbie in SAP...

    hi Joris,
    have a lok at the foll  help docs.:
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/content.htm
    cheers
    shameem

  • 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

  • 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

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

  • 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

Maybe you are looking for

  • No connection seen in itunes but is shown on computer

    I have Windows 8 but with the old Windows (e.g. 7, XP, etc) desktop view.  iTunes installed and once worked to sync files, etc., but won't any more.  The computer can see when my ipod is connected, but itunes doesn't, so I can't move files from itune

  • Can I install Adobe Acrobat 4.0 on my Windows 7 system?  ... since it is already paid for.

    I bought a Windows 7 system and am now installing software that I had on my Windows XP system.    What do I need to do to install Adobe Acrobat 4.0 on my Windows 7.0 system?  Adobe Acrobat 4.0 installation states that there are compatibility issues ,

  • Hr_infotype_operation no message for time constraint errors

    Hi i use this function to change the dates for inft 15 but if a similar record exist i get no message in the return table and it does not update the records(that is correct) but why dont i get a message? i am working on 46b abap patch SAPKH46B53 jan

  • 2008 Macbook Partitioned HDD Upgrade

    I want to upgrade my Pre-unibody 2008 Macbook HDD with a larger drive. I have partitioned my drive to run Win7 and I would like to copy both OSs to the new hard drive. If I buy the case to first use the new hard drive externally to partition it is th

  • BPEL database adapter pooling rooling back transaction

    Dear Forum Members, I made a quick example of BPEL retrieving data from DB adapter which is pooling a database, transforms the data and generate a file. The process executes, but at the end is throws the following fault: The transaction was rolled ba