How to delete the duplicate data  from PSA Table

Dear All,
How to delete the duplicate data  from PSA Table, I have the purchase cube and I am getting the data from Item data source.
In PSA table, I found the some cancellation records for that particular records quantity  would be negative for the same record value would be positive.
Due to this reason the quantity is updated to target but the values would summarized and got  the summarized value  of all normal and cancellation .
Please let me know the solution how to delete the data while updating to the target.
Thanks
Regards,
Sai

Hi,
in deleting the records in PSA table difficult and how many you will the delete.
you can achieve the different ways.
1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
3.you can restrict the cancellation records at query level.
Thanks,
Phani.

Similar Messages

  • How to delete the Hierarchy data from Infoobjects.

    How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
    When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

    Please see this link:
    Remove duplicate records ...
    sqldevelop.wordpress.com

  • How to delete the duplicate data in between two distinct rows in SQL?

    Hi,
    I need to identify the duplicate data with two distinct rows. See my data structure below.
    NAME NAME_1 VALUE START_DATE END_DATE FLAG INDEX
    SUR SE 275 13/12/2005 31/12/2010 B 1
    SUR SE 375 A 1
    SUR SE 475 A 1
    SUR SE 275 13/12/2005 31/12/2010 B 2
    SUR SE 375 A 2
    SUR SE 475 A 2
    SUR SE 175 13/12/2006 31/12/2010 B 3
    SUR SE 375 A 3
    SUR SE 475 A 3
    This is my sample data. Here data are duplicate with different index columns. INDEX 1 and 2 contains same group of combination. So i need to identify any one of duplicate combination(i.e INDEX 1 or 2). Can anyone come up with exact solution?
    Thanks

    Try this:
    with test_table as
    (select 'SUR' NAME, 'SE' NAME_1, 275 VALUE, '13/12/2005' START_DATE, '31/12/2010' END_DATE, 'B' FLAG, 1 IND from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', 275, '13/12/2005' ,'31/12/2010' ,'B', 2 from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', 175, '13/12/2006', '31/12/2010', 'B', 3 from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 3 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 3 from dual )
    select t.*,
           CASE WHEN START_DATE IS NULL THEN
             first_value(row_number) OVER (PARTITION BY NAME, NAME_1, IND ORDER BY START_DATE)
           ELSE
             row_number
           END row_number
    from (
    SELECT t.*,
           CASE WHEN START_DATE IS NOT NULL THEN
             row_number() over(PARTITION BY NAME, NAME_1,VALUE, START_DATE, END_DATE, FLAG
                               ORDER BY IND)
           END row_number
      FROM test_table t) t
    order by IND, start_dateNote that this is only checking for diferences in the rows where start_date is not null. Do you want to also check if the records where start_date is null it there are differences? If so you can do this:
    with test_table as
    (select 'SUR' NAME, 'SE' NAME_1, 275 VALUE, '13/12/2005' START_DATE, '31/12/2010' END_DATE, 'B' FLAG, 1 IND from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 1 from dual union all
    select 'SUR', 'SE', 275, '13/12/2005' ,'31/12/2010' ,'B', 2 from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 2 from dual union all
    select 'SUR', 'SE', 175, '13/12/2006', '31/12/2010', 'B', 3 from dual union all
    select 'SUR', 'SE', 375, null, null, 'A', 3 from dual union all
    select 'SUR', 'SE', 475, null, null, 'A', 3 from dual )
    SELECT t.*,
           MIN(row_number) OVER(PARTITION BY NAME, NAME_1, IND) MIN
      FROM (SELECT t.*,
                   row_number() over(PARTITION BY NAME, NAME_1, VALUE,
                                                  START_DATE, END_DATE, FLAG
                                         ORDER BY IND) row_number
              FROM test_table t) t
    ORDER BY IND,
              start_date;Edited by: Manuel Vidigal on 13/Abr/2009 12:05

  • How to delete the Junk Data From Excel Sheet

    Dear ABAPers,
                I am uploading the Excel sheet from the Desktop to the SAP System. In the Internal table i am getting Unwanted Junk data's for Example '##########'.I am not getting this Junk data for all the times. i am getting it for Some times.How to ignore these junk data.
    Thanks & Regards,
    Ashok.

    Dear Friends,
                I communicated wrongly.I am very sorry for that.The Problem is I am getting All the Data into the internal table in addition to that lines i am getting the Junk data in the internal table at the end of the internal table.
    Excel Sheet
    L-1     21.10.2008     1110     888555444676001
    L-1     21.10.2008     1110     888555444676002
    L-1     21.10.2008     1110     888555444676003
    L-1     21.10.2008     1110     888555444676004
    Internal table
    L-1     21.10.2008     1110     888555444676001
    L-1     21.10.2008     1110     888555444676002
    L-1     21.10.2008     1110     888555444676003
    L-1     21.10.2008     1110     888555444676004
    Thanks & Regards,
    Ashok.

  • How to delete the duplicate rows from the table

    Hi,
    I have 2 tbales namely component, component_audit
    For each record in component table there are multiple entries in component_audit table.
    I need to keep the first record and delete the others from the component_audit table
    say for example
    select a.component_id,a.dt_ti_stamp,a.component_name,a.column_before,b.comments from component_audit a,component b where a.component_id=b.component_id
    ( on the above result set only I shold apply the actual delete query )
    PLease help me in this regards.
    Thanks.

    delete from component_audit a where dt_ti_stamp not in (select
                                            min(b.dt_ti_stamp)
                                       from
                                            component_audit b
                                       where
                                            a.component_id = b.component_id)

  • How to delete the committed row from a table from its VOImpl class ??

    I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
    Thanks in advance..........

    http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
    Why did you mark it answered but gave no dukes to finalight? That's not how it works.
    You should mark his answer as correct and give him at least one duke, for the effort!

  • How to retrive the blob data from a table using sql query

    Hi gurus,
    I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
    Regards,
    vardhani.

    You can use data templates.
    See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
    http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
    Thanks,
    Bipuser

  • I want to delete the transactional record from database table

    Hai,
    I want to delete the transactional data from database table with out using the dialog programming is it there any trancation for this.
    for master data we have the transaction code for delete the records. The t.code is 'OBR2'.
    Plz help in that cse.
    Thanks and regards,
    P.Naganjana Reddy

    Hai,
    Plz help me urgent.
    I am asking i want to delete transactional data from database table without using the dialog programming.
    Thanks and Regards,
    P.Naganjana

  • How to delete the duplicate email address in BP master data

    Hi,
    When  you get an email ids from the third party vendor and you are loading into CRM BP master data.  how to delete the duplicate email address already exits in the system.  In CRM you can create the same BP with different id.   I would like to know how to delete the email address during importing email addresses from the third party tool.
    During the campaign you are sending email to all your customers, when the customer want to unsubscibe the email address from your list, how to unsubcribe the email address and how to updat the BP master data. 
    If you are sending the email to customer, you are using html or simple text, if the customer wants only html or simple text, how you to specify in the system?
    thanks,
    arul

    Hello Arul,
    welcome to the SDN CRM Development forum.
    1. I think you should clear the data with duplicate E-Mail adresses in the external tool.
    2. Unsubscription could be done by a Marketing Attribute which could be set by using a Target Group which is created by Campaign Automation. Have a look at this Toppic. There is also a Best Practice avaliable at http://help.sap.com/bp_crmv340/CRM_DE/index.htm.
    3. Also HTML or Simple text can be mained in a Marketing Attribute. You have to use different Mail Forms to which are sent to different Target groups.
    Regards
    Gregor

  • HT2905 Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • How can delete my iphone5 data from the date its restored?

    how can delete my iphone5 data from the date its restored?

    it's unclear what you mean
    if you wish to remove your iphone5 data you connect it to iTunes on the computer and click the restore button and choose restore to factory defect

  • How to delete the duplicate requests in a cube after compression.

    Hi experts,
        1. How to delete the duplicate requests in a cube after compression.?
        2. How to show a charaterstics and a keyfigure side by side in a bex query output?
    Regards,
    Nishuv.

    Hi,
    You cannot delete the request as its compressed as all the data would have been moved to E table ..
    If you have the double records you may use the selective deletion .
    Check this thread ..
    How to delete duplicate data from compressed requests?
    Regards,
    shikha

  • How to delete backend system data from GRC,GRC 10 AC

    Hello experts,
    we have connected multiple ECC systems to GRC by creating connectors with respect to each system and
    currently we are using,now due to some reasons customer requested to delete complete data from
    one of the ECC system from GRC.
    we are using only access control with all components
    please  suggest how to delete all relevant data
    from GRC system
    Thanks
    GRC Admin

    Hi,
    You can use program GRAC_DELETE_ACCESS_RULES to achieve your requirement.
      2075597 - How to delete specific system from SPRO
    Regards,
    Madhu.

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

Maybe you are looking for

  • How to estimate size of dimension & cube

    Hi, Is there any guideline avialable to estimate the space required for a dimension or for a cube? I mean if a dimension table is of 200GB, how much space I will be needing to create a dimension in analytic workspace? Also, when we refresh the dimens

  • My iphone went dark and is not turning back on.

    Yesterday my son was playing temple run when my phone just shut off.  I let it sit for awhile and got it to turn back on.  Later that evening it shut off again and I haven't been able to get it working since.  Any ideas?

  • Wait for Event not being picked up by workflow

    Hi, We have a purchase order workflow that has a parallel branch with a wait for event of 'Released' on it. The theory is that if a PO is released the workflow will finish. We have a situation where POs are created then released straight away by an i

  • Updatable Pic Grid

    Hi Guys, I'm sure someone knows how to do this - I want to create a grid of thumbnail pics (that each link to different pages) when I add a new one, I want it to start at the very top left grid box and push all the others back... can i automate this

  • Help with installation of Adobe Acrobat 10

    I installed the adobe cs5.5 premium on my laptop and it was fine, I got a virus lost everything and had to restore my computer back to factory settings.  I reloaded Cs5.5 and everything loaded except Acrobat.  I have tried to do it in safe mode, take