BW 3.5 Start Routine Start Routine Code

Hi,
I am writing a Start Routine in BW 3.5 and the logic we have seems to be working but not updating the target ods. We are adding a date field to the target ODS and need to source it from another ODS.  The key structures for each ods is different
Taget ODS:
Header
Line ITem
Schedule Line
Source ODS:
Header
Line Item
When we run the start routine the date field will not update for the schedule lines, it will create a new record in the target ods with the Header Line ITem and Date.
Has anyone had to code this logic before in a 3.5 Start Routine, where you needed to update a date field with ODS with different key strucutures.
Thanks for any help on this issue.

Its difficult in BW 3.5 to include this logic in START_ROUTINE as you cannot add the extra to_date field to the DATA_PACKAGE table.
You need to create a new global internal table with the same structure of DATA_PACKAGE with additional field to_date. then use the logic to fill in the global internal table
define a internal table new_data_package with the required structure like (docno, eventtype, fromdate todate)
data: l_w_datapkg_001 type data_package,
data: l_w_newdatapkg type new_data_package,
data: l_w_datapkg_011 type data_package
LOOP AT DATA_PACKAGE INTO l_w_datapkg_001 WHERE event_type = '001'.
l_w_newdatapkg-docno = l_w_datapkg_001-docno.
l_w_newdatapkg-event_type = l_w_datapkg_001-event_type.
l_w_newdatapkg-fromdate = l_w_datapkg_001-date.
MOVE CORRESPONDING FIELDS OF l_w_datapkg_001 INTO l_w_newdatapkg.
READ TABLE data_package INTO l_w_datapkg_011
WITH KEY docno = l_w_datapkg_001-docno
                 event_type = '011'.
l_w_newdatapkg-to_date = l_w_datapkg_011-date.
APPEND l_w_newdatapkg TO new_data_package          
ENDLOOP.
Now the new datapackage contains the ODS2 data that u needed

Similar Messages

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

  • How to delete data from a DSO using start or end routine

    Is it possible to delete records from a DSO in the start or end routine.
    My example:  I have order 123, item 10, sched line 1.  This gets loaded into the DSO.
    Next day I have order 123, item 10, sched line 2 coming in.
    I want to delete the first one (with sched line 1) from the DSO and load the second one (with sched line 2).
    Can code be put in the start or end routine to do this?

    unless I can do it within the start routine I don't want to have to create new records.
    In the start routine I am comparing records coming in with what are already in the DSO.  If there is a match on order and item and the sched line is different, then I want to delete the record from the DSO and load the new one.  Is there code that I can put in a start routine to accomplish this?

  • What are start and end routines in BI 7.0..

    Hi,
    Can you please explain and give me a sample code ?
    thanks

    Hi,
    depending on your data flow you have to use the routines .
    Start routines - start routines:
    It is used to perform preliminary calculations.if you have any modifications required before the actual transformation is done, then you must write those routines in the start routine of 7.0.
    End routines - new:
    You can use an end routine to postprocess data after transformation on a package-by-package basis.
    Expert routine - update routine :
    You can use the expert routine if there are not sufficient functions to perform a transformation. The expert routine should be used as an interim solution until the necessary functions are available in the standard routine. You can use this to program the transformation yourself without using the available rule types. If you have already created transformation rules, the system deletes them once you have created an expert routine.
    Also Check the below link for detail info.
    Routine in Transformation.
    Reg
    Pra

  • Is difference between update routine,start routine and transfer routine

    Hi All,
    What is difference between transfer routine and update routine.

    Hi Venkat,
    Routine is a set of ABAP code which is used to select a record or transform the field value at the time of loading the data.
    Types of routines:
    Tranfer Routines in Transfer Rules:
    Start Routines in Transfer Rules:
    Update Routines in Update Rules:
    Start Routines in Update Rules:
    Transfer/Update routine:
    It's the set of ABAP code used in Transfer/Update rules. Transfer/Update routine is used to change the value of a particular field/object at the time of loading data.
    Ex: Populate the amount/discount field by using Price and Quantity based on the given conditions.
    Start Routine:
    Start routine can be used in both Transfer Rules and Update Rules. Start routine is used to determine whether to load a particular record or not.
    Ex: From the data related to the year 2005, we can select only the records which belong to a particular month or fiscal period.
    Ultimately Transfer/Update routines are to update the value of a particular field. Start routines are used to select entire record.
    You can get more details about routines at :
    Routines
    ROUTINES
    Routines and Examples
    Start Routines
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/60cecb1d-0a01-0010-8289-b14fd99062fa
    take a look this doc for abap used in bw
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4493c4a6-0301-0010-62a2-efd6ded61e04
    ABAP book that always mentioned :
    http://cma.zdnet.com/book/abap/
    assign points if useful ***
    Regards
    CSM Reddy

  • Diff between Start ,transfer,update routines

    hi
    Plz tell me what is the difference between Start routine,transfer routine and update routine. Send me some real time examples.I would be very glad.
    Regards
    Ajay

    Hi!
    it is simple all of them are small program used in ETL process while loading in to BW.
        <b>Start routine:-</b> is used in Transfer rules and update rules, this abap code is  executed before starting the load and used in scenarios where we want to perform some operations on all the data example deleting some records before processing records in Update rules or transfer rules.
    <b>Update routine:-</b> abap code used in update rules to transform or finding some field. ex:- may be you want to retrieve the field data from some data base tables based on the other data present in the infosource
    <b>Transfer Routine:-</b> similar to the update routine but used in transfer rules.
    with regards
    ashwin
    <i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN.  you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>

  • Update Routine & Start Routine in BI 7.0

    Hi Experts,
    We have recently upgraded from BI 7.0 , I am confused about where to write start routine & update routine in transformations of BI 7.0?
    Please mention any pointers?
    Thanks.
    Sharat.

    Hi
    When you open the start routine you will see a routines info which gives you help on this.
    A summary would be:
    Update routine in transformation.
    RESULT = source_field-material.
    Basically you can acess the value of the record by using source_field.
    Start routine.
    The data comes in the form of an internal table with name SOURCE_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT SOURCE_PACKAGE assigning <source_fields>.
    ENDLOOP.
    End routine(This is a new feature in BI 7.0 where you can modify data when transformations are complete and before data is updated to info-providers)
    The data comes in the form of an internal table with name RESULT_PACKAGE.
    You can access the values by looping into a work area.
    LOOP AT RESULT_PACKAGE assigning <result_fields>.
    ENDLOOP.
    Hope this helps you to understand the basics of the abap used in the transformations .
    Regards
    Samarpita

  • When I connect my new iPad2 to PC and start syncronising the routine stops at point 2 backup what can I do - Moreno Italy

    When I connect my new iPad2 to PC and start syncronising, the routine stops at point 2 during the backup. What can I do ?
    Moreno Italy

    Couple of things you can try.
    Make sure your windows firewall and anivirus are turned off. 
    Second, think about what apps you may have loaded.  In prior posts really long or interrupted back ups were tied to apps that had an unusually large or messed up data content.  Like comic book or magazine readers.  Somme of those apps just do not work great in the backup world.
    If the pad is new, and you do not have a lot of stuff on it, you can skip,the backup step entirely by clicking the little x in the process window in i tunes.  Before you start the process, though, make sure up have transferred your purchases to i tunes. ( i tunes, at the top, under the file drop down), and import any pictures into iphoto, or whatever photo library you are using.  Then start the process.  When it gets to the backup set, click the x, and the pad will go on and sync.
    When i had the same problem, deleting the suspected bad app, and a successful sync without backup cured it.

  • 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

  • Getting Error In the Routine - While writing Code for the Cross Reference.

    Hi,
    Getting Error In the Start Routine - While writing Code for the Cross Reference from the Text table ( /BIC/TZMDES with Fields /BIC/ZMDES(Key),TXTSH ) Getting Error as [ E:Field "ZMDES" unknown ].
    Transformation : IOBJ ZPRJ3(Source) -> IOBJ ZPRJC ( Target ).
    The Source  Fields are: 0logsys(Key),zprj3(Key),ZDOM3.
    The Target Fields are : 0logsys(Key),zprjc(Key),ZDOM3, UID.
    Here i am trying to Update the target Field UID by Comparing the Source Field [ zprj3(Key)] with the Text table ( /BIC/TZMDES ) and update the UID.
    The Code is as below:
    Global Declarations in the Start Routine:
    Types: begin of itabtype,
            ZMDES type /BIC/TZMDES-/BIC/ZMDES,
            TXT type /BIC/TZMDES-TXTSH,
             end of itabtype.
    data : itab type standard table of itabtype
    with key ZMDES,
    wa_itab like line of itab.
    Routine Code :
    select * from /BIC/TZMDES into corresponding fields of table itab for
    all entries in SOURCE_PACKAGE
    where ZMDES = SOURCE_PACKAGE-/BIC/ZPRJ3.
    READ TABLE itab INTO wa_itab
    WITH KEY ZMDES = SOURCE_PACKAGE-/BIC/ZPRJ3
    BINARY SEARCH.
    IF SY-SUBRC = 0.
    RESULT = wa_itab.
    CLEAR wa_itab.
    The tys_SC_1 structure is :
    BEGIN OF tys_SC_1,
         InfoObject: 0LOGSYS.
            LOGSYS           TYPE RSDLOGSYS,
         InfoObject: ZPRJ3.
            /BIC/ZPRJ3           TYPE /BIC/OIZPRJ3,
         InfoObject: ZDOM3.
            /BIC/ZDOM3           TYPE /BIC/OIZDOM3,
         Field: RECORD.
            RECORD           TYPE RSARECORD,
          END   OF tys_SC_1.
        TYPES:
          tyt_SC_1        TYPE STANDARD TABLE OF tys_SC_1
                            WITH NON-UNIQUE DEFAULT KEY.
    Please suggest with your valuable inputs.
    Thanks in Advance

    I have split the code in two.. one for start routine.. other for field routine.. hope this helps
    Types: begin of itabtype,
    ZMDES type /BIC/TZMDES-/BIC/ZMDES,
    TXT type /BIC/TZMDES-TXTSH,
    end of itabtype.
    data : itab type standard table of itabtype
    with key ZMDES,
    wa_itab like line of itab.
    Start routine
    select * from /BIC/TZMDES into corresponding fields of table itab for
    all entries in SOURCE_PACKAGE
    where ZMDES = SOURCE_PACKAGE-/BIC/ZPRJ3.
    Sort itab.
    field routine
    CLEAR wa_itab.
    READ TABLE itab INTO wa_itab
    WITH KEY ZMDES = SOURCE_FIELD-/BIC/ZPRJ3
    BINARY SEARCH.
    IF SY-SUBRC = 0.
    RESULT = wa_itab-<field name>

  • I am facing problem in starting ShellHWDetection service Error code 1075,please help

    I am facing problem in starting ShellHWDetection service Error code 1075,please help

    Shellhwdetection is a Windows service which stands for Shell Hardware Detection Service.
    It provides notifications for AutoPlay hardware events.
    System error code 1075 means "The dependency service does not exist or has been marked for deletion."
    Please run services.msc, then find Shell Hardware Detection Service, view its dependencies
    Make sure the three services are set to running "automatic" in Services.
    If this doesn't help, then run sfc to check if there're some missing or corrupted files in system.
    Yolanda Zhu
    TechNet Community Support

  • System error in routine FI_TAX_CHK_PRICING_DATA error code 13

    hi
    i m new in sap.when i try posting in gl i got the following error messege
    system error in routine FI_TAX_CHK_PRICING_DATA error code 13 function builder tax2
    can some one help me out

    go to ox02 company code and mention your country.just go to company code data and put ur county there.

  • System error in routine FI_TAX_GET_TXJCD_LEVELS error code 2 function build

    I am getting error "System error in routine FI_TAX_GET_TXJCD_LEVELS error code 2 function build" when I am doing release to accounting throught VF02 this error I am getting.Out client is USA client.TAX is picking up from the Veterx interface.Can anybody help regarding this.I checked the Tax prodeuure and also the tax classification everything is assigned properly.

    Good Evening,
    The reason why you are getting an error when passing the document to
    accounting is because your ship-to partner does not have a jurisdiction
    code. The error is correctly triggered since the jurisdiction code is
    required when shipping to a jurisdictional country. You can't
    post this transaction without a jurisdiction code.
    If you maintain a tax jurisdiction code on the customer master,
    cancel the invoice and rebill, the document should pass to accounting.
    The tax jurisdiction code is maintained on the address data screen.
    Please check if there is a jurisdiction code maintained in
    the customer master data. If that is not the case, check, if the
    tax pricing procedure for the country of the customer is set relevant
    for jurisdiction code. If the country of the customer is relevant
    (entry for pricing procedure) and the customer master has no jur. code
    maintained, the error tells exactly that situation. Then, either the co
    should be set to not relevant for TXJCD or the customer should get
    that customising entry.
    Please be aware that if shipping from the US to a non juristiction
    country the system should take a dummy jurisdiction code from the OBCL
    transaction.
    If you have access to OSS notes then please see:
    400766 Changes in accounting interface for Rel
    112609 How are tax codes transferred to condit
    I hope this helps!
    Kind Regards,
    Martina McElwain
    SD Forum Moderator

  • System error in routine FI_TAX_CHK_PRICING_DATA error code 13 function buil

    Hi I am posting an entry to a gl account and i got an error like
    System error in routine FI_TAX_CHK_PRICING_DATA error code 13 function builder TAX2
    Message no. FF769
    I went to assign tax jurisdiction code in OBBG and assigned "TAXIN"  to country india but still got the same error...can any one plese help me out in this

    Hi,
    Please check in OBY6, that your company code is having a country.
    If not, then you need to check program LTAX2F01 (FORM DETERMINE_KALSM_FROM_BUKRS) in debug mode with your ABAPer help.
    Regards,
    Gaurav

  • Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same

    Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same and is there any pre stalled text editor on mac if yes then where and if no then which text editor to install and how to install gcc...please help me out thanks in advance !!!

    I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding.
    Why? If you are developing and writing code on a Mac why would you not use the tools Apple has given you? And Xcode, once you get use to it, is a very nice development environment that will make you life a whole lot easier.
    If you insist on using an editor and the terminal I would recommend  Emacs   but it has a long learning curve so  something like TextWrangler  will work too.
    As for the compiler if you have Xcode installed install the command line tools and you will be able to compile from the terminal.
    good luck

  • How Can I Start And Start And DebugTomcad in Jdeveloper12C

    Hi
    How Can I Start And Start And Debug Tomcad Application Server in Jdeveloper12C.

    I'm not sure if this extension will work in 12c - but you can download the code and try and upgrade it to 12c - https://blogs.oracle.com/shay/entry/tomcat_extensions_for_jdevelop_1
    You can also just add command line short-cuts to start Tomcat to the tools->External tools option in Jdeveloper.

Maybe you are looking for

  • Data not getting displayed in query

    Hi I have master infoobject with keyfigure units as percentage, and data is loaded and working fine. data is not getting displayed in query, i am getting the error message, that exception aggregation has to be maintained for 0calday. how do i resolve

  • Is there an hp wireless printer that uses 21 & 22 ink?

    I have an old hp printer and want to purchase a wireless. I have ink for the old printer can I use on a new hp wireless printer?

  • Binary form of string

    Hi All, I have written a small program which prints the addresses of the line. But, I don't know how to get the binary form of the string. How the binary form of a string? Will it be 0s and 1s or someother format? How to get the binary form of a stri

  • Are there companies who will create a soundtrack for our corporate project

    Does anyone know of a company or individual who can create an underlying soundtrack for our corporate training video? It's about 30 minutes long.

  • Save for Web and Devices (Illustrator style?)

    Ive used the slice tool to mark out the images for exporting from my Fireworks document. Does Fireworks have a 'Save for Web and Devices' feature like Illustrator does? I want to have the 4-up display where you can see the original image and file siz