Doubt on Start Routines.

Hi BW Experts,
  I have a doubt on writing routines.I have enchaced the fields Network and WBS Element along with the data source 0FI_AP_4.And in BW side, I am getting data for Network and WBS Element.My requirement is to display the records which is having network or WBS Element.In reporting, I am not getting data if i exclude with Unassigned values for Network and WBS Element. So I decided to write routines in Transformations.
If   /BIC/0NETWORK NE EMPTY OR /BIC/0WBS_ELEMNT NE EMPTY
Then
Load the data to 0FIAP_O03 (ODS)
I don’t know how to write this logic in the form of ABAP Coding.
Please help on this Issue.
Thanks,
Jelina.
Edited by: Jelina on Apr 23, 2008 9:01 AM

Thanks for everybody..
As per karthik suggestion, now i am not getting the error.
I have added this one line Coding in the End Routine.
DELETE RESULT_PACKAGE where NETWORK EQ '' OR WBS_ELEMT EQ ''
While loading the data from datasource to ODS through DTP, none of the records are loaded to ODS.It is showing 0 records in New data table. I hope the coding is correct.  And also 20 records is having the value for Network and WBS element.Herwith i have attached the full coding also. Please find the attached Code and provide me the solution Thanks in advance.
End Routine Code :
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'
      p_r_request
            TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
  PRIVATE SECTION.
    TYPE-POOLS: rsd, rstr.
*Rule specific types
    TYPES:
      BEGIN OF tys_TG_1,
*Field: RECORD Data record number.
        RECORD           TYPE RSARECORD,
*InfoObject: 0COMP_CODE Company code.
        COMP_CODE           TYPE /BI0/OICOMP_CODE,
*InfoObject: 0CREDITOR Account number of supplier/vendor.
        CREDITOR           TYPE /BI0/OICREDITOR,
*InfoObject: 0FISCYEAR Fiscal year.
        FISCYEAR           TYPE /BI0/OIFISCYEAR,
*InfoObject: 0FISCPER Fiscal year / period.
        FISCPER           TYPE /BI0/OIFISCPER,
*InfoObject: 0FISCVARNT Fiscal year variant.
        FISCVARNT           TYPE /BI0/OIFISCVARNT,
*InfoObject: 0FISCPER3 Posting period.
        FISCPER3           TYPE /BI0/OIFISCPER3,
*InfoObject: 0NETWORK Network.
        NETWORK           TYPE /BI0/OINETWORK,
*InfoObject: 0SUBNETWORK Subnetwork number.
        SUBNETWORK           TYPE /BI0/OISUBNETWORK,
*InfoObject: 0WBS_ELEMT Work Breakdown Structure Element (WBS Elem
*ent).
        WBS_ELEMT           TYPE /BI0/OIWBS_ELEMT,
*InfoObject: 0AC_DOC_NO Accounting document number.
        AC_DOC_NO           TYPE /BI0/OIAC_DOC_NO,
*InfoObject: 0ITEM_NUM Number of line item within accounting docum
*ent.
        ITEM_NUM           TYPE /BI0/OIITEM_NUM,
*InfoObject: 0FI_DSBITEM Due Date Item Number.
        FI_DSBITEM           TYPE /BI0/OIFI_DSBITEM,
*InfoObject: 0DCINDIC Debit/credit indicator.
        DCINDIC           TYPE /BI0/OIDCINDIC,
*InfoObject: 0FI_DOCSTAT Item Status.
        FI_DOCSTAT           TYPE /BI0/OIFI_DOCSTAT,
*InfoObject: 0C_CTR_AREA Credit Control Area.
        C_CTR_AREA           TYPE /BI0/OIC_CTR_AREA,
*InfoObject: 0DUNN_AREA Dunning area.
        DUNN_AREA           TYPE /BI0/OIDUNN_AREA,
     InfoObject: 0ACCT_TYPE Account type.
        ACCT_TYPE           TYPE /BI0/OIACCT_TYPE,
     InfoObject: 0SP_GL_IND Special G/L indicator.
        SP_GL_IND           TYPE /BI0/OISP_GL_IND,
     InfoObject: 0AC_DOC_TYP Document type.
        AC_DOC_TYP           TYPE /BI0/OIAC_DOC_TYP,
     InfoObject: 0POST_KEY Posting key.
        POST_KEY           TYPE /BI0/OIPOST_KEY,
     InfoObject: 0VALUE_LC Amount in local currency.
        VALUE_LC           TYPE /BI0/OIVALUE_LC,
     InfoObject: 0DOC_DATE Document Date.
        DOC_DATE           TYPE /BI0/OIDOC_DATE,
     InfoObject: 0PSTNG_DATE Posting date in the document.
        PSTNG_DATE           TYPE /BI0/OIPSTNG_DATE,
     InfoObject: 0CREATEDON Date on which the record was created.
        CREATEDON           TYPE /BI0/OICREATEDON,
     InfoObject: 0CLEAR_DATE Clearing date.
        CLEAR_DATE           TYPE /BI0/OICLEAR_DATE,
     InfoObject: 0LAST_DUNN Date of last dunning notice.
        LAST_DUNN           TYPE /BI0/OILAST_DUNN,
     InfoObject: 0NETDUEDATE Due date for net payment.
        NETDUEDATE           TYPE /BI0/OINETDUEDATE,
     InfoObject: 0DSCT_DATE1 Due date for cash discount 1.
        DSCT_DATE1           TYPE /BI0/OIDSCT_DATE1,
     InfoObject: 0DSCT_DATE2 Due date for cash discount 2.
        DSCT_DATE2           TYPE /BI0/OIDSCT_DATE2,
     InfoObject: 0DSCT_DAYS1 Days for Cash Discount 1.
        DSCT_DAYS1           TYPE /BI0/OIDSCT_DAYS1,
     InfoObject: 0DSCT_DAYS2 Days for Second Cash Discount.
        DSCT_DAYS2           TYPE /BI0/OIDSCT_DAYS2,
     InfoObject: 0NETTERMS Deadline for Net Conditions.
        NETTERMS           TYPE /BI0/OINETTERMS,
     InfoObject: 0DSCT_PCT1 Percentage for Cash Discount 1.
        DSCT_PCT1           TYPE /BI0/OIDSCT_PCT1,
     InfoObject: 0DSCT_PCT2 Percentage for second cash discount.
        DSCT_PCT2           TYPE /BI0/OIDSCT_PCT2,
     InfoObject: 0PYMT_METH Payment method.
        PYMT_METH           TYPE /BI0/OIPYMT_METH,
     InfoObject: 0PMNTTRMS Terms of Payment Key.
        PMNTTRMS           TYPE /BI0/OIPMNTTRMS,
     InfoObject: 0PMNT_BLOCK Payment block key.
        PMNT_BLOCK           TYPE /BI0/OIPMNT_BLOCK,
     InfoObject: 0REASON_CDE Reason code for payments.
        REASON_CDE           TYPE /BI0/OIREASON_CDE,
     InfoObject: 0BLINE_DATE Baseline Date For Due Date Calculation.
        BLINE_DATE           TYPE /BI0/OIBLINE_DATE,
     InfoObject: 0DUNN_BLOCK Dunning block.
        DUNN_BLOCK           TYPE /BI0/OIDUNN_BLOCK,
     InfoObject: 0DUNN_KEY Dunning key.
        DUNN_KEY           TYPE /BI0/OIDUNN_KEY,
     InfoObject: 0DEBIT_LC Debit amount in local currency.
        DEBIT_LC           TYPE /BI0/OIDEBIT_LC,
     InfoObject: 0LOC_CURRCY Local currency.
        LOC_CURRCY           TYPE /BI0/OILOC_CURRCY,
     InfoObject: 0CREDIT_LC Credit amount in local currency.
        CREDIT_LC           TYPE /BI0/OICREDIT_LC,
     InfoObject: 0DEB_CRE_LC Amount in Local Currency with +/- Signs.
        DEB_CRE_LC           TYPE /BI0/OIDEB_CRE_LC,
     InfoObject: 0DSC_AMT_LC Cash discount amount in local currency.
        DSC_AMT_LC           TYPE /BI0/OIDSC_AMT_LC,
     InfoObject: 0DEBIT_DC Debit amount in foreign currency.
        DEBIT_DC           TYPE /BI0/OIDEBIT_DC,
     InfoObject: 0DOC_CURRCY Document currency.
        DOC_CURRCY           TYPE /BI0/OIDOC_CURRCY,
     InfoObject: 0CREDIT_DC Credit amount in foreign currency.
        CREDIT_DC           TYPE /BI0/OICREDIT_DC,
     InfoObject: 0DEB_CRE_DC Foreign currency amount with signs (+/-).
        DEB_CRE_DC           TYPE /BI0/OIDEB_CRE_DC,
     InfoObject: 0DISC_BASE Amount eligible for cash discount in docum
*ent currency.
        DISC_BASE           TYPE /BI0/OIDISC_BASE,
     InfoObject: 0AMOUNT Amount.
        AMOUNT           TYPE /BI0/OIAMOUNT,
     InfoObject: 0CURRENCY Currency Key.
        CURRENCY           TYPE /BI0/OICURRENCY,
     InfoObject: 0DSC_AMT_DC Cash discount amount in document currency
        DSC_AMT_DC           TYPE /BI0/OIDSC_AMT_DC,
     InfoObject: 0DUNN_LEVEL Dunning level.
        DUNN_LEVEL           TYPE /BI0/OIDUNN_LEVEL,
     InfoObject: 0CHRT_ACCTS Chart of accounts.
        CHRT_ACCTS           TYPE /BI0/OICHRT_ACCTS,
     InfoObject: 0GL_ACCOUNT G/L Account.
        GL_ACCOUNT           TYPE /BI0/OIGL_ACCOUNT,
     InfoObject: 0RC_ACCOUNT Reconciliation Account.
        RC_ACCOUNT           TYPE /BI0/OIRC_ACCOUNT,
     InfoObject: 0FI_SUBSID Account Number of the Branch.
        FI_SUBSID           TYPE /BI0/OIFI_SUBSID,
     InfoObject: 0CLR_DOC_NO Clearing Document Number.
        CLR_DOC_NO           TYPE /BI0/OICLR_DOC_NO,
     InfoObject: 0REF_DOC_NO Reference document number.
        REF_DOC_NO           TYPE /BI0/OIREF_DOC_NO,
     InfoObject: 0INV_DOC_NO Invoice Number.
        INV_DOC_NO           TYPE /BI0/OIINV_DOC_NO,
     InfoObject: 0INV_ITEM Invoice Item.
        INV_ITEM           TYPE /BI0/OIINV_ITEM,
     InfoObject: 0INV_YEAR Invoice Year.
        INV_YEAR           TYPE /BI0/OIINV_YEAR,
     InfoObject: 0DOC_NUMBER Sales document.
        DOC_NUMBER           TYPE /BI0/OIDOC_NUMBER,
     InfoObject: 0REF_KEY1 Reference Key 1.
        REF_KEY1           TYPE /BI0/OIREF_KEY1,
     InfoObject: 0REF_KEY2 Reference Key 2.
        REF_KEY2           TYPE /BI0/OIREF_KEY2,
     InfoObject: 0REF_KEY3 Reference Key 3.
        REF_KEY3           TYPE /BI0/OIREF_KEY3,
     InfoObject: 0FI_XARCH Indicator: Original Document Archived.
        FI_XARCH           TYPE /BI0/OIFI_XARCH,
     InfoObject: 0RECORDMODE BW Delta Process: Update Mode.
        RECORDMODE           TYPE RODMUPDMOD,
     InfoObject: 0POSTXT Item Text.
        POSTXT           TYPE /BI0/OIPOSTXT,
     InfoObject: 0COUNTRY Country key.
        COUNTRY           TYPE /BI0/OICOUNTRY,
     InfoObject: 0SP_GL_TT Special G/L Transaction Type.
        SP_GL_TT           TYPE /BI0/OISP_GL_TT,
     InfoObject: 0ALLOC_NMBR Allocation Number.
        ALLOC_NMBR           TYPE /BI0/OIALLOC_NMBR,
      END   OF tys_TG_1.
    TYPES:
      tyt_TG_1        TYPE STANDARD TABLE OF tys_TG_1
                        WITH NON-UNIQUE DEFAULT KEY.
$$ begin of global - insert your declaration only below this line  -
... "insert your code here
$$ end of global - insert your declaration only before this line   -
    METHODS
      end_routine
        IMPORTING
          request                  type rsrequest
          datapackid               type rsdatapid
        EXPORTING
          monitor                  type rstr_ty_t_monitors
        CHANGING
          RESULT_PACKAGE              type tyt_TG_1
        RAISING
          cx_rsrout_abort.
    METHODS
      inverse_end_routine
        IMPORTING
          i_th_fields_outbound         TYPE rstran_t_field_inv
          i_r_selset_outbound          TYPE REF TO cl_rsmds_set
          i_is_main_selection          TYPE rs_bool
          i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
          i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
        CHANGING
          c_th_fields_inbound          TYPE rstran_t_field_inv
          c_r_selset_inbound           TYPE REF TO cl_rsmds_set
          c_exact                      TYPE rs_bool.
ENDCLASS.                    "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line  *
... "insert your code here
$$ end of 2nd part global - insert your code only before this line   *
      CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
      Method end_routine
      Calculation of result package via end routine
      Note: Update of target fields depends on rule assignment in
      transformation editor. Only fields that have a rule assigned,
      are updated to the data target.
  <-> result package
  METHOD end_routine.
*=== Segments ===
    FIELD-SYMBOLS:
      <RESULT_FIELDS>    TYPE tys_TG_1.
    DATA:
      MONITOR_REC     TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line        *-*
... "insert your code here
*DELETE RESULTPACKAGE where NETWORK EQ '' OR WBS_ELEMT EQ ''*_
*--  fill table "MONITOR" with values of structure "MONITOR_REC"
*-   to make monitor entries
... "to cancel the update process
   raise exception type CX_RSROUT_ABORT.
$$ end of routine - insert your code only before this line         -
  ENDMETHOD.                    "end_routine
      Method inverse_end_routine
      This subroutine needs to be implemented only for direct access
      (for better performance) and for the Report/Report Interface
      (drill through).
      The inverse routine should transform a projection and
      a selection for the target to a projection and a selection
      for the source, respectively.
      If the implementation remains empty all fields are filled and
      all values are selected.
  METHOD inverse_end_routine.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
  ENDMETHOD.                    "inverse_end_routine
ENDCLASS.                    "routine IMPLEMENTATION

Similar Messages

  • Urgent : Doubt in writing a code in start routine

    Hi all ,
                 I am BI 7.0 system , I have doubt in writing a code in start routine .
    1) i have to extract the data first from a custom table based on one condition and then placing it into internal table .
    2) Now i have to loop at source_package for a particular region field say "ASIA". with this result i have to check for the correponding entries in custoom table .
       if condition is not true (i.e ) with entries or not matching then delete that particular record from source_package.
    i have written a small logic for this . but this is producing any ouput , Please check it and also let me know for modifications .
    thanks in advance.
    select * from zcsp
        into corresponding fields of TABLE itab_T
        where
        ZBUSINESSUNIT = 'BC'.
    loop at SOURCE_PACKAGE into ls_SOURCE_PACKAGE where /BIC/DPREGION = 'XE'.
                 loop at itab_t into itab_w where zcategory =
                   ls_source_package-/BIC/DPMAT/BIC/DPCAT.
                       if sy-subrc ne 0.
                         delete SOURCE_PACKAGE.
                       endif.
               endloop.
           endloop.

    You're deleting the entire input package.  You only want to delete the one row.
    DATA: g_tabix TYPE sy-tabix.
    SELECT * FROM zscp
    INTO CORRESPONDING FIELDS OF TABLE itab_t
    WHERE zbusinessunit = 'BC'.
    SORT itab_t BY zcategory.
    LOOP AT source_package INTO ls_source_package WHERE /bic/dpregion = 'XE'.
      g_tabix = sy-tabix.
      READ TABLE itab_t WITH KEY zcategory = ls_source_package-/bic/dpmat/bic/dpcat TRANSPORTING NO FIELDS BINARY SEARCH.
      IF sy-subrc NE 0.
        DELETE source_package INDEX g_tabix.
      ENDIF.
    ENDLOOP.

  • 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

  • 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

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

Maybe you are looking for