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

Similar Messages

  • Finding the simulation mode in start/end routine

    Hi ,
    I am also updating some other tables in my transformation apart from the actual target infoprovider data.
    But I would like to update those other tables only when the DTP is actually run and don't want to update when DTP is run in simulation mode.
    Is there any way in the start/end routine to find whether the DTP execution is simulation or Real?
    Regards,
    Ramesh

    Hi,
    This is not possible in the start routine as this check is done even before reaching the start routine by using the method :
    if_rsbk_dtp_maintain~set_simulation
    -Vikram

  • 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

  • Check if a DSO has been lookup by other DSO/cube in start/end routine

    I have to support on of the client system which I am not part of the development.
    I found one DSO has been schedule to load data in daily process chain but it is not update to any target.
    Is it possible to check if this DSO has been using in the staging  i.e look up the reference field by other cube/DSO in start or end routine ?

    Hi,
    Possible by invoking respective field into code part.
    I think not much stuff required in this regard.
    Thanks - RK

  • Travel Mgmt : Change the Default Country for Start/End of Trip.

    Hello,
    We've implemented Travel Management on ERP6.0 Enhancement Pack 2. When we raise a travel request via the web, the "Country" reflected on "Start of Trip" and "End of Trip" is always fixed (to home country, Singapore) and not editable. However, it is possible in our business that users should be able to travel from home country to a foreign destination or from a foreign destination to home country, i.e. as separate travel request. For the latter, users are not able to reflect that the trip starts from a foreign destination.
    What is the configuration step to open up the "Country" for "Start of Trip" and "End of Trip" to be editable ? Thank you.
    Regards
    Kir Chern

    Hi Kir Chern,
    You can go to T-code : SM30 and in the table enter V_T706V or V_T706L.
    After that you have to enter the Trip Provision.
    This is to maintain the Country in the table and you may select the country from there.
    Thanks.
    Joo

  • Setting a specific time zone for start/end times?

    I tend to travel in clusters, and was frustrated on this current trip when all of my flight times were adjusted by 3 hours on my iPhone and iPad after landing in Florida from California.  But they weren't "corrected" to the appropriate local times on any of the flights... which, of course, means that all of my alerts are at the wrong time!
    Is there a way to specify which time zone an event occurs in?  i.e., start time is PST, end time is EST
    (I can see how to turn off automatic time zone changes, but that won't help me until I get home)
    Thanks!
    Chris

    In Mac OS X Lion, it's iCal > Preferences > Advanced > check Turn on Timezone Support
    In iOS 5, it's Settings > Mail, Contacts, Calendars > TIme Zone Support > on
    The start and end time are in the same zone (and that's the zone associated with the event), but iCal automatically adjusts the entry to local time in the daily and related views.  There isn't a way to have a unique timezone for the start- and the end-time in a single event.

  • Start - end routine modeling

    Hello experts,
    I have a fairly large source package 3 million lines. From that one line that starts with a specific patern for example date* has the date of the file.
    I need that date in order to use it at the transformation.
    The problem is that i cannot know in which package the system will find that date.
    So even if i find it with abap at the start routine, the packages before that will not have that date which i need.
    Any thoughts?
    Thanks
    Yannis

    Hi Yannis,
    here's an idea that allows you to stay in BW.
    1) Load your file into a new DSO or new InfoObject. In the start routine you delete all lines except the one of the 3 million that you need first.
    2)Then as a second step you load the same file into your main target and you use a lookup into the new DSO to get the date you are after.
    If you use the same datasource for both you can even use the same PSA. Use a Process Chain to make sure step 1 is executed before step 2 is started.
    Best,
    Ralf

  • Start/End routine code to delete last 5 characters

    Hi All,
              I have a field 15 CHAR in length in my data source. The first 10 characters are always numbers followed by a hyphen(-) and 4 more numbers.
    I want to store this into my DSO as a 10 character field containing just the first 10 numbers and drop the last 5 characters. Can anyone suggest me the routine for this?
    Thanks!
    Missy

    Hi Missy,
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e?quicklink=index&overridelayout=true
    Have a look to above docs link.
    I hope, it will help you alot!!!
    Thanks,
    Ajay

  • Auto populate system time for start/end times in OTL Time card

    Hi,
    Is there an option of defaulting the time-card entry/exit times to system-time.
    Say on the time-card a press of a button will default the start-time and end-time(and have these as read-only).
    Is this possible in OTL with any preferences ?
    The client wants to do-away with the time-clocks all together. If such a feature is available in OTL.
    TIA,
    VB
    Edited by: VB on Jun 13, 2011 5:39 PM

    VB,
    You can't add logic in layouts to auto populate the time based on clock. You will have to depend on a custom process to do it.
    Also least time period of entry is day, not week. Look at the preferences setup of your test employee.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • 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 for Currency conversion

    Hi,
    I have a requirement in which i have to convert sales and cost into three types of currency as GBP, INR and EUR in cube. i made 3 different fields for sales as well as for cost. But i am unable to write end routine for it.
    Can anyone please help me that how can i solve this problem.
    Roma

    Hi,
    In transformation itself you can do your currency conversion.
    http://help.sap.com/saphelp_nw70/helpdata/en/de/6372426f0f9041e10000000a1550b0/content.htm
    If you want to write a routine in to do conversion, you have to go for start routine instead of end routine.
    Thanks
    BVR

  • End Routine to populate custom AFS field for Billing Item extractor

    I have the following scenario for Billing 2LIS_13_VDITM datasource
    Doc_No   Item  Material    Item_Categ   AFS_field
    2000        11     XYZ          123
    2000        12     XYZ          123                  US1
    3000        11     PQR          456                 
    3000        12     PQR          456                  CA1
    I need to populate the AFS_field in the first row also for all Doc Nos for certain Item categories (eg 123 & 456). I need to do this on the first transformation from PSA to DSO. I was planning to write a SELECT statement in the Start Routine with the PSA table as the reference as seen below and then write an End Routine calling this reference table. But the PSA table name is different in Dev, QA and Prod so I cannot use this.
    TYPES: BEGIN OF S_AFS,
    VBELN TYPE C LENGTH 10,
    PSTYV TYPE C LENGTH 4,
    MATNR TYPE C LENGTH 18,
    J_4KRCAT TYPE C LENGTH 16,
    J_4KSCAT TYPE C LENGTH 16,
    END OF S_AFS.
    DATA: LT_AFS TYPE STANDARD TABLE OF S_AFS,
          LS_AFS TYPE S_AFS.
    DATA: LT_DATA TYPE tyt_SC_1.
    LT_DATA[] = SOURCE_PACKAGE[].
    SORT LT_DATA DESCENDING BY VBELN MATNR J_4KRCAT.
    DELETE ADJACENT DUPLICATES FROM LT_DATA COMPARING VBELN MATNR.
    SELECT VBELN MATNR J_4KRCAT J_4KSCAT
    INTO CORRESPONDING FIELDS OF TABLE LT_AFS
    FROM /BIC/B0000777001
    FOR ALL ENTRIES IN LT_DATA WHERE VBELN = LT_DATA-VBELN AND MATNR =
    LT_DATA-MATNR.
    SORT LT_AFS BY VBELN MATNR.
    I am not an expert in writing ABAP code. Any suggestions are greatly appreciated and points will be assigned. Thank you.

    Hi
    why do want to select the data from PSA table ?Already your trying to load data from PSA to DSO.
    you want to populate the AFS field value in DSO right?
    1. First you have to add AFS field in ur DSO
    2. Write the Start routine based on ur scenario(select the data based on ur scenario and put into internal table).
    3. wirte AFS field leval  transfer routine(Read the corresponding record based on docu num,item num) pass into RESULT.
    Regards,
    GR

  • Calculations in Update rules/Start routine/End Routine

    Hi Friends,
    I have loaded data to a DSO and i have three fields in to it. Lets say Filed1, Filed2 and Field3. Field1 and Field2 are being populated through an update rule in transformation. Aggregation type for these two fields are "Summation".
    Now, after the transformation executed, the Field1 and Field2 are filled with values. I want to calculate the value of Field3 as follows:
    Field3 = Field1 - Field2
    Can anyone tell me where can i do this calculation? I know we can do this in End routine and in Query  but i want to know if there is any other place i can do this calculation in transformation? In try to do this calculation in the update rule for Field3 in transformation, i dont see Field1 and Field2 as these are not source fields. I can not write formula also because we can write formula only on source fields not the data target fields.
    Your help will be appreciated in terms of points.
    Thanks,
    manmit

    Hi,
    in the start routine in the global section define the two fields:
    data: g_amount1 type /bic/oi<your keyfigure name>,
    g_amount2 type /bic/oi<your keyfigure name>.
    in the routines to your 2 keyfigures store the result in that fields too.
    routine for field1.
    g_amount1 = result.
    routine for field2.
    g_amount2 = result.
    and in the routine to field3
    result = g_amount1 - g_amount2." or whatever calculation/derivation has to be done.
    kind regards
    Siggi
    Message was edited by:
            Siegfried Szameitat

Maybe you are looking for

  • JOption box wont go away

    I read input from aninputdialog box inside a loop which is in a constructor for a simple graphical clock face program the clock is displayed in the applet, but the dialog box doesn't go away, therre is no main method for an applet, so where do i put

  • Applet-Panel, background color and size problem

    I am writing an applet with simple form. Form is having 3 rows and 2 cols (label and textfield). Each row I want to display in different color. So I created each row with 2 separate panel (one for label and one for text field - of which I set the bac

  • CR2008 SP3 Full Build - Another version already installed?

    I'm switching to a brand new workstation so I'm trying to install CR 2008 SP3 Full Build. I've already installed the base software from our original license purchase (which is 10.0.0.683).  I downloaded SP3 full build so I can update that fresh insta

  • Cant use icloud when multiple versions of outlook are installed

    MS states its a apple problem with there software,can you help me?

  • Can an Xserver scale to this level?

    A client has asked me to investigate what it would take to send out 40,000 emails to their customers. They would like them all sent out rather quickly (4-8 hours). My first thought was an Xserver with postfix and mailman. Does anyone have any experie