End-Routine in BI 7.0 :

I implemented an end-routine to populate a field in a DSO.
After a load, when I check the New Data table of DSO, I can see the field populated.
But when I activate the request, I dont see the same field populated in DSO contents.
What could I be missing?
Below is the End-Routine I wrote with the help of SDN:
DATA: WA_result_package LIKE LINE OF RESULT_PACKAGE.
DATA: GI_ZSD_O01 TYPE TABLE OF /BIC/AZSD_O0100.
DATA: WA_ZSD_O01 LIKE LINE OF GI_ZSD_O01.
SELECT * FROM /BIC/AZSD_O0100 INTO CORRESPONDING FIELDS OF TABLE
GI_ZSD_O01.
LOOP AT RESULT_PACKAGE INTO WA_RESULT_PACKAGE.
read table GI_ZSD_O01 with key DOC_NUMBER =
WA_result_package-DOC_NUMBER
into WA_ZSD_O01.
WA_result_package-DOC_TYPE = WA_ZSD_O01-DOC_TYPE.
MODIFY RESULT_PACKAGE FROM WA_RESULT_PACKAGE.
ENDLOOP.

Hi,
Check this .
http://help.sap.com/saphelp_nw70/helpdata/EN/f8/7913426e48db2ce10000000a1550b0/frameset.htm
http://sapbwinfo.blogspot.com/search/label/BI%20Creating%20Routines
http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
Thanks .
Hema

Similar Messages

  • End routine to populate Info-cube.

    Hi ,
    Is it possible to load fileds of a Info-cube using End routines in the following scenairos.
    1.Loading fields of info-cube by referencing/using a master data table in End routine.
    2.Loading fields of info-cube by referencing/using a DSO fields  in End routine.
    3.Loading fields of info-cube by referencing/using a fields of another info-cube in End routine.
    Please advise.

    Hi Stalin,
    Before answering your question you need to understand something about "End routine" and "Expert routine".
    End Routine:
    - Result_fields and Result_package are available
    - End routine contains only those fields available in Data target.
    Start Routine:
    - Source_fields and Source_package are available
    - Start routine contains only those fields coming from source.
    Expert Routine:
    -  Source_fields, Source_package, Result_fields and Result_package are available
    So Now if you want write code to look up into some other cube, in look up you may need to test condition using source fields, in that case " Expert Routine" is only the option.
    For Ex
    my data target contains : x,y and z fields (it becomes result_field)
    source contains : a field ( it becomes source_field)
    now if i want to write look up code like this " select x,y and z fields from other cube where my a field value = other cube a field value. here u r accessing both S_F as well as R_F. So only the option is "EXPERT ROUTINE"
    or else u want to write code only with R_F then "End routine " is enough.
    Thanks,
    Gowd

  • End Routine ABAP to read from Internal table and do calculation.

    Hi All...
    I have completed some coding in a start routine to extract some fields from a DSO containing Master Data (Stock Age) into an internal table (the internal table has been defined in the global declarations area) which will then be read in the end routine.
    (the internal table will be read) at loadtime in the end routine and used in a calculation as described below.
    I.E
    GLOBAL DATA DECLARATION
    Data: ITAB1 TYPE TABLE OF /BIC/DSOTAB
    (DSOTAB has 3 fields PLANT, STYLE, 1STDATE (1STDATE IS A DATE FIELD)
    The start routine has the following code:
    IF ITAB1 IS INITIAL.
    SELECT /BIC/PLANT /BIC/STYLE /BIC/1STDATE
                    FROM /BIC/DSOTAB
                    INTO CORRESPONDING FIELDS OF TABLE ITAB1.
    This is working fine when run under simulation i.e ITAB1 is filled no problem.
    I then need to do a calculation in the end routine.
    1. First I have to find the record in the internal table using the key of PLANT AND STYLE from the RESULT_PACKAGE.
    The code i am using now is as follows....
        READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
        /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
        <result_fields>-/BIC/STYLE.
    Once this record has been read I then have to perform the following calculation using the following additional fields
    <result_fields>-/BIC/DYS1ST is a NUMC field in the <result_fields> that will be be filled by the result of the calculation described below.
    <result_fields>-CALDAY is a date field which is already populated in the <result-fields> which is used in the calculation below.
    The Calculation required is a difference in days between two dates
    DYS1ST = CALDAY - 1STRED.
    The code i am using is
    If sy-subrc = 0.
         <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
         i_t_1stred_dso-/BIC/1STRED.
    So the whole section of code inside the LOOP at RESULT PACKAGE looks like this in the end routine
           READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
        /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
        <result_fields>-/BIC/STYLE.
    IF sy-subrc = 0.
         <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
         i_t_1stred_dso-/BIC/1STRED.
    Im getting the error
    "ITAB1 " is a table without a header line and therefore has no component called "/BIC/1STRED
    Please can someone advise as to what I need to do to get this fixed please.
    Thanks in advance
    Stevo:)

    Hi,
    You will have to do few changes in your code as below,
    GLOBAL DATA DECLARATION
    Data: ITAB1 TYPE standard TABLE OF /BIC/DSOTAB.
    After that declare a workarea to read the values.
    DATA: i_wa_itab1 type /bic/dsotab.
    (DSOTAB has 3 fields PLANT, STYLE, 1STDATE (1STDATE IS A DATE FIELD)
    The start routine has the following code:
    IF ITAB1 IS INITIAL.
    SELECT /BIC/PLANT /BIC/STYLE /BIC/1STDATE
    FROM /BIC/DSOTAB
    INTO CORRESPONDING FIELDS OF TABLE ITAB1.
    This is working fine when run under simulation i.e ITAB1 is filled no problem.
    I then need to do a calculation in the end routine.
    1. First I have to find the record in the internal table using the key of PLANT AND STYLE from the RESULT_PACKAGE.
    The code i am using now is as follows....
    READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
    /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
    <result_fields>-/BIC/STYLE.
    Once this record has been read I then have to perform the following calculation using the following additional fields
    <result_fields>-/BIC/DYS1ST is a NUMC field in the <result_fields> that will be be filled by the result of the calculation described below.
    <result_fields>-CALDAY is a date field which is already populated in the <result-fields> which is used in the calculation below.
    The Calculation required is a difference in days between two dates
    DYS1ST = CALDAY - 1STRED.
    The code i am using is
    If sy-subrc = 0.
    <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
    i_t_1stred_dso-/BIC/1STRED.
    So the whole section of code inside the LOOP at RESULT PACKAGE looks like this in the end routine
    READ TABLE ITAB1 into i_wa_itab1 WITH KEY
    /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
    <result_fields>-/BIC/STYLE.
    IF sy-subrc = 0.
    <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
    i_wa_itab1-/BIC/1STRED.
    Once you do this changes, your code will work fine.
    Regards,
    Durgesh.

  • Selecting, reading and sum of billing quantity for last 12 months in transformation end routine

    Hi experts,
    i have requirement to write end routine to read a DSO for last 12 months sales quantity for each month and sum value pass to keyfigure
    not interested using bex variable, while data loading from source to target dso in end routine i am trying to read another DSO which is same as my
    target dso where information is stored by fiscal period, year material etc. finally there is  a keyfigure in target whih needs to be filled with sum of 12
    months sales quantity, for each record form sourc to target maximum of 12 records will be in read dso (for 12 months) my routine is like below.
    i am not expert in abap please kindly gothrough and guide me in this
    TYPES: BEGIN OF s_/BIC/AZOSLS00,
    FISCPER  type /BI0/OIFISCPER,
    FISCVARNT  type /BI0/OIFISCVARNT,
    PLANT  type /BI0/OIPLANT,
    STOR_LOC  type /BI0/OISTOR_LOC,
    /BIC/MATERIAL  type /BIC/OIMATERIAL,
    VTYPE  type /BI0/OIVTYPE,
    BILL_QTY  type /BI0/OIBILL_QTY,
    END OF s_/BIC/AZOSLS00.
    DATA: it_/BIC/AZOSLS00 TYPE TABLE OF s_/BIC/AZOSLS00,
    wa_/BIC/AZOSLS00  TYPE s_/BIC/AZOSLS00.
    SELECT
    FISCPER
    FISCVARNT
    PLANT
    STOR_LOC
    /BIC/MATERIAL
    VTYPE
    BILL_QTY
         FROM /BIC/AZOSLS00 INTO TABLE it_/BIC/AZOSLS00
           FOR ALL
          ENTRIES IN RESULT_PACKAGE
           WHERE
    below field is from value of fiscal period (which is fiscal period -999 ex:  for 001.2014 this
    value will be 002.2013 so 12 months including current period)
    FISCPER >=  RESULT_PACKAGE-/BIC/ZFISCPERF
    below is result filed fiscal period (here i dont know which keyword or statement to be used to select
    interval values this between statement giving syntax error that can not be used in where for for all entries
    between RESULT_PACKAGE-FISCPER
            AND
             FISCVARNT = RESULT_PACKAGE-FISCVARNT AND
             PLANT = RESULT_PACKAGE-PLANT AND
             STOR_LOC = RESULT_PACKAGE-STOR_LOC and
          /BIC/MATERIAL = RESULT_PACKAGE-/BIC/MATERIAL .
        SORT it_/BIC/AZOSLS00 BY FISCPER FISCVARNT PLANT STOR_LOC
        /BIC/MATERIAL .
        LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.
          READ TABLE it_/BIC/AZOSLS00 INTO wa_/BIC/AZOSLS00 WITH KEY
    below dont know what statement i need to use in read statement for interval of fiscal periods
    giving error that >= can not be used
         FISCPER >=  <result_fields>-/BIC/ZFISCPERF
    FISCPER = <result_fields>-FISCPER
             FISCVARNT = <result_fields>-FISCVARNT
             PLANT = <result_fields>-PLANT
             STOR_LOC = <result_fields>-STOR_LOC
          /BIC/MATERIAL = <result_fields>-/BIC/MATERIAL
           BINARY SEARCH.
          BREAK-POINT.
          IF sy-subrc = 0.
    below for each record there will be 12 records in read so sume of 12 records quantity i need to pass to result again dont know what to say here
    sum statement giving error
                <result_fields>-/BIC/ZLSTSLS12 =
                 sum(wa_/BIC/AZOSLS00-BILL_QTY).
              ENDIF.
        ENDLOOP.
    friends please help me in this.
    Thanks
    Chandra.

    Hiii,
    If you only want to store last  12 months data in Target ODS .
    Then Create filter in DTP and write routine in filter for calmonth or fiscal period.
    Refer the below link to create filter routine :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80b2db87-639b-2e10-a8b9-c1ac0a44a7a6?QuickLink=index&…
    Regards,
    Akshay

  • Filling Data fields of a DSO in End Routine

    Hi Everyone,
    The data fields of a DSO contains 2 key figures and a characteristic.
    In the End routine of the transformation, i have assigned constant values for the infoobjects in the data field.
    After executing the DTP, if I check in the New Table of the DSO, these constant values are present.  But when I activate the DSO, the values for key figures gets initialised and the values for the characterisitic becomes empty (NULL).
    Is it not possible to assign values for the infoobjects in the data field? If so, why is this limitation?
    Thanks in advance,
    Uma

    Uma,
    To populate any field in the end routine, you have to assign some constant in the transformation first and then re-populate them using the end routine.
    Sometimes if you dont assign any constant in transformation, the values remain initial and even after you write a code fo that field, it is not populated in the end routine.
    All you have to do is assign constant 0 to the key figures you are populating in the end routine and run the DTP again.
    Thanks
    Sachin

  • 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

  • Source Field in End Routine of DSO Transformation

    Hi,
    I made a transformation from source DSO to Target DSO.
    There are 7 fields in source & 6 fields in target..All the 6 fields are one to one mapped from the source to Target
    I need to write a simple ABAP Logic in End Routine based on the 7th source field which is not mapped.
    Please let me know the piece of ABAP code or steps where i can get the value of Source table in End routine
    Regards
    Suresh

    Hi Suresh,
                      Check here.........
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e73bfc19-0e01-0010-23bc-ef0ad53f2fab
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
    Regards,
    Vijay.

  • No data in Active table of DSO for fields populated by End Routine

    Hi,
    I have a Standard DSO where we are populating few fields by using End Routine.
    Last week we added 5 more fields to DSO and wrote a logic in End ROutine to populate the DSO. These new fields dont have any mapping and these are just populated by end routine only.
    When I loaded the data from Data Source TO DSO, Data is loaded correctly into NEW DATA Table of DSO for all the fields. I could see correct data as per the logic in NEW Table including old and new fields.
    However, when I activate the DSO, I could not find the data for new fields which I added last week. Remaining fields are getting data as per the logic. Only these five fields are not having any data.
    Can you please let me know if any one had similar issue. I was under impression that all the data in the new table will go to Active table when we activate the DSO.
    Your inputs are highly appreciated.
    Thanks
    Krishna

    What version of BW are you using?  When editing your end-routine, a pop-up should display saying which fields you want populated/transferred from the end routine.  This pop-up will not display if you are using a lower version of BW 7.x.  To get around this, make sure that your newly added fields have a transformation rule type set to constant.  This will make sure that the fields get populated when transferring from new to active tables.

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

  • Thumbrule for Start/End Routines Usage

    Friends,
                 Is there any thumb rule to decide when to use start or end routine in BW 7 in transformations ?  Can anybody provide a scenario for demonstration .. from performing simple lookups on different DSOs to get descriptions vs any other specific scenarios..   Is there any scenario in which only start or only end routine can be performed.. ?
    Any thoughts would be great..?
    thanks,
    Sunil

    Start routine is totally concerned with source data , where you need to write logic for source_package.
    Start routine will execute before transformation execution.
    Executes packageby package.
    loop at source_package into source-feilds.
    End routine works on target structure  and we have lo write logic on result_package.
    Genarally dso lookups are concerned with end routines.
    loop at result_package into result-feilds.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e
    http://forums.sdn.sap.com/thread.jspa?threadID=1963087
    Regards,
    rvc

  • 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

  • Start & End Routines in BI 7  Transformations

    Hi,
    In Transformations from DSO1-->DSO2
    In Start Routine for all entries in Source Package i read some fields from DSO3 and filled an iternal table
    And  in end routine i read the iternal table and filled the result package/fields
    In the mapping i haven't mapped any thing to the fields to which i intended to fill using routines
    When i executed data load those fields are not populated with any value
    But if i debug the transformation...results are updating in all fields in the  result package.......
    Do i need to make any setting or mappings to the fields which i want to update using end routine
    Thanks

    HI,
    For support pack 16 and above you get one more button besides End Routine (once end routine is created).
    This button is to update behaviour of fields in End Routines. You get two options once you select this button. One needs to make selection of proper option as it is mandatory.
    The default setting for the pushbutton is that only the fields with active rules are updated in the transformation. With this selection, fields populated in End routine wont be updated in the data target if no active rule exists for them in Transformation.
    Alternatively, you can define that all the fields should always be updated by selecting 2nd radio button. As a result, fields filled in the end routine are not lost if there is no other active rule.
    So in your case if you are in SP 15 or lower, then you will have to map the fields.
    Go through this article it gives the above explanation along with screenshots.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/30d35342-1fe3-2c10-70ba-ad0da83d23bd
    Hope this helps.
    Thanks,
    Rahul

  • 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

  • End routine

    Hello,
    I have the code below as a model .
    As far as I see , it is done for fiscal period. I need something similar, to put date and time.
    I move data from cube 1 to cube 2, BW 7.0.
    My cube 2 has two more extra fields then cube 1(date and time of the request that comes).
    I don't understand why I need the read table instruction and how I test in my case for request, instead of fiscal period.
    Any suggestions/ clues ...?
    Thank you.
      METHOD end_routine.
        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
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
      DATA: fiscper type RSBK_S_RANGE-high,
            RESULT type tys_TG_1,
            l_tabix type sy-tabix,
            l_requnr TYPE fieldname,
            e_th_selections type RSBK_TH_RANGE,
            e_th_fiscper type line of RSBK_TH_RANGE.
    e_th_selections = p_r_request->get_th_range( ).
    READ TABLE e_th_selections WITH KEY fieldnm = 'FISCPER'
        INTO e_th_fiscper.
      fiscper = e_th_fiscper-high + 1.
      LOOP AT RESULT_PACKAGE INTO RESULT.
        l_tabix = sy-tabix.
        result-fiscper  = fiscper.
        result-fiscyear = fiscper+37(4).
        result-fiscper3 = fiscper+41(3).
        MODIFY RESULT_PACKAGE FROM RESULT INDEX l_tabix.
        CLEAR RESULT.
      ENDLOOP.

    I am not sure I understand - do you want to populate cube infoobjects with the current date and time in an end routine, or using the methods provided by p_r_request ?
    p_r_request has methods like GET_TSTMP_START, that you can see if they work for you.

  • End routine help

    Hi Experts,
    I have an CUBE which is loading once in a week(full load). In that cube i have plant and material and some other fields . My requirement is
    1) i have to delete some materials from all the plants from the cube like mat1,mat2,mat3..etc from all the plants
    and
    2)have to delete one material for some plants  like delete Mat8 for Plnt2 ,plnt5 and plnt 7.
    For that i have written some code in End routine....As i am not an ABAPer, I need corrections ..please look in to and advice.
      1)
    data: Wa_Result_Package type tys_TG_1.
        loop at RESULT_PACKAGE into Wa_RESULT_PACKAGE.
      delete Wa_Result_package .
          if Wa_Result_package-/BIC/ZMATERIAL = 'MAT1' or
             Wa_Result_package-/BIC/ZMATERIAL = 'MAT4' or
             Wa_Result_package-/BIC/ZMATERIAL = 'MAT6' or
             Wa_Result_package-/BIC/ZMATERIAL = 'MAT7' or
             Wa_Result_package-/BIC/ZMATERIAL = 'MAT9' .
            modify RESULT_PACKAGE from Wa_RESULT_PACKAGE.
          endif.
        endloop.
      2)
    data: Wa_Result_Package type tys_TG_1.
        loop at RESULT_PACKAGE into Wa_RESULT_PACKAGE.
    delete Wa_Result_package
          if Wa_Result_package-plant = 'PLNT2' and  Wa_Result_package-plant =
          'PLNT4' and  Wa_Result_package-plant = 'PLNT8'.
            then delete Wa_Result_package-/BIC/ZMATERIAL = 'MAT8'.
            modify RESULT_PACKAGE from Wa_RESULT_PACKAGE.
          endif.
        endloop.
    Please Advise,
    KP

    Hi Saveen,
    I modified acc to ur advice..please correct..
    1)
    data: Wa_Result_Package type tys_TG_1.
    loop at RESULT_PACKAGE into Wa_RESULT_PACKAGE.
    delete Result_package .
    where Wa_Result_package-/BIC/ZMATERIAL = 'MAT1' or
    Wa_Result_package-/BIC/ZMATERIAL = 'MAT4' or
    Wa_Result_package-/BIC/ZMATERIAL = 'MAT6' or
    Wa_Result_package-/BIC/ZMATERIAL = 'MAT7' or
    Wa_Result_package-/BIC/ZMATERIAL = 'MAT9' .
    modify RESULT_PACKAGE from Wa_RESULT_PACKAGE.
    endif.
    endloop.
    2)
    data: Wa_Result_Package type tys_TG_1.
    loop at RESULT_PACKAGE into Wa_RESULT_PACKAGE.
    delete Result_package
    where  Wa_Result_package-plant = 'PLNT2' and Wa_Result_package-plant =
    'PLNT4' and Wa_Result_package-plant = 'PLNT8'.
    then delete Wa_Result_package-/BIC/ZMATERIAL = 'MAT8'.
    modify RESULT_PACKAGE from Wa_RESULT_PACKAGE.
    endif.
    endloop
    Regards...KP

  • END ROUTINE clarification

    Hi,
    I have seen below text in help
    Only fields that have a rule in the transformation are transferred from the end routine
    http://help.sap.com/saphelp_nw70/helpdata/en/20/a894ed07e75648ba5cf7c876430589/frameset.htm
    what does it mean..for ex if i populate some infoobject with data in target structure where i don't have any single source field but i read from masterdata tables in end routine then for which source field I should map as i dont have any specific ??
    because actually i written end routine and its syntax everything is fine development system and transport getting failed into quality saying syntax error in end routine..as currently i didnt map any source fields to the target field for which i am populating in end routine ;;;so just i am suspecting whether is it because of this problem or some thing else...
    If any one has idea on this please reply as soon as possible..
    thanks in advance
    BRK
    Edited by: BRK on Jul 22, 2008 10:40 AM

    Hi Banu,
    Is all the field contain special character?.
    Include only those field which contain the special character.
    Structure End routie.
    Take one field abcwith all the special character.like & * ^ %.
    loop at RESULT_PACKAGE assigning <result_fields>.
           do.
    Here compare all the fields which might contain the special character
    with the above filed(which you have defiend earlier).
            if not <result_fields>-/BIC/ZLOCATION co abc.
              apply your logic   
    Include another field.
    Apply the logic.   
    else.
              exit.
            endif.
          enddo.
    endloop.
    Please include all the field in the above structure.
    Hope this is helpful.
    Thanks,
    Saveen

Maybe you are looking for