Updating Cube in the End Routine based on the incoming Valid From Date

Hello Experts
Here is my scenario.
We are using BW 7.x.  There is DSO and from DSO it goes to the Cube, the promotions information.  These data targets will have Material (Article), Plant (Site), Promotions Number, Valid from and Valid to dates.  The Valid To date will come in as 12/31/9999 all the time.
If I receive a new record from ECC with same Material, Plat and Promotion combination again, I need to get the Valid From Date from the new record and Update the existing record' Valid To date in DSO/Cube as Valid From of the new record - 1.
So Valid To date of the existing record = New Record's Valid From date minus - 1.
I would like to do the update in "End Routine" of the Cube.
Would you please suggest if this can be done and if so would you please provide the sample code.
THANK YOU in Advance.
Nag.

yes, you can do this...
just use a RESULT_PACKAGE in end routine.
and using RESULT_PACKAGE fatch the existing records from DSO and append that into RESULT_PACKAGE after your desired changes,
just try to create a code using this l;ogic. if you can't then i will provide you a code.
Regards,
Ashish

Similar Messages

  • Using the end routine to populate the Cubes

    Hi BI Gurus,
    I am having following requirement:
    DSO: ZODS1  -
    > This DSO gets all the raw data from Source system.
    DSO:ZODS4   -
    >  Updates ZCUBE4
           ,ZODS5    -
    > Updates ZCUBE5
    there is no data flow between ZODS1 and  ZODS4
                                                     ZODS1  and  ZODS5
    I have added same new fields to ZODS1,ZCUBE4,ZCUBE5.
    So i want to populate fields of ZCUBE4,ZCUBE5.What is best possible way to do that without chaning ZODS4,ZODS5 structure?
    I am thinking to write an end routine ?Any idea if its possible?
    Also if possible can somebody sample code .
    Please help.

    Hi,
      U can populate ur new fields easily thorugh end routine in transformation ds04 to cube 4 ....
    Provided u can sufficient key in ds04 and which is the same key in ds01 to get the information of newly added fields in cube....
    please give ur fields and some sample data then it will be more clear ....
    but it can be achieved if u have necessary key fields in both dso's.
    Regards
    vamsi

  • HT1222 Hey , why always when i want to update my Ipad to ios 6.1.3 at the end tills me that the update was failed , its always please if you can help me and thank you

    Hey , why always when i want to update my Ipad to ios 6.1.3 at the end tills me that the update was failed , its always ,please if you can help me, and thank you.

    Try disabling your firewall and antivirus software and see if that helps - if you are trying to update using iTunes on your computer.

  • Manipulation done at the end routine

    Hi,
    I have huge volume of data records coming from the source and we have many many duplicate incoming records.
    There is a huge flow of data.
    Now my task to create error message for particular record in the end routine.
    I achieved with monitor_rec (RSTMONITOR).
    But the problem is that the error messages have to be unique but there are duplicate records coming via various data packages.
    For Ex, During first load error record (1234) comes with the first ( Data package 1) via 50,000 records and error message is set for the particular data record. Now again for the next data package ( Data package 2) the error record (1234) again comes along with 50,000 records and the error message gets duplicated. But this is not what client wants.
    So to solve the problem, i have to create a global internal table and it must exist until all of the data packages are processed.
    How can this be achieved? Where to declare it? if i do it in start routine will not be for every datapackage rather than one internal table for all of the data records? Also the second challenge is to identify how many data packages have been generated, so that by the end of the data package, i can sort the internal table and remove duplicate records from it and then publish the messages in the job log. Any idea gurus. Thanking you.
    Lakshminarasimhan.N

    Please make use of semantic group in DTP which will make sure that records with same key combination will come under same data package. 
    From your example, if you had set the field(which contains 1234) as semantic key in your dtp, then DTP load will make sure that all records with value 1234 comes in one data package. 
    Then create a Internal table in your end routine and append all error records in it.
    At the end of your endroutine, sort your internal table and delete adjacent duplicate entries. and then create error message.
    And you can't create global internal table for all the datapackages.  Start and end routine will be performed on each and every datapackage separately only.
    --- Thanks..

  • Get Old Value and the new value based on the date

    Hi
    I have a table called roster created below with following insert statements.
    CREATE TABLE ROSTER
    ROSTER_EMPLOYEE_DEF_ID NUMBER,
    EMPLOYEE_ID NUMBER,
    DEFINITION_REGION_CODE NUMBER,
    DEFINITION_DISTRICT_CODE NUMBER,
    DEFINITION_TERRITORY_CODE NUMBER,
    START_DATE DATE,
    END_DATE DATE
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (1,299,222,333,444,'1-JUN-2011','30-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (2,299,223,334,445,'1-JUL-2011','20-JUL-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (3,299,224,335,446,'1-AUG-2011','30-AUG-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (4,300,500,400,300,'1-JUN-2011','20-JUN-2011')
    INSERT INTO ROSTER
    (ROSTER_EMPLOYEE_DEF_ID,EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE)
    VALUES
    (5,300,501,401,301,'1-JUL-2011','20-JUL-2011')
    In the above table we have columns like
    EMPLOYEE_ID,DEFINITION_REGION_CODE,DEFINITION_DISTRICT_CODE,DEFINITION_TERRITORY_CODE,START_DATE,END_DATE
    The result i am looking from the above table is based on the EMPLOYEE_ID OF START_DATE AND END_DATE
    I need to get OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_CODE
    Similarly OLD_DEFINITION_REGION_CODE and the NEW_DEFINITION_REGION_CODE
    and OLD_DEFINITION_TERRITORY_CODE and the NEW_DEFINITION_TERRITORY_CODE
    I need to get one row of data for each employee saying old value and new value
    for employee 299 there are 3 records it must give the new record which is the latest date i.e start date 1-aug-2011 and end date 30-aug-2011 old record will be
    start date 1-jul-2011 and 20-jul-2011
    For the above table data i need to get the data as below
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_CODE OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE START_DATE END_DATE
    299 223 224 334 335 20-JUL-11 30-AUG-11
    300 500 501 400 401 20-JUN-11 20-JUL-11
    Please suggest me to get the above result based on the data. Please let me know if my posts are not clear
    Thanks
    Sudhir

    SELECT  EMPLOYEE_ID,
            OLD_DEFINITION_REGION_CODE,
            NEW_DEFINITION_REGION_CODE,
            OLD_DEFINITION_DISTRICT_CODE,
            NEW_DEFINITION_DISTRICT_CODE,
            OLD_DEFINITION_TERRITORY_CODE,
            NEW_DEFINITION_TERRITORY_CODE,
            START_DATE,
            END_DATE
      FROM  (
             SELECT  EMPLOYEE_ID,
                     ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE DESC) RN,
                     LAG(DEFINITION_REGION_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_REGION_CODE,
                     DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE,
                     LAG(DEFINITION_DISTRICT_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_DISTRICT_CODE,
                     DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE,
                     LAG(DEFINITION_TERRITORY_CODE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) OLD_DEFINITION_TERRITORY_CODE,
                     DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE,
                     LAG(END_DATE) OVER(PARTITION BY EMPLOYEE_ID ORDER BY START_DATE) START_DATE,
                     END_DATE
               FROM  ROSTER
      WHERE RN = 1
    EMPLOYEE_ID OLD_DEFINITION_REGION_CODE NEW_DEFINITION_REGION_CODE OLD_DEFINITION_DISTRICT_CODE NEW_DEFINITION_DISTRICT_CODE OLD_DEFINITION_TERRITORY_CODE NEW_DEFINITION_TERRITORY_CODE START_DAT END_DATE
            299                        223                        224                          334                          335                           445                           446 20-JUL-11 30-AUG-11
            300                        500                        501                          400                          401                           300                           301 20-JUN-11 20-JUL-11
    SQL>  SY.

  • I need help installing my adobe premiere element 13. the soft ware is 3.5 GB and I have a 654.4GB space is this enought space to dowload the software. It appears the software is downloading , but when it gets to the end it gives me the error summary messa

    I need help installing my adobe premiere element 13. the soft ware is 3.5 GB and I have a 654.4GB space is this enought space to dowload the software. It appears the software is downloading , but when it gets to the end it gives me the error summary message. I have been on the phone for hours being transfered from from person to the next with no results.

    reesep
    This is not Adobe. Rather user to user. The Adobe Staff and PRE_help presence in this forum is undefined.
    The replies from here are not instantaneous. But, your fellow users all try to respond as timely as possible.
    What is your computer operating system?
    From where are you downloading Premiere Elements 13....direct from Adobe as the tryout or the purchased product? If the purchased product, do you now have a purchased serial number to go with the installation files?
    Where are you stopped in the installation....at the Sign In or before? Is the faulting module cited in any messages? What are the error messages?
    The usual questions:
    1. Are you working with the antivirus and firewall(s) disabled?
    2. Are you running the computer programs as administrator?
    3. Are you working with a pen and tablet device instead of mouse?
    4. Is your video card/graphics card up to date according to the web site of the manufacturer of the card?
    5. Are you installing the program to the default location on the Local Disc C (if Windows).
    Let us start here and then decide what next based on the details that you post. Subsequent troubleshooting may include:
    deletion of the Adobe Premiere Elements Prefs file and/or uninstall, free ccleaner run through, reinstall with antivirus and firewall(s) disabled.
    Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • SAP Standard report to view the asset balance- Based on the calender year

    Hi ALL
    Any sap standard programs are available to view the asset balance based on the calendar year not for the fiscal year. 
    Asset balance report S_ALR_87011964 will display based on the fiscal year in report date. For example I want to view the September month asset balance, Any standard report to view the calendar year wise output.
    Regards
    K.Gunasekar

    Dear Gunasekar,
    in Asset balance report S_ALR_87011964 you can view also a calendar year, you can enter every Reporting date in the progrm.
    In RABEWG_ALV01 you can enter also a Capitalization date "from to". I think this is what you want.
    regars Bernhard

  • When saving a file in [.jpg] format, i am asked to choose a quality from 1 to 100. what changes in the file created based on the quality parameter chosen?

    when saving a file in [.jpg] format, i am asked to choose a quality from 1 to 100. what changes in the file created based on the quality parameter chosen?. i would like to know what changes, so in the future i can set my camera to a setting that will give me the highest quality to begin with,allowing me to make crops and still preserve the quality.
    thank you
    dovid

    It's the level of compression. Lower number, more aggressive compression, more visual artifacts.
    Aside from that you should never use jpeg as a working format. The compression is destructive and cumulative, and the file deteriorates every time you resave it.
    Use TIFF or PSD, and if you need jpeg save out a copy as a single final step.

  • What is the  FM/BAPI  to get the Goods Receipt  Based on the Purchase Order

    Hi ,
    I want FM/BPI  to get the Goods Receipt  Based on the Purchase Order in MM.
    Thnx in advance

    Hi
    BAPI_GOODSMVT_CREATE
    Thanks & Regards
    Kishore

  • Can't seem to download any app despite entering the correct password and answering 3 security question but still in the end it comes up the message that my session has timed out no matter what! Please help, many thanks in adv!!

    Can't seem to download any app despite entering the correct password and answering 3 security question but still in the end it comes up the message that my session has timed out no matter what! Please help, many thanks in adv!!

    Try doing it on your computer with iTunes and then sync to your iPad to see if it clears the problem.

  • Calculate Avg  for the given months based on the no. of days in months

    Dear Experts
    I  have a report in which there is a characterictic claenderyr/month.The Input paramter is claenderyr/month which is restricted by a variable of type interval. i mean user will enter calenderyr/month as interval say 012010 to 06.2010. Now I have to calculate Avg sale Qty for the given months based on the no. of days for the given range of months. How I can achieve this in BW Query. Pl. advice
    Dinesh Sharma

    Hi,
    Create formula for the sales qty.
    maintain the exception aggregation as average based on calday
    Best Regards,
    M.H.REDDY

  • TS1702 In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    Does this occur in all of your Pages documents? Are you certain that you haven't formatted the type to run flush right? (Align right I mean - sorry old typographer lingo). Look at the ruler at the top and check the Align setting.
    Have you tried quitting Pages completely and the restart the iPad?
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • How to determine the hardware requirements based on the Services' payload

    hello,Guys
    i am wondering if i can calculate the hardware requirements based on the services' payload ?
    what factors should i consider when to determine the hardware requirements?
    is there any documents related to my questions? ;)
    Thanks
    Regards
    Wen

    Payload size is not the only factor while determining size of the system (h/w). You need to consider number of services, nature of services (sync/async), payload size, frequency of messages (load), peak load value, security constraints, performance requirements etc..
    You may contact your local Oracle Sales Representative/ Oracle Support to get help in determining size of the system. They will provide you a sizing questionarre and on the basis of that they may suggest sizing as well (Oracle has an internal tool for proposing sizing)
    Regards,
    Anuj

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • Generating the RM requirement based on the work order?

    Does Oracle Disceret MFG has the provision of generating the RM requirement based on the work order?

    Hi,
    If you mean RM requisition as Material indent from Stores , then Yes, Component Pick Slip is the form
    Regards
    S

Maybe you are looking for

  • HELP! [project won't open on different computer]

    I finish a project and saved it in my hard disk. And now, I am trying to open it on another computer but it can't be opened and it state that it's damaged or something. What should I do?

  • How do I wipe a Mac book pro clean?

    I'm going to give my Mac Book Pro to my granddaughter. What's the best way to remove all of my files, and to put into "new-like" condition? I know that I should also de-authorize from my iTunes accounts, Any thing else? Thanks in advance Ed

  • Can't Sync Photos To My Ipod!!!

    I HAVE A 30 GB IPOD AND WHEN I SYNC MUSIC ON TO MY IPOD IT LETS ME...BUT IT WON'T LET ME SYNC ANY MORE PHOTOS ON TO IT. I KNOW I HAVE A BUNCH OF SPACE LEFT ON MY IPOD SO THATS NOT THE PROBLEM BUT I GUESS THIS ERROR POP-UP " THE IPOD "IPOD" CANNOT BE

  • Unable to see pictures in picture folder

    Can see via explore but when new pictures are added they are not visible in picture folder - only advice seems to be reboot!!

  • Why does my iPhone only ring once?

    Why does my iPhone only ring once or not at all on incoming calls?