*Query needs The Delta changeed records from Change log table*

Hello Friends,
I got an requirement where they want to see the current data and also the changes that happened last week. For e.g.
Sales Order 1       100 Qty      Nov 1 2009
sales Order 1         50 Qty      Oct 25 2009
as you can see, they want to see these both records in the query. I am running out of ideas , on how to establish this scenario. Can we some how report directly on the changelog table where it maintains all the delta changes.....
Appreciate your answers........ Thanks for your time......

Hi,
you can do the following:
to find last week
Create a Customer Variable for Calday
EXIT_SAPLRSOO_001 ---> Include ZXRSRUO1 write the code for the variable created above
DATA : date TYPE sy-datum.
date = sy-datum. "Today
date+6(2) = '01'. "First day of this month
date = date - 7. "Previous week before first day of this month = last week of last month
Current week take the system Date ( with give the current week)
                             OR (more options)
Some function modules you can use in exits are
DATE_GET_WEEK - Will return a week that the day is in. ( Current week)
DATE_GET_WEEK -1 will returne the previous week of the day is ( previous week)
Santosh

Similar Messages

  • Need suggestion to get data from change log table of ODS.

    Hello,
    There is a case where i am loading opportunity header data from header ODS and opportunity item data from item ODS in the opportunity cube.
    Status (1= OPEN, 2= WON ETC) of the opportunity are available only in header ODS and not in item ODS.
    While loading data from header ODS to cube, I am loading it directly but while loading data from item ODS to cube i am using active data table of header ODS as a lookup in the update rule from item ODS to cube. I am selecting status from the active data table of header ODS while loading data from item ODS to cube.
    Since active data table will have only after image records, there is some data mismatch in the report as i am selecting data from active data table of header ODS while loading data from item ODS to cube.
    I need to select data from Change log in order to get before image also instead of active data table in order to overcome this issue. Is there any way by which i can do selection from Change log instead of active data table as change logs are generated at run time.
    Please let me know if you have any suggestions.
    Regards,
    Sanjay Chaurasia.

    Hi,
    You can use the changelog table of the DSO.
    Right click manage the Header DSO, go to the contents tab and click Change Log table. There you can see the technical name of the Change Log table.
    In the update rule Routine, give the tech name of Change log table instead of Active table name.
    Hope it helps.
    Krishna

  • Deletion of data from change log table and PSA

    Hi,
    For a DSO  I want to delete data from "Chnage log table"  and " PSA Tabel".
    For the DSO manage screen I have seen " Environment-> " Delete changelog table" from this we can delete chnage log table data as per my understanding.
    at PSA Level Mange screen also I have seen " Environment-> " Delete changelog table" from this option also it deletes the data from change log table or it deletes data from PSA table?.
    if this option also deletes data from changelog table then how we can delete data from PSA table?
    Please clarify me

    Hi,
      I am not sure what are you referring to from your point "PSA Level Mange screen also I have seen " Environment-> " Delete changelog table". When ever you click on manage for your psa you will be routed to a popup where you can see all your requests in the PSA table & there after if you click on any single request you will get Environment menu option but there wotn be any change log deletion option available. Please check again? Right clicking on your data source will take you to the manage requests for PSA. You can selectively delete the requests as required.
    For DSO when you right click on manage you can directly find Delete change log data option in the Environment tab. there you can select the requests you want to delete.
    Also if you want to automate the deletion process then you can simply create a chain and include the steps for PSA deletion & change Log deletion accordingly.
    Also it is recommended to keep on clearing the PSA table & Chage log data at regular intervals as it saves the disk space & thus helping in performance optimization
    Please refer the below doc at SDN, it will be helpful for you in automating the process of change log deletion & PSA deletion.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02ba9e7-bb6f-2c10-09b4-e86b9fcbad41?QuickLink=index&overridelayout=true
    Hope it clears your doubts
    Thanks

  • Help needed to get unique record from an internal table

    Hi Everybody,
    I have to get unique record from an internal table. i know we can use read statement with key condition .
    But the problem is i have to use some relational operators like GE or LE.
    eg
    read table itab into wa with key width GE itab-widthfrom
                                                       width LE itab-widthto
                                                       machno eq itab-machno.
    Its giving me error when I use the operators GE , LE.( I think since it can't find a unique record with those relational
    operators in the with key statement)
    Is there any other way to get unique record from internal table without using the loop?
    Thanks,
    Sunny

    Using the read statement you will need some kind of loop. For example.
    DO.
    READ TABLE......
      WITH KEY ......
                        READ = SPACE
    IF SY-SUBRC EQ 0
      TABLE-READ = 'X'.
      MODIFY TABLE
      ADD 1 TO W_FOUND.
    ELSE
      EXIT.
    ENDIF
    ENDDO.
    IF W_FOUND EQ 1.
    ...record is unique.
    ENDIF.

  • Open Hub fetching data from Change log table

    Hi Gurus,
    I have a scenario where in I have an Open Hub destination whose source is a DSO, and we are sending data into SAP Data services. We found that the data being sent is from the change log table. Is this how an Open Hub with DSO as a source works ? Or is there any possible way we can send data from the Active table of the DSO, when the DTP is run.
    Kindly help. Thanks in advance !
    Regards
    Snehith

    Hi,
    For Extraction from the DataStore Object, we have the following options for Delta init Extraction:
    Active Table (with Archive)
    The data is read from the active table and from the archive or from a near-line storage if one exists. You can choose this option even if there is no active data archiving process yet for the DataStore object.
    Active Table (Without Archive)
    The data is only read from the active table. If there is data in the archive or in a near-line storage at the time of extraction, this data is not extracted.
    Change Log
    The data is read from the change log of the DataStore object
    We can select any of these options for data trasnfer.
    Regards,
    Geetanjali

  • Where to see the images other than change log table

    Dear all,
                   How to view images for extraction's (example Generic )  in  DSO without using Change log table.
    With Regards,
    Baskaran

    Hi,
    There is no other option other than change log table to view the images.
    in PSA..we will get only raw data..i.e...its non other than the data how its posted in source sytem.we can say..this is only copy of source sytem data.
    after PSA,if the datasource is DELTA enabled(which can sustain NEW or CHANGED records-here only we get concept of IMAGES),we have to load this data only to DSO.from there after activation of the data,the data can be updated to further data targets only from CHANGE LOG table which can maintain images.
    Even further targets are also DSOs,we will have to load from this DSO only.so we can see images only in change log table.
    hope this is clear for you.
    Regards
    Ramsunder

  • Can we delete the change log table of ods?

    hi bw gurus,
    can we delete the newdata,active and change log table of ods?how?what is the advantage?
           OR
    can we delete the contents of new,active,change log table of ods?how?what is the advantag?
    thanks in advance
    srinivas

    Hi Srinivas
    Yes, You can delete the contents of changle log table but not the contents of new data and active data table.
    Before deleting the change log data you have to make sure that the requests are not required for further delta extraction or for reconstruction purpose.
    Steps
    1. Goto Manage screen of your ods
    2. Click on Environment tab and select the option " Delete change log data".
    Adv:
    To free up the disk space.
    Assign points if it is useful for u.
    Regards
    Saddy

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • Store the vital info from the absence quota record in an internal table

    Hi experts,
    I want to detrmine if the Absence record’s (PA2001 rec) deduction from date (PA2001-BEGDA) and absence to date (PA2001-ENDDA) are permissible for the validity period of the Absence Quota record (the PA2006 rec).  If the quota’s deduction from date, PA2006-DESTA, is greater than the PA2001-BEGDA, we then need to identify this absence quota record for change and change the deduction from date, PA2006-DESTA, to be the same as PA2001-BEGDA.  Store the vital info from the absence quota record in an internal table and record the new date that the deduction from date that needs to be changed to.  The changes will be made via a BDC session.
    Please help me out...
    Thanks,
    Vicky

    This looks possible if we code it in 'dynamic action' table, but the BDC may not read it during run time.
    Do you still have this issue?
    Thanks
    Narasimha

  • How to remove the duplicate HR record from per_all_people_f table

    Because of some mistake user has created two records for one employee one with start date 4th may 2010 and end date with 1st may 2011 and another with start date with 2nd may 2011 and end date is 31st of dec 2012.
    When I go to enter and maintain employee i found the record which starts with 4th may 2010 and end date with 1st may 2011.
    Please let me know how to remove the end date from this record.
    when I ran the query
    select * from PER_ALL_PEOPLE_F PAPF where upper(first_name)='UDAYA';
    i have first four column for this type.I want to remove the first row from here
    41246     02-MAY-11     31-DEC-12     81     1125
    41246     04-MAY-10     01-MAY-11     81     1125
    Please help.
    Regards,
    Prakash

    Okay, so you wish to just have one person record from the 4th May 2010 through to the 31st December 4712, right?
    In that case, do this:
    1) Query the person in the Enter & Maintain person form
    2) Hit Delete on the toolbar
    3) Select "Delete Next Change" from the date-track mode and save
    4) Re-query
    Now the date-track update from 2nd May is gone.

  • How to get the Change Log Table name of the ODS from the system table

    Hi,
    I have a list of ODSs in the system and I am interested in finding the corresponding Change Log Table and the number of records in that table.
    Can any one please tell me the name of the system table where this information is stored.
    I dont want to get in this information manully (from the Contents tab of the ODS maintenane).
    Regards,
    Harikiran Gunnala

    Hi
    Go to SE16
    Give the table name as "RSTSODS".
    For User application field give CHANGELOG as input
    and execute. You will get all the list of Changelog tables Along with below mentioned data
    PSA
    Version
    To
    Valid from
    Object Status
    Technical ODS name
    Program Name
    Maint  Program
    Object Name
    Last changed by
    UTC Time Stamp in Short Form
    Partition number
    Regards
    Raj

  • Deleting records from a recursive table query

    Hi All,
    I have the follow query, I would like to ask for your help, please: we use recursive tables for various purposes and one of them may have 100,000's records.
    What would be the best approach to delete records from such a table?
    I was thinking about two below, but any additional one will be more than welcome as well:
    (1) I can DELETE FROM my_table WHERE my_table_id IN (SELECT my_table_id FROM my_table START WITH my_table_parent_id = X CONNECT BY PRIOR my_table_id = my_table_parent_id, but it means that I will run on my_table twice, no?
    (2) I thought also to create a Foreign Key of my_table_id REFERENCES my_table_parent_id, but then I am afraid it will effect DML commands on that table.
    Thank you in advance

    Hi,
    kdwolf wrote:
    ... (1) I can DELETE FROM my_table WHERE my_table_id IN (SELECT my_table_id FROM my_table START WITH my_table_parent_id = X CONNECT BY PRIOR my_table_id = my_table_parent_id, but it means that I will run on my_table twice, no?Sorry, I'm not sure whqt you mean by "I will run on my_table twice". Assuming you don't already have a foreign key constraint (as you described below) I don;t know any other way, let alone a more efficient way, to get the same results.
    (2) I thought also to create a Foreign Key of my_table_id REFERENCES my_table_parent_id, but then I am afraid it will effect DML commands on that table.You're right; a foreign key constraint always costs a little whenever you do DML. Someone who knows your application and your system as well as you do will have to decide if the benefit of having accurate, consistent data justifies that additional cost. If you're not sure, I suggest you add the constraint.
    One advantage of having a foreign key constraint is that you can create it with the "ON DELETE CASCADE" option. Then, if you simply say "DELETE FROM my_table WHERE my_table_patrent_id = X", all the descendants of those rows will automatically be deleted, exactly as you requested in (1) above.

  • Displaying the selected multiple records from node using onleadselect event

    Hi all,
    How to display the selected multiple records from node to node using onleadselect event.
    i came to know tht to fulfill this requirement i need to use the method get_selected_elements,
    how to use this method in my event??
    sree

    Hi Sree,
    Try below code..
    DATA : lo_nd_it_lips TYPE REF TO if_wd_context_node,             // This is first node
                 lo_el_it_lips TYPE REF TO if_wd_context_element,
                 ls_it_lips TYPE wd_this->Element_it_lips,
                 lt_it_lips TYPE wd_this->Elements_it_lips.
               DATA: wa_temp TYPE REF TO if_wd_context_element,
                lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <IT_LIPS> via lead selection
          lo_nd_it_lips = wd_context->path_get_node( path = `ZRETURN_DEL_CHANGE.CHANGING_3.IT_LIPS` ).
          CALL METHOD lo_nd_it_lips->get_selected_elements
            EXPORTING
                INCLUDING_LEAD_SELECTION = ABAP_true
            RECEIVING
              set = lt_temp.
          DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.          //Second Node
          DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
          DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
          DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.
    * navigate from <CONTEXT> to <PACK_MAT> via lead selection
          lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
          lo_nd_pack_mat->get_static_attributes_table( importing table = lt_pack_mat ).
          LOOP AT lt_temp INTO wa_temp.
            CALL METHOD wa_temp->get_static_attributes
              IMPORTING
                static_attributes = ls_it_lips.
                  ls_pack_mat-vbeln = ls_it_lips-vbeln.
                  ls_pack_mat-material = ls_it_lips-matnr.
                  ls_pack_mat-vgbel = ls_it_lips-vgbel.
                    append ls_it_lips to lt_unpack.
                  CLEAR ls_pack_mat.
           ENDLOOP.
    Cheers,
    Kris.

  • Is there a way of "merging" songs in iTunes. Several times, I have downloaded from the Internet, or recorded from CDs, then found the tracks broken up to appear as separate "Albums". I have a 5-movement symphony, which appears as 5 separate songs?

    Is there a way of "merging" songs in iTunes? Several times, I have downloaded recordings from the Internet, or recorded from CDs, then found the tracks broken up to appear as separate "Albums". I have a 5-movement symphony, which appears as 5 separate songs - Irritating!

    Try posting in a more appropriate forum, as this has noting to do with itunes U - the place where University/college/museums post education material.

  • Moving the 80 Million records from Conversion database to System Test database (Just for one transaction table) taking too long.

    Hello Friends,
    The background is I am working as conversion manager and we move the data from oracle to SQL Server using SSMA and then we will apply the conversion logic and then move the data to system test ,UAT and Production.
    Scenario:
    Moving the 80 Million records from Conversion database to System Test database (Just for one transaction table) taking too long. Both the databases are in the same server.
    Questions are…
    What is best option?
    IF we use the SSIS it’s very slow and taking 17 hours (some time it use to stuck and won’t allow us to do any process).
    I am using my own script (Stored procedure) and it’s taking only 1 hour 40 Min. I would like know is there any better process to speed up and why the SSIS is taking too long.
    When we move the data using SSIS do they commit inside after particular count? (or) is the Microsoft is committing all the records together after writing into Transaction Log
    Thanks
    Karthikeyan Jothi

    http://www.dfarber.com/computer-consulting-blog.aspx?filterby=Copy%20hundreds%20of%20millions%20records%20in%20ms%20sql
    Processing
    hundreds of millions records can be done in less than an hour.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • I received a PDF document with jpegs in it....how can I take the photos to iPhoto

    I received a PDF doc with jpeg photos within it.  How can I move photos to iPhoto??

  • [SOLVED] Xsane Build Errors

    xsane: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory Prompted me to rebuild sane-backends-1.0.20 against libjpeg 7-1 (no problems there) and xsane (with build errors): --disable-gimp --

  • Klipsch D-5.1 with Audigy 2 ZS is

    I've got the Klipsch D-5. surround speakers, and bought a new comptuer equipped with an Audigy 2 ZS card. The back of the control pod only has a left and right analog input, a digital input, and an optical input. When I run the THX surround test in t

  • [SOLVED] netctl profile auto-start/stop on Huawei modem plug-in/out

    Hello! I have Huawei 3G USB modem. $ lsusb | grep -i huawei Bus 004 Device 007: ID 12d1:1436 Huawei Technologies Co., Ltd. E173 3G Modem (modem-mode) I am trying to make netctl to auto-switch to internet connection via this modem as soon as I plug it

  • Client issue

    I'm wondering if there is any way to resolve this issue I'm having with the GW2014sp1hp1 (happened also with the sp1 client). I prefer to use the keyboard more than the mouse for a lot of my daily functions. Since moving to the GW2014 client, if I cl