(BI 7.0) Debugging Routines in Transformation

Dear All,
I would like to debug my own ABAP routine in the transformation for BI 7.0, anyone know how to set a break-point somewhere for popping up the debugging window? thanks
B.R
Charlie

1. find the program behind your transformation (from the Transformation Display screen go to menu Extras > Display Generated Program)
2. put a break-point where you need it
3. create a DTP with Processing Mode (Execute tab) "Serially in the Dialog Process (for Debugging)"
4. launch the DTP

Similar Messages

  • Error while Migrating the custom routines in Transformations

    Dear All,
    I am in the process of migrating BW 3.5 to BI 7.0.I migrated the Standard cubes and DSO's from BW3.5 to BI 7.0 flow successfully.
    But while migrating the transformations which are having the custom routines,I am facing the below errors.
    The data object "COMM_STRUCTURE" does not have a component called BIC/ZGROSSPRI".But the routine contains BIC/ZGROSSPRI.
    I tried to change the BW 3.5 terminology to BI 7.0 terminology.(Like COMM_STRUCTURE replaced by SOURCE_FIELDS).But unable to solve.There are nearly 20 custome routines written in all transformations.
    Can any one guide me who faced the same tyepe of problem?
    Thanks & Regards,
    Dinakar

    HI,
    We need to include Source and Target see the below article.
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    How to Correct Routines in Transformations
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/g-i/how%20to%20correct%20routines%20in%20transformations.pdf
    Thanks
    Reddy

  • 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

  • Difference between Start Routine  and End Routine in Transformations

    Hi  Friends,
      I'm using BI 7.0... here in Transformations step  we have two options..that is START ROUTINE... and END ROUTINE... What is the Difference between Start Routine  and End Routine in Transformations..
       When  we go for Start Routine.. and when we go for End Routine..
    Plz clarrify... points will be rearded..
    thanks
    babu

    Hi,
    One real time scenario for End Routine.
    We have a scenario where in a datasource field is mapped to three infoobjects on the datatarget side. There are 2 key figures which need to get data after these these Infoobjects are filled. The best place for this to happen would be in a End Routine, where in we would loop through the results package and using the values of the infoobjects from the data target ( Cube in this case).
    Hope this helps,
    HD

  • Problem with Routine in Transformation

    I have a routine that uses TIMECALC_DIFF to determine the difference between to date/times held in timestamp format.
    All it generates is a duration of zero, no matter what the inputs are.
    Value for YDATTIM is 20050812121821 and for YDATTIMF  is 20050813121821 and the answer given is zero, when it should be 86400.
    CONSTANTS:   gc_timezone_system      TYPE timezone    VALUE 'MSTNO'.
    DATA:  t_first(14) TYPE c,
             t_last(14)  TYPE c,
             /BIC/YDATTIM TYPE timestamp,
             /BIC/YDATTIMF  TYPE timestamp,
             /BIC/YDATDUR TYPE i.
    CALL FUNCTION 'TIMECALC_DIFF'
              EXPORTING
                timestamp1 = /BIC/YDATTIM
                timestamp2 = /BIC/YDATTIMF
                timezone   = gc_timezone_system
              IMPORTING
                difference = /BIC/YDATDUR.
         RESULT = /BIC/YDATDUR.
    Thanks
    Steve

    In the transformation it generates the following code, and this doesn't seem to be editable;
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
        SOURCE_FIELDS-/BIC/YDATTIMF TYPE /BIC/OIYDATTIMF
        SOURCE_FIELDS-/BIC/YDATTIM TYPE /BIC/OIYDATTIM
       EXPORTING
         RESULT type tys_TG_1-/BIC/YDATDUR**
        DATA:
          MONITOR_REC    TYPE rsmonitor.
    I have put all the code generated below
    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_SC_1,
         InfoObject: YDATTIMF Finish date/time.
            /BIC/YDATTIMF           TYPE /BIC/OIYDATTIMF,
         InfoObject: YDATTIM Start date/time.
            /BIC/YDATTIM           TYPE /BIC/OIYDATTIM,
         Field: RECORD.
            RECORD           TYPE RSARECORD,
          END   OF tys_SC_1.
        TYPES:
          BEGIN OF tys_TG_1,
         InfoObject: YDATDUR Duration.
            /BIC/YDATDUR           TYPE /BIC/OIYDATDUR,
          END   OF tys_TG_1.
    $$ begin of global - insert your declaration only below this line  -
    $$ end of global - insert your declaration only before this line   -
        METHODS
          compute_YDATDUR
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
              SOURCE_FIELDS              type tys_SC_1
            EXPORTING
              RESULT                   type tys_TG_1-/BIC/YDATDUR
              monitor                  type rstr_ty_t_monitor
            RAISING
              cx_rsrout_abort
              cx_rsrout_skip_record
              cx_rsrout_skip_val.
        METHODS
          invert_YDATDUR
            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  *
    $$ end of 2nd part global - insert your code only before this line   *
          CLASS routine IMPLEMENTATION
    CLASS lcl_transform IMPLEMENTATION.
      METHOD compute_YDATDUR.
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
        SOURCE_FIELDS-/BIC/YDATTIMF TYPE /BIC/OIYDATTIMF
        SOURCE_FIELDS-/BIC/YDATTIM TYPE /BIC/OIYDATTIM
       EXPORTING
         RESULT type tys_TG_1-/BIC/YDATDUR
        DATA:
          MONITOR_REC    TYPE rsmonitor.
    $$ begin of routine - insert your code only below this line        -
    CONSTANTS:   gc_timezone_system      TYPE timezone    VALUE 'GMTUK'.
    DATA:  t_first(14) TYPE c,
             t_last(14)  TYPE c,
             /BIC/YDATTIM TYPE timestamp,
             /BIC/YDATTIMF  TYPE timestamp,
             /BIC/YDATDUR TYPE i.
    CALL FUNCTION 'ZZTIMEDIFF'
              EXPORTING
                /BIC/YDATTIM = /BIC/YDATTIM
                /BIC/YDATTIMF = /BIC/YDATTIMF
                timezone   = gc_timezone_system
              IMPORTING
                difference = /BIC/YDATDUR.
         RESULT = /BIC/YDATDUR.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "compute_YDATDUR
          Method invert_YDATDUR
          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 invert_YDATDUR.
    $$ 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.                    "invert_YDATDUR
    ENDCLASS.                    "routine IMPLEMENTATION
    Thanks
    Steve

  • Routine that transforms YYYYMMDD to output view of DD.MM.YYYY

    Hello
    Can somebody tell me the Routine that transforms YYYYMMDD to output view of DD.MM.YYYY
    Thanks

    Hi,
    Hi
    DATA :
        w_d1 TYPE sy-datum.
       w_str  TYPE string.
       w_dot TYPE c VALUE'.'.
    (assigne value of the source filed that you need to convert to  w_d1)
    CONCATENATE w_d16(2) w_dot w_d14(2)  w_dot w_d1+0(4) INTO w_str.
        RESULT  =  w_str.
    Output will be
    dd.mm.yyyy
    Regards
    Mahesh
    Edited by: Monymahesh on Jan 7, 2010 3:05 PM

  • ABAP routine in Transformations syntax fix

    Hi
    As i am beginner in ABAP please correct the Start/End routine which i have written in Transformations for the below requirment
    DSO1------->DSO2
    While load data to DSO1-->DSO2 in need a look that refer active table of DSO3 and perform if condition to fill value to a field in DSO2
    DSO1 (SOURCE FIELDS)
    Field X
    Field Y (X,Y are Key fields)
    Field Z
    Field W
    DSO2 (Result Field)
    Field P (The field which i want to update with Value by routine)
    DSO3 (Look up)
    Field A
    Field B (A,B are Key fields) (A=X,B=Y)
    Field C
    Requirement:
    While loading data from DSO1-->DSO2...We should read active table of DSO3 and pass it to Internal Table (A,B,C)with a key (A=X,B=Y)
    and in the end routine
    First check wether if Field C is not initial...then Result Field P should be updated with E
    ELSE CHECK SOURCE FIELD Field Z = 1..then Result Field P should be updated with F
    ELSE CHECK SOURCE FIELD Field W = T..then Result Field P should be updated with G
    else if all the above conditions are not met .then Result Field P should be updated with H
    Syntax i wrote (Not working correctly)
    GLOBAL DECLARATION:
    TYPES:
    BEGIN OF ty_sou,
    W           TYPE /bi0/W,
    Z            TYPE /bi0/Z,
    END OF ty_sou,
    BEGIN OF ZDSO_3,
    A          TYPE     /bi0/oiA,
    B          TYPE     /bi0/oiB,
    C          TYPE     /bi0/oiC,
    END OF ZDSO_3.
    DATA : ty_ZDSO_3_wa           TYPE   ZDSO_3,
                 ty_ZDSO_3_tab          TYPE   TABLE OF ZDSO_3,
                 ty_ZDSO_3_tab_temp     TYPE   TABLE OF ZDSO_3.
    DATA : ty_sou_tab            TYPE   TABLE OF ty_sou,
                ty_sou_wa             TYPE   ty_sou.
    START ROUTINE
    $$ begin of routine - insert your code only below this line        -
        LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.
          IF  <source_fields>-XIS NOT INITIAL AND
              <source_fields>-Y  IS NOT INITIAL.
            ty_ZDSO_3_wa-A = <source_fields>-X.
            ty_ZDSO_3_wa-B = <source_fields>-Y.
            ty_sou_wa-Z =  <source_fields>-Z.
            ty_sou_wa-W  =  <source_fields>-W.
            COLLECT ty_sou_wa INTO ty_sou_tab.
            COLLECT ty_ZDSO_3_wa INTO ty_ZDSO_3_tab.
          ENDIF.
        ENDLOOP.
    *Select Statement to select values from ZDSO_3 Active Table
        SELECT A B C
        FROM /bic/aZDSO_300 INTO TABLE ty_ZDSO_3_tab_temp   FOR ALL
        ENTRIES IN
             ty_ZDSO_3_tab WHERE A = ty_ZDSO_3_tab-A.
        SORT ty_ZDSO_3_tab BY A B.
    END ROUTINE
    LOOP AT RESULT_PACKAGE ASSIGNING <result_fields> .
    Read table ty_ZDSO_3_tab_temp into ty_ZDSO_3_wa with key
    A = <result_fields>-P
    B = <result_fields>-Q
    binary search.
    If sy-subrc = 0.
    IF ty_ZDSO_3_wa-C IS NOT INITIAL.
    <result_fields>-/BIC/P = 'E'.
    ELSEIF
    ty_sou_wa-Z = 1.
    <result_fields>-/BIC/P = 'Fu2019.
    ELSEIF ty_sou_wa-W= 'T'.
    <result_fields>-/BIC/P = 'G'.
    ELSE.
    <result_fields>-/BIC/P = 'H'.
    ENDIF.
    Endif.
    ENDLOOP.
    But this is not working...i tried to debug but as i am a learner in ABAP i am not familiar....
    Please advise me where or what is wrong with my code and greatful if you can make changes

    Routine End
    LOOP AT RESULT_PACKAGE ASSIGNING<RESULT-FIELD>-/ . 
    Read table ty_ZDSO_3_tab_temp into ty_ZDSO_3_wa
    with key A = -P B = -Q binary search. 
    If sy-subrc = 0. 
    IF ty_ZDSO_3_wa-C IS NOT INITIAL.
    <RESULT-FIELD>-/BIC/P = 'E'.
    ELSEIF ty_sou_wa-Z = 1.
    <RESULT-FIELD>-/-/BIC/P = 'Fu2019.
    ELSEIF ty_sou_wa-W= 'T'.
    <RESULT-FIELD>-/-/BIC/P = 'G'.
    ELSE. 
    <RESULT-FIELD>-/-/BIC/P = 'H'.
    ENDIF.
    Endif.
    ENDLOOP.

  • ABAP Routine in Transformations Syntax Correction

    Hi,
    As i am beginner in ABAP please correct the Start/End routine which i have written in Transformations for the below requirement
    DSO1------->DSO2
    While load data to DSO1-->DSO2 in need a look that refer active table of DSO3 and perform if condition to fill value to a field in DSO2
    DSO1 (SOURCE FIELDS)
    Field X
    Field Y (X,Y are Key fields)
    Field Z
    Field W
    DSO2 (Result Field)
    Field P (The field which i want to update with Value by routine)
    DSO3 (Look up)
    Field A
    Field B (A,B are Key fields) (A=X,B=Y)
    Field C
    Requirement: While loading data from DSO1-->DSO2...We should read active table of DSO3 and pass it to Internal Table (A,B,C)with a key (A=X,B=Y) and in the end routine First check wether
    if Field C is not initial...then Result Field P should be updated with E
    ELSE CHECK SOURCE FIELD Field Z = 1..then Result Field P should be updated with F
    ELSE CHECK SOURCE FIELD Field W = T..then Result Field P should be updated with G
    else if all the above conditions are not met .then Result Field P should be updated with H 
    Syntax i wrote (Not working correctly) 
         Declaration-Global
    TYPES: BEGIN OF ty_sou,
                   W TYPE /bi0/W,
                   Z TYPE /bi0/Z, END OF ty_sou,
    BEGIN OF ZDSO_3,
    A TYPE /bi0/oiA,
    B TYPE /bi0/oiB,
    C TYPE /bi0/oiC, END OF ZDSO_3. 
    DATA : ty_ZDSO_3_wa TYPE ZDSO_3,
    ty_ZDSO_3_tab TYPE TABLE OF ZDSO_3,
    ty_ZDSO_3_tab_temp TYPE TABLE OF ZDSO_3. 
    DATA : ty_sou_tab TYPE TABLE OF ty_sou,
                 ty_sou_wa TYPE ty_sou. 
    Routine Start
    LOOP AT SOURCE_PACKAGE ASSIGNING .
    IF -XIS NOT INITIAL AND -Y IS NOT INITIAL.
         ty_ZDSO_3_wa-A = -X.
         ty_ZDSO_3_wa-B = -Y.
      ty_sou_wa-Z = -Z.
      ty_sou_wa-W = -W. 
    COLLECT ty_sou_wa INTO ty_sou_tab.
    COLLECT ty_ZDSO_3_wa INTO ty_ZDSO_3_tab.
    ENDIF.
    ENDLOOP. 
    *Select Statement to select values from ZDSO_3 Active Table 
    SELECT A B C FROM /bic/aZDSO_300 INTO TABLE ty_ZDSO_3_tab_temp FOR ALL ENTRIES IN ty_ZDSO_3_tab WHERE
    A = ty_ZDSO_3_tab-A. 
    SORT ty_ZDSO_3_tab BY A B. 
    Routine End
    But this is not working...i tried to debug but as i am a learner in ABAP i am not familiar.... Please advise me where or what is wrong with my code and greatful if you can make changes
    Edited by: SAP7593 on Jan 21, 2010 7:56 AM
    Edited by: SAP7593 on Jan 21, 2010 7:56 AM

    Routine End
    LOOP AT RESULT_PACKAGE ASSIGNING<RESULT-FIELD>-/ . 
    Read table ty_ZDSO_3_tab_temp into ty_ZDSO_3_wa
    with key A = -P B = -Q binary search. 
    If sy-subrc = 0. 
    IF ty_ZDSO_3_wa-C IS NOT INITIAL.
    <RESULT-FIELD>-/BIC/P = 'E'.
    ELSEIF ty_sou_wa-Z = 1.
    <RESULT-FIELD>-/-/BIC/P = 'Fu2019.
    ELSEIF ty_sou_wa-W= 'T'.
    <RESULT-FIELD>-/-/BIC/P = 'G'.
    ELSE. 
    <RESULT-FIELD>-/-/BIC/P = 'H'.
    ENDIF.
    Endif.
    ENDLOOP.

  • Primitive APAB editor in start/end routines in transformations

    When editing or viewing ABAP code in BI transformations, for example in a start routine, the editor that opens is very primitive compared to the normal SE38 editor. Some of the limitations include:
    The editor window doesn't cover the whole screen with seemingly no way to increase its size.
    The syntax check doesn't show on which line syntax errors are located.
    There is no option to perform a extended program check.
    There is no way to insert break-points (other than with the ABAP keyword of course)
    These limitations are present regardless of whether i choose the new front-end editor, the old front-end editor or the back-end editor. We're running SAP Netweaver 2004s.
    It is of course possible to create a program in SE38 and copy-paste your start routine code to see the code using the "real" editor, but this is very tiresome and time consuming. Is there a way to make this editor look and behave like the normal editor? I have looked through the setting options an searched SDN without finding a way.

    Hi,
    This is just the settings you need to change to open the start,end, and characteristics routine using the old editor you are comfortable with. No need to go to se38 and check copy the program.
    Go to se38->Utilities->settings->abap editor->editor tab->select the old abap editor.
    To specifically put break point in transformations (start routine..end routine..)..goto transformation (RSA1) and then display the transformation.
    Then goto extra (menu)->generated program. search for start_routine (method now) and put break point in the desired place.
    Then from the DTP enable all 4 break points..in tranformation (this will come when u cange it to debug mode simulation). And u can debug the transformation.
    The new editor is a good handy one. But take some time to get acquented to it. After you may start liking it :).
    Cheers,
    -J

  • Debug Routine

    In my transformation, I have a routine defined for one of the field.
    How can I debug this Routine when I execute the DTP?
    Please search the forum before posting a thread
    Edited by: Pravender on Feb 8, 2011 11:15 AM

    Hi ,
    If you have written Field level routine,then go to rule detail,
    then near transfer values you will get one option test rule,
    give some value and see weather you are getting the rquired value.
    If you have written Start /End routine.
    Load some test data and set a breakpoint at transformation level,
    Then go to DTP ,in the execute tab set the process ing mode
    as Serially in dialog processing(for debugging),then press the button
    simulate and do the debugiing and see if you are gettinn required o/p.
    Hope this is helpful.
    Thanks,
    Saveen Kumar

  • Start Routine: Syntax error in routine 2LIS_03_BF Transformations

    Hi experts,
    I enhanced the 2lis_03_bf data source, and replicated the data source in bw system, i have mapped the transformations and when i try to activate the transformations it is giving the below error.
    Start Routine: Syntax error in routine
    when i check the start routine it is giving the  below error message.
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    please provide me the solution.
    Regards
    venuscm

    Hi Venu,
    This seems to me like you have earlier migrated the update rules to transformations. We did the same earlier and faced issues whenever we add new fields/infoobjects. The error message was different, if i remember correctly.
    We had to add the new field/infoobject added, to the structure '_ty_s_*****' that exists at the top of the start routine code. This was one disadvantage of migration of rules.

  • 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

  • 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

  • Start/Field Routine in Transformations (ABAP)

    Hi Experts
    Please update me on how to proceed and ABAP Code required.
    DSOFULL->CUBE
    DSO Active Table: /BIC/AEMPPED00
    Data In DSO
    Emp_ID--Emp_SDATE--Emp_TDate
    1-----01.01.2008
    1---01.01.2008--01.06.2008
    1-----01.01.2008
    Data Expected in CUBE
    Emp_ID--Emp_SDATEEmp_TDate-----Ter_Date
    1---01.01.2008--
    01.06.2008
    1---01.01.200801.06.2008---01.06.2008
    1---01.01.2008--
    I need a start routine or field routine that
    Will loading data from DSO to CUBE the code should look for employee latest record and if it find Emp_TDatevalue then it should populate both recordsTer_date in cube with  Emp_TDate
    Please advise

    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

  • 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

Maybe you are looking for