Start/end/expert routines

Hi,
please can any boby one Explain start/end/expert routines with examples?
Thanks,

Hi,
This has alredy been discussed a lot of time and u can search the forum for your answer.
A brief desc abt them.
1. start routine :-  Mainly used to reduce the hits on database tables and for pre processing the data.
2. End routine :-  Used for post processing of Data.
                           For eg after all the transformations are over, you need to delete certain requests.
3. Expert Routine ;- Used inspecial scenarios where start and end routine might not suffice the need.
                            For Eg:- Transposing rown into coloumns
Regards,
Rahul

Similar Messages

  • Start,end and expert routine in Bi7.0

    Hi,
    Can anyone give real time examples or what you have done in your projects examples to start routine,end routine and expert routine.If possible give example with ABAP code.
    Sridhar

    Hi Sridhar,
    The basic difference between these routines is.
    Start routine: Here you will access to the source package, but not to the target package. Here you will have the code to filter unwanted records to the target.
    End routine: Here you will not have access to source package but you will have access to the target package. Here you can do the lookups based on the values you receive from the transformations.
    Expert routine: Here you will have access to both Source and Target. Here you can combine the advantages of both.
    The below code is for Start Routine. To send only the record satisfying the below criteria.
    u2022     For Currency Type = u2018B0u2019 and Transaction Type = u2018Bu2019 or u2018Cu2019 or u2018Fu2019
    This is a scenario where data is going from one info provider to another info provider.
        DATA:  wa_srcpkg TYPE tys_sc_1..
        DATA: i_t_srcpkg TYPE STANDARD TABLE OF tys_sc_1.
        LOOP AT SOURCE_PACKAGE INTO wa_srcpkg.
          IF wa_srcpkg-curtype = 'B0' AND ( wa_srcpkg-rec_type = 'B' OR
                  wa_srcpkg-rec_type = 'C' OR wa_srcpkg-rec_type = 'F').
            INSERT wa_srcpkg INTO TABLE i_t_srcpkg.
          ENDIF.
        ENDLOOP.
        SOURCE_PACKAGE []  = 
                                             I_T_SRCPKG[] .
    Hope this is of some help...
    Regards,
    CK
    Edited by: Krishna on Jul 15, 2008 3:06 AM
    Edited by: Krishna on Jul 15, 2008 3:07 AM
    Edited by: Krishna on Jul 15, 2008 3:07 AM
    Edited by: Krishna on Jul 15, 2008 3:08 AM
    Edited by: Krishna on Jul 15, 2008 3:09 AM

  • Create Start routine when there is already an Expert routine

    Hi Experts,
    I am using BI 7. If there is an existing Expert routine, can I still create the Start routine?
    Also, what would be the impact? would existing transformations be affected?
    I am trying to create a start routine between 2 DSOs.
    regards
    John

    Hi,
    All can you help this task,
    we extract from data _package of ZJPROVA DSO start routine  all data of ZAMBITOS column
    into an internal table it_tablazambito5.
    Loop this internal table replacing last character by 0. sort and delete duplicatees from this internal table:
    Ej:
    11101--11100
    11102--11100
    we do a selection from ZJPAOCON DSO to get the description in ZDESCRIPC field and we storaage it in an internal
    table it _descripciones
    SELECT ZCODAMBIT ZDESCRIPC FROM ZJPAOCON
    FROM ZJPAOCON
    FOR ALL ENTRIES IN It_tablaZAMBITOS5
    WHERE ZCODAMBIT= it_tablaZambito5- ZAMBITO5
    2) field routine programe
    once we have have the decription , we complet the routine to populate ZDESAMBIT in ZJPROVCA DSO
    if ZAMBITO5 ENDS IN 0
    Read table it_descripciones where ZCODAMBIT= ZAMBITO5
    then ZDESAMBIT =  it_descripciones-ZDESCRIPC
    ELSE
    NEW  ZAMBITO5 = ZAMBITO5 changing last character by 0
    read table it_descripciones where ZCODAMBIT = NEW ZAMBITO5
    if zambito5 ends in 1
    then ZDESAMBIT=it_deScripciones-ZDESCRIPC + "OM"
    ELSE IF ZAMBITO5 ends in 2)
    then Zdesabit = it_descripciones = ZDESCRIPC + "MAT"
    END IF
    END IF
    EXAMPLE
    ZCODAMBIT = 11100
    ZDESCRIPC = BIZKAIA Este
    si   ZAMBITO5 = 11100  Entonces ZDESAMBIT = Bizkaia Este
    si   ZAMBITO5 = 11101  Entonces ZDESAMBIT = Bizkaia Este OM
    si   ZAMBITO5 = 11102  Entonces ZDESAMBIT = Bizkaia Este MAT

  • 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

  • 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

  • Contract Value Calulation based on Start & End Time

    Hello Friends,
    My client is into Vessel Hiring & the Vessels are given on hire for fixed period (with clear start & end dates & time). 
    For the above scenario we have a Periodic Contract to BIlling cycle which generates Invoices for every month. while creating the Contract we enter Basic Price as Day-Rate (Calculation type in Condition - O - Quantity - Daily Prices)
    Thus the system automatically calculates the Basic Price Condition value based on number of days in any month.
    Now the issue here is the client wants system to take Start & End time into consideration. In the Contract header - Contract Data tab we have developed two additional fields (Z-Fields) that capture start time & end time for every Contract.
    So, we want system to calculate the Basic Price Condition value based on the Contract start date + Contract Start time.
    Example :
    1. Contract start date - 25.03.2010 & Start time = 12:00 noon. Basic Price = Rs. 10,000 per day.
    2. In the Monthly Invoice, system would calcualte the Basic Price as Rs. 70,000 (7 days i.e. 25.03.2010 to 31.03.2010)
    But here the client wants system to consider Start Time & determine Value as Rs. 65,000 as the Contract started on 12:00 noon on 25.03.2010.
    Can anyone tell me how to achieve this?
    I guess we should develop some routine (in VOFM) & apply it in Pricing Procedures.
    But can some expert guide me on the logic of the routine & exactly where to apply the same in Pricing Procedure...
    Thanks,
    Jignesh Mehta

    Hi,
    Develop routine and make combination
    if start date is xyz  and start ime is less that 12 then price is so on so
    if date start date is xyz and satrt time is more that 12 then price is so on so.
    Hello I am not ABAPer, still tried to suggest you,don't mind for my suggestion
    Kapil

  • Is there a way to abort transformation from an Expert Routine?

    I need to abort processing on a load if a certian condition is hit.  I have figured out how to populate the monitor entries from the expert routine, but not how to halt execution.  The effect I'm looking for is the same as raising exception CX_RSROUT_ABORT in a start or end routine.
    Thanks,
    Scott

    I found  Note 1227667 - Guidelines for expert routine: Design rules which shows method CALL METHOD cl_rstran_expert_rout_srv=>send_message
    Unfortunalty you must be at Support package 18 or use note Note 1165167 - Message interface for expert routine to expose the feature.
    This can be used to send a message to the DTP monitor.  I have not been able to test it to see if it will actually abort or not.

  • Q: Where can I find example for expert routine

    Hi, Experts,
    I would like to use expert routine but I can't find any exmaple, especially on RECORDMODE setting.
    Can any body tell me the resource?
    Thanks a lot!
    Best Regards
    Yuedong

    Hi,
    The document doesn't help, it contains examples only for start/end routine.
    The reason I choose expert routine is to improve performance and implement some complex logics. The data seems correct in New data table(as I compared it with another update without using expert routine, they are exactly the same), but after it's activated, the result is completely wrong in active table. So I wonder whether RECORDMOE brings the problem (but even the RECORDMODE value is exactly same when I did the comparison, strange!)
    The transformation is used between DSO and DSO, supporting delta transfer.
    Thanks, Raj!
    B.R.
    Yuedong

  • Coding Help in Expert Routine

    Dear Guru's
    We have a Expert Routine to Fill Data from a ODS to CUBE.
    i am facing problem in selection of DTP, When i mention CALDAY as eg:01.03.2009 - 31.03.2009.
    i Dont get only MARCH data in Cube but all the complete Data which is in ODS . i mean my Expert Routine  does not recognise my selection.
    Here is the Code
        DATA:
        BEGIN OF ls_ztwr_o13comp,
          calday          TYPE     /bi0/oicalday,
          co_area         TYPE     /bi0/oico_area,
          /bic/zcostcent  TYPE     /bic/oizcostcent,
          UNIT            TYPE     /bi0/oiunit,
          /bic/zacthours  TYPE     /bic/oizacthours,
          /bic/ztarhours  TYPE     /bic/oiztarhours,
          /bic/zprodvity  TYPE     /bic/oizprodvity,
          /bic/zcumachrs  TYPE     /bic/oizcumachrs,
          /bic/zcumbuhrs  TYPE     /bic/oizcumbuhrs,
          /bic/zprodcum   TYPE      /bic/oizprodcum,
        END OF ls_ztwr_o13comp,
        lt_ztwr_o13comp   LIKE TABLE OF ls_ztwr_o13comp
          WITH KEY co_area /bic/zcostcent calday UNIT,
        lt_ztwr_o13comp1  LIKE TABLE OF ls_ztwr_o13comp
          WITH KEY co_area /bic/zcostcent calday UNIT,
          wa_year TYPE n LENGTH 4,
          wa_month TYPE n LENGTH 2,
          wa_calmonth TYPE n LENGTH 6.
    $$ begin of routine - insert your code only below this line        -
        ... "insert your code here
        SELECT *
          FROM /bic/aztwr_o1300(ods)
          INTO CORRESPONDING FIELDS OF ls_ztwr_o13comp.
          COLLECT ls_ztwr_o13comp INTO lt_ztwr_o13comp.
        ENDSELECT.
        CLEAR ls_ztwr_o13comp.
        LOOP AT lt_ztwr_o13comp
         INTO ls_ztwr_o13comp.
          IF ls_ztwr_o13comp-/bic/zcumachrs = 0.
            ls_ztwr_o13comp-/bic/zprodcum = 0.
          ELSE.
            ls_ztwr_o13comp-/bic/zprodcum = ls_ztwr_o13comp-/bic/zcumbuhrs /
            ls_ztwr_o13comp-/bic/zcumachrs * 100.
          ENDIF.
          CLEAR:
          ls_ztwr_o13comp-unit,
          ls_ztwr_o13comp-/bic/ztarhours,
          ls_ztwr_o13comp-/bic/zacthours,
          ls_ztwr_o13comp-/bic/zcumbuhrs,
          ls_ztwr_o13comp-/bic/zcumachrs,
          ls_ztwr_o13comp-/bic/zprodvity.
          APPEND ls_ztwr_o13comp TO lt_ztwr_o13comp1.
        ENDLOOP.
        CLEAR ls_ztwr_o13comp.
        LOOP AT lt_ztwr_o13comp1
         INTO ls_ztwr_o13comp.
          COLLECT ls_ztwr_o13comp INTO lt_ztwr_o13comp.
        ENDLOOP.
        CLEAR:
        ls_ztwr_o13comp,
        lt_ztwr_o13comp1.
        LOOP AT lt_ztwr_o13comp
         INTO ls_ztwr_o13comp.
          wa_year = ls_ztwr_o13comp-calday(4).
          wa_month = ls_ztwr_o13comp-calday+4(2).
          CONCATENATE wa_year wa_month INTO wa_calmonth.
          MOVE-CORRESPONDING ls_ztwr_o13comp TO RESULT_FIELDS.
          RESULT_FIELDS-calmonth = wa_calmonth.
          RESULT_FIELDS-calyear = wa_year.
          APPEND RESULT_FIELDS TO RESULT_PACKAGE.
        ENDLOOP.
    Can any one please tell me where i should change the code, So that i get data for only those month which is mentioned in my DTP.
    Thanks in adv,
    Dev

    Hi Srinivas,
    You are selecting data from your DSO and then processsing it and then appending it in RESULT_PACKAGE.
    Now the data which will be selected because of the filter in the DTP will be in the internal table SOURCE_PACKAGE.
    So you should base your select on the DSO for all entries in Source_package. This will ensure you process only those records which are selected with the filter.
    Regards,
    Mansi

  • ABAP Logic in Transformations-Start or Field Routine

    Hi Experts,
    As i am new to BW Please update me with the ABAP logic  i need to implement in Transformation routine...and please advise me wether i can use that as a Start or field routine for a better performance.
    Target DSO:
    DSO A : Active Table:/BIC/AZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID,ZOPAY_ID & ZCHG_DTE)
    Source DSO
    DSO B : Active Table:/BIC/BZDSOA
    (ZLOC,ZPAY_ID)
    DSO C : Active Table:/BIC/CZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID & ZCHG_DTE(date))
    While Transfering Data from DSO B-->DSO A
    It should check DSO C for that ZLOC & ZPAY_ID
    If ZCHG_DTE IS Blank then it should pick ZNPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZNPAY_ID in DSO A
    if ZCHG_DTE IS not Blank then it should pick ZPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZOPAY_ID & ZCHG_DTE in DSO A
    ZPAY_ID - Pay ID
    ZNPAY_ID -New Pay ID
    ZOPAY_ID -Old Pay ID
    ZCHG_DTE -Change Date
    ZLOC     -Location.
    Logic in words:
    If Change date is Blank then it should pick new pay id for that Location & Pay Id and update NEw pay id field in DSO A
    If Change date is not Blank then it should pick  pay id for that Location & Pay Id and update old pay id field  & change date in DSO A
    Please update me with releavent code
    Thanks

    It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.
    make sure your input date types are in the correct format for the FM.

  • Difference between "Binding Period" and "Validity Start/End" in Bid

    SRM Experts,
    1. We see 2 different things, "Binding Period" and "Validity Start/End" while preparing the bid. What is the differece between these?
    2. These fileds are non-editable for the bidder, while preparing the bid response. How bidder can give validity period for his quote (at header level)?
    3. We see that, the bidder can specify validity start/end date at condition level. Is it not possible to specifiy a validity of the quote at header level?
    GH

    case1: After expiration of  - binding period in RFx header:
    case2: After expiration of  - validity end period in RFx header:
    case3: After expiration of  - validity end period of RFx Response:
    I created seprate documents for each cases.
    I tried accepting the RFx response in all above 3 cases system did not give any error.
    I tried creating the PO against the RFx response in all above 3 cases system did not give any error.
    Is it correct behavior or is there any problem?
    GH

  • Event DRAW CHANGED for task TS90000016 not defined as start/end event

    Hello,
    i have created a workflow with one task, this task is of object type DRAW and the method is CHANGED. and i want to trigger this task when the status of a document changes to completed.
    Now when i change the status of a document to completed, the workflow is starting but then throwing an exception. Here is what i am getting, any ideas as to why ?
    Event DRAW CHANGED for task TS90000016 not defined as start/end event
    Event linkage with errors deactivated
    from the swel event trace i am getting the following:
    the receiver <task> started correctly,
    then i get the following:
    Receiver FM SWW_WI_CREATE_VIA_EVENT_IBF
    message: Event DRAW CHANGED for task TS90000016 not defined as start/end event
    any ideas as to why this is happening and how i can fix it ?
    regards to all the experts out there
    points are awarded.

    Hi,
       If you want the task to be executed without any agent intervention follow this:
    In the transaction PFTC_DIS OR PFTC_CHG  open your standard task and
              see whether you have checked the ' background processing' option in    
              execution category.
    It seems the "changed" method in Draw object is synchronous - so you
               dont need any terminating events.
       else
    check for the bindings in workflow and make sure you dont make any
             container with import parameter as mandatory.
       Hope this will solve the problem.
    Regards,
    Manikandan R

  • Sample source code for fields mapping in expert routine

    Hi All
    Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2
    same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be heighly appreciatble,it's an argent.
    regards
    eliaz

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • Special chs in DSO expert routine

    Hello All,
    Data is being pulled from Transfer order DSO to GR DSO. The transformation uses a expert routine which pulls a field 'Requisitiner' from another DSO i.e. Purchase DSO.
    This expert routine brings invalid characters i.e. the field value which is in small letters.
    If I delete the request in GR DSO, I cannot edit the PSA and get the correct data, because basically the incorrect entries are coming from the expert routine.
    The real problem occurs when I try to activate data in GR DSO. The activation fails because of the requisitioner field value is in small letters.
    Do I have to make changes in the expert routine? OR is there another way to solve this.
    The loads are delta loads and requests from last 3-4 days have been failing to activate.
    Kindly inform.
    Regards,
    NK

    hi,
    use the ABAP statement convert to Upper case, or you can change the settings for the target infoobject (check the lowercase letter) in the Dev and transport it to the target system.
    Check with the users to see if they are ok with seeing lower case letters in the report, if yes then transporting the info object is a better option.
    regards,
    Arvind.

  • Error Stack in Expert Routine, Infos about Object Log

    Hi all,
    currently I try to find some information about using the error stack in combination with an expert routine. So far I know that I have to use the Object Log, which is already in place in my code for monitor messages.
    LOOP AT itab_input INTO wa_input.
    IF sy-subrc <> 0.
            CLEAR msg.
            msg-msgid = 'MY_CLASS'.
            msg-msgty = 'E'.
            msg-msgno = '002'.
            msg-msgv1 = v1.
            msg-msgv2 = v2.
            msg-msgv3 = v3.
            APPEND msg TO t_msg.
            " ??? Write wa_input to error stack???
            CONTINUE.
          ENDIF.
    ENDLOOP.
    Does somebody know how I could append wa_input to the error stack? Or does somebody have a good documentation about Object log?
    Thanks a lot!
    Nita

    Good Morning,
    thanks a lot for your input. I tried to implement this function, but I do not know where I could get the Segment Id from.
    Do you know what i_use_crosstab is used for? I think i_with_message should be set to 'X' if I want to write wa_input-record it to the error stack.
    CALL METHOD log->verify_record
              EXPORTING
                i_use_crosstab  = ''
                i_segid         = lv_segid
                i_record        = wa_input-record
                i_with_message  = 'X'
              RECEIVING
                r_skip          = lv_skip
              EXCEPTIONS
                too_many_errors = 1
                not_in_crosstab = 2
                OTHERS          = 3.
    From semantic point of view the coding should do following:
    - To avoid a second loop in my expert routine it should only check the current src record. If this is wrong, which I already determine in my coding, it should write the record in the error stack. If it is correct, it should check whether there are already records with the same semantic key in the error stack and if yes, add it also to it.
    - I assume that I have to delete this record manually from my src. package than.
    Cheers
    Nita

Maybe you are looking for