Delete condition type records from PO

Hi all,
   I have put custom fields ( for condition type ) under customer data tab in PO (ME21N) line item.
While creating/changing PO, I have to delete condition records under conditions tab based on the custom fields which I have defined in the customer data tab.
Is there any badi or function module to delete required condition records in PO?
Thanks in Advance.
Udaya Madhav

Hi uday,
Please Use the FM
RSDRD_SEL_DELETION
Hope this will be Helpful
Thanks
kalyan

Similar Messages

  • How to delete the single record from the  ODS

    HI,
       I want to DELETE  the particular record from ODS.. how to delete that..
    plz give me the solution.. it's urgent..
    with regards
    @jay

    Hi Prakash,
        You can delete a particular record from ODS by specifying the key field name in Selective deletion button available in Contents tab in the manage screen of ODS. But it will only delete the record from the active data table and not from the Change log and new data table . You should be very carefull if you are doing in Production system as there is chance of deleting other records accidentally.
    Go to Selective deletion button - > Click on delete selection -> Enter the key field values of the record you want to delete-> Press save button to save as Variant -> Go back and click on selection button -> Chosse the background job type -> Click on start button.
    Regards,
    Prakash

  • How to delete some of records from wf_notifications table any API Name?

    Hi All,
    I want to delete some of records from wf_notifications table , can any one tell API' name and Back end delete process.
    Thanks,
    Ramu
    Edited by: Ramu on Mar 20, 2013 5:42 AM

    Hi ,
    I hv done below script, now it's working fine.
    DECLARE
    CURSOR csr_transaction_id IS
    SELECT   hat.transaction_id,
             hat.item_type,
             hat.item_key,
             ppx.employee_number,
             hat.section_display_name
      FROM   hr_api_transactions hat, per_people_x ppx
    WHERE   hat.process_name = 'HR_PERSONAL_INFO_JSP_PRC'
             AND hat.selected_person_id = ppx.person_id
             AND ppx.employee_number IN
                      ('100024773',
                       '100024820',
                       '100024859',
                       '100024879',
                       '100024902',
                       '100024937',
                       '100025137',
                       '100026470',
                       '610014755',
                       '610017039')
    order by  ppx.employee_number;
    BEGIN
      dbms_output.put_line('***Deleted all Transactions  and Notifications of below Employee Personals Tranactions ***');
       FOR my_cur_v IN csr_transaction_id
       LOOP
       /*Delete all Transaction_id's in hr_api_transactions,hr_api_transaction_steps,hr_api_transaction_values and hr_api_transaction_steps_bk tables */
        hr_transaction_swi.delete_transaction
                              p_transaction_id =>my_cur_v.transaction_id,
                              p_validate => hr_api.g_false_num
        wf_engine.abortprocess  (
                                  itemtype => my_cur_v.item_type,
                                 itemkey => my_cur_v.item_key
         /* Deleted all Notification_id's and item_key's in wf_item_activity_statuses,wf_items,wf_item_attribute_values,wf_notifications     Table */                     
         wf_purge.items (
                          itemtype => my_cur_v.item_type,
                         itemkey => my_cur_v.item_key
        dbms_output.put_line('Emp No --'||my_cur_v.employee_number||'Transaction_id :'||my_cur_v.transaction_id||'Emp Personal Info :'||my_cur_v.section_display_name||
                              'Item Type :'||my_cur_v.item_type|| 'Item Key :'||my_cur_v.item_key); 
       END LOOP;
       commit;
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line('hr_transaction_swi.delete_transaction api goest to exception block'    ||sqlcode|| '  '||sqlerrm);
    END;  
    /thanks,
    Ramu

  • How to delete a particula record from InfoObject

    Dear All,
    I got some problem situations and would like some suggestions from any of you.
    <b>Problem detail</b>- one process chain was failed due to could not activate an ODS-A
    - ODS-A and ODS-B contained InfoObject-0BP_GUID
    - errors were found and referred to the InfoObject-0BP_GUID.
    - The errors referred to one record composed of incorrect data. I still wondered where it came from since normally, 0BP_GUID keeps only guid.
    I'd like to delete the incorrect record.But I do not want any impact to InfoProviders.
    I'm not sure how to resolve this case. This has to be very carefully managed because it happened on production system.
    Actually, I did find one thread in this forum "Delete SID table content". But I'm not sure whether it could be applied to my case.
    Any suggestion would be appreciated.
    Thank you very much.
    -WJ-

    Unfortunately you cant delete data without inpacting the data in the.  This is how BW works and you will appreciate this because youur transaction data is secured and you wont face any data issues later on. Let me give you an example. Lets sa your ODS or cube stored sales data and in the ODS you have sales org, customer and amount. When you run the report, data is read from this cube /ods, but to fetch the master data it goes to the master data tables via SID. When the transaction data gets loaded and when you try to delete a record in master data, it will let you do.
    If you still wish to do, proceed as follows:
    1. Delete the data in cube first.
    2. Delete the particular record from the master data table.3
    3. Reload the data to the ODS / cube.
    Without deleting the transaction data in the ODS / Cube the system wont let you delete the data in master data and you will get any of the following messages.
    (a) " not all master data could be deleted
    (b) "the master data can not be deleted".
    Ravi Thothadri

  • Delete overlapping/duplicate records from cube

    Hi All,
    Kindly let me know how to delete overlapping requests from a cube. Actually the cube is getting loaded from varuous infosources, but there are records which get duplicated and the are not wanted , then hiow to delete the duplicate records from the cube.
    Regards,
    dola

    I think what arun is perfectly right....
    use DSO for consolidation of various requests..from diferenet infosources...
    Now load from DSO to cube...and it is very much possible...though will require little work.
    Delete duplicate records option is usually used for master data.With transacdtion data i don't think its advisable.
    Regards,
    RK

  • Delete 50 Million records from a table with 60 Million records

    Hi,
    I'm using oracle9.2.0.7 on win2k3 32bit.
    I need to delete 50M rows from a table that contains 60M records. This db was just passed on to me. I tried to use the delete statement but it takes too long. After reading the articles and forums, the best way to delete that many records from a table is to create a temp table, transfer the data needed to the temp table, drop the big table then rename temp table to big table. But the key here is in creating an exact replica of the big table.I have gotten the create table, indexes and constraints script in the export file from my production DB. But in the forums I read, I noticed that I haven't gotten the create grant script, is there a view I could use to get this? Can dbms.metadata get this?
    When I need to create an exact replica of my big table, I only need:
    create table, indexes, constraints, and grants script right? Did I miss anything?
    I just want to make sure that I haven't left anything out. Kindly help.
    Thanks and Best Regards

    Can dbms.metadata get this?
    Yes, dbms_metadata can get the grants.
    YAS@10GR2 > select dbms_metadata.GET_DEPENDENT_DDL('OBJECT_GRANT','TEST') from dual;
    DBMS_METADATA.GET_DEPENDENT_DDL('OBJECT_GRANT','TEST')
      GRANT SELECT ON "YAS"."TEST" TO "SYS"
    When I need to create an exact replica of my big table, I only need:
    create table, indexes, constraints, and grants script right? Did I miss anything?
    There are triggers, foreign keys referencing this table (which will not permit you to drop the table if you do not take care of them), snapshot logs on the table, snapshots based on the table, etc...

  • How to stop non statistical condition type value from updating total amount

    Gurus,
    Can any body explain me how to do following setting,
    How to Stop non statistical condition type value from updating Total Amount
    Regards,
    Sai

    Dear Sai,
    You need to make that condition type as Statistical one
    Go to SPRO - Sales and Distr. - Basic Functions - Pricing - Define and Assign Pricing Proc - Maintain Pricing Proc - Control Date
    Select the proc. - select the condition type and activate the  check box Statistical
    This will show the amount of the condition but will not consider for the net value calculation
    Hope this will help you
    regards,
    Sagar

  • Delete a user record from oracle db

    Hi,
    Can anybody share me a custom workflow which deletes a user record from the oracle db.The user does exist in SUN IDM.
    Please help me.
    Thanks in advance.

    You can use a Trigger and UTL_FILE to write to a file (on the server).
    Example:
    create or replace trigger test_file
      after insert or delete or update on test_case 
      for each row
    declare
    v_logfile utl_file.file_type;
    begin
      v_logfile := utl_file.fopen('\myfiles','test_file.log','a');
      if inserting then
         utl_file.put_line(v_logfile,'Inserting to table');
      elsif deleting then
         utl_file.put_line(v_logfile,'Deleting to table');
      else
         utl_file.put_line(v_logfile,'Updating to table');
      end if;
      utl_file.fclose(v_logfile);
    end test_file;
    I want to generate a log file in which i want to dump some useful messages, when anyone does a dml operation on a table, and also, i want to have a switch like YES or NO (may be an environment variable,,) if i switch it to YES the log file should get generated, if NO then, no log file will be generated..
    can anyone help, how can you do this task ?
    thanks a lot in advance..
    srini

  • How to speed up the deletion of 11million records from the table

    Hi,
    How to speed up the deletion of 11million records from the table.
    I need expiditious reply. Please do the needfull in advising
    Regards

    Please try to understand the question.Well it would help if you would answer some of the questions you have been asked as your question is not complete and clear and no matter how hard we try, we really need you to try and ask the question properly.
    So as previously asked
    Which simply supports the idea that we need:
    1) better definition of the business purpose (why)
    2) oracle version
    3) operating system
    4) hardware configuration
    to give a moderately accurate answer.
    I would like to add
    5) How many rows in total in the table to begin with.
    6) What is your delete statement
    7) Is this a one time operation or will it happen regularly
    8) Can you use partitioning.

  • Delete Null value records from 0BPARTNER

    Hi Experts,
    For 0BPARTNER info object we have 40 attributes. My requirement to delete the 0BPARTNER records which have all the attributes are NULL. I tried to delete the NULL records from master data maintenance, but those records already loaded to upstream targets.
    Can anyone please suggest me any other solution to delete the NULL records from 0BPARTNER master data.
    Thanks in advance,
    Sai Chand.S

    hi
    try this
    /BI0/PBPARTNER is the transparent table name for the 0BPARTNER.
    steps
    1.Go to SE14 t-code
    2.Enter Table Name /BI0/PBPARTNER
    3.Click on the Radio Button - Delete Data
    delete the data  S ,  P-Tables   in the database

  • Deletion condition types from purchase order

    Hello,
    I've got the following situation:
    1) PO had been created for one material with S price and there was three conditions, that to reflect planned freight costs.
    2) There GR have been done.
    Postings:
    Stock 10  Dt
    Price difference 6 Dt
    GR/IR     -10 Kt
    GR/IR     -2 Kt - Condition 1
    GR/IR     -3 Kt - Condition 2
    GR/IR     -1 Kt - Condition 3
    3) Cancellation of GR - 102 mvmt type:
    Stock -10  Kt
    Price difference -6 Kt
    GR/IR     10 Dt
    There were no reverse postings for planned conditions !!!!
    During the analysis of this PO, after all of this postings - i've found out  that there are three conditions, but with zero values !!!
    As i know it is impossible to delete conditions from PO after postings.
    We didn't implement any ABAP
    Do you have ideas about this accident?
    Thank you in advance.

    I can't understand you: "could you corelate the changes or are they in line wth if the condtion value was changed?"
    Where i need to correlate it? I can't see it CDPOS - i can see only the changes of the following fields:
    EKPO
    BRTWR
    EKPO
    EFFWR
    EKPO
    NETPR
    EKPO
    NETWR
    And the values there are not correlated with the values of condtions in EKBZ.
    I suppose that some condtions were in the PO after GR, but there then they were deleted (but how???!!!) and after this was cancellation of GR - we've got only reverse entires - it sounds like nonsence.
    But i have no any idea.

  • Delete Condition Type Depending on Item category Va01

    HI all,
    I wan to delete condition record depending on item category. I have a good link from sap.This link explains how to hide the condition but i want the  delete the condition. was badly struck here.
    http://wiki.sdn.sap.com/wiki/display/ABAP/ManipulatingPricingconditionsdisplayinSalesdocumentwithUserExit-LV69AFZZ
    Regards,
    madhu
    Edited by: madhurao123 on Mar 24, 2011 2:19 PM

    Hi,
    We had a similar requirement once, and towards the end we realised that deleteing rather than hiding it was a bad idea.
    Think beyond the scope, that if a future sales order created with reference needs this condition record; manual entry will again be dependent on your pricing procedure and is a mess.
    But if you do want to delete it; go into debugging and decide which user exit you would want to use and delete that line of the condition record from XKOMV table for that Sales Order

  • FM or BAPI to create new condition type / record for material - VK11

    Hi All,
        I need to copy condition records from one material to another material, to do that using the below FM. For the below values even its not raising any exception or creating pricing record. Could any one tell me am i missing any other parameters ?
    Please let me know.
    *& Report  Z_TEST292011
    REPORT  Z_TEST292011.
    data: ls_komg type KOMG,
          ls_komv type komv,
          lt_komv TYPE TABLE OF komv,
          lv_new_record.
    *ls_komg-kunnr = '0001000008'. " Cust number
    ls_komg-matnr = 'A0168L1600100006'. " Mat number
    ls_komg-VKORG = '3101'.
    ls_komg-vtweg = '10'.
    clear: Lt_komv,LS_KOMV.
    ls_komv-kappl = 'V '. " Application V = Sales
    ls_komv-kschl = 'ZR00'. " Condition type
    ls_komv-krech = 'B'. " calculation type; B -Fixed amount
    ls_komv-waers = 'USD'. " Currency
    ls_komv-kpein = '100'.
    ls_komv-kmein = 'EA'. " Unit of measurement
    ls_komv-kbetr = '121.50'. " new condition value
    append ls_komv to lt_komv.
    CALL FUNCTION 'RV_CONDITION_COPY'
      EXPORTING
        application                       = 'V'
        condition_table                   = '005'
        condition_type                    = 'ZR00'
    *    DATE_FROM                         = '20110629'
    *    DATE_TO                           = '99991231'
        ENQUEUE                           = 'X'
    *   I_KOMK                            = ' '
    *   I_KOMP                            = ' '
        key_fields                        = ls_komg
        MAINTAIN_MODE                     = 'A'
        NO_AUTHORITY_CHECK                = 'X'
        NO_FIELD_CHECK                    = 'X'
    *   SELECTION_DATE                    = '00000000'
        KEEP_OLD_RECORDS                  = 'X'
    *   MATERIAL_M                        =
    *   USED_BY_IDOC                      = ' '
    *   I_KONA                            =
        OVERLAP_CONFIRMED                 = 'X'
        NO_DB_UPDATE                      = ' '
    *   USED_BY_RETAIL                    = ' '
    IMPORTING
    *   E_KOMK                            =
    *   E_KOMP                            =
        NEW_RECORD                        = lv_new_record
    *   E_DATAB                           =
    *   E_DATBI                           =
    *   E_PRDAT                           =
      tables
        copy_records                      = lt_komv
    *   COPY_STAFFEL                      =
    *   COPY_RECS_IDOC                    =
    EXCEPTIONS
       ENQUEUE_ON_RECORD                 = 1
       INVALID_APPLICATION               = 2
       INVALID_CONDITION_NUMBER          = 3
       INVALID_CONDITION_TYPE            = 4
       NO_AUTHORITY_EKORG                = 5
       NO_AUTHORITY_KSCHL                = 6
       NO_AUTHORITY_VKORG                = 7
       NO_SELECTION                      = 8
       TABLE_NOT_VALID                   = 9
       NO_MATERIAL_FOR_SETTLEMENT        = 10
       NO_UNIT_FOR_PERIOD_COND           = 11
       NO_UNIT_REFERENCE_MAGNITUDE       = 12
       INVALID_CONDITION_TABLE           = 13
       OTHERS                            = 14
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    break jdonepud.
    call function 'RV_CONDITION_SAVE'.
    call function 'RV_CONDITION_RESET'.

    Hello ,
    why dont you try LSMW -RV14BTCI ?
    regards
    Prabhu

  • How to delete the matching records from two internal tables

    Hi ,
    I have two internal tables say A and B of the same type. If A has 10 records and B has 4 records , I want to delete the 4 records in B from A .
    loop at B into wa .
    delete A where key = wa - key .
    endloop.
    takes a long time if the table B is huge. how can I improve the performance.
    Thanks.
    Gayathri

    Hi Gayathri,
    You could try field-symbols. It reduces the data transfer from the internal table B to the work area.
    field-symbols <fs_itab_b> like line of B.
    loop at B assigning <fs_itab_b>.
      delete A where key = <fs_itab_b>?-key.
    endloop.
    Regards,
    <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>.

  • How to delete same name records from datagrid,while i am selecting one of the record and delete

    hi friends,
    i am working in flex 4 mxml web application with action script....i am using a data grid and one delete button outside the gird.
    i have two records in the same name in grid, when i click one record from the grid and click delete means that time ,both records will delete from that grid
    which record having the same name..
    how to do this?
    any useful suggesssion or snippets code for this..
    Thanks in advance,
    B.venkatesan.

    hello,
    first get the length of the datagrid.
    suppose your datagrid id is db and you want to delete the the row which have same name .....
    first get the selected row and from that name of the selcted row.
    supoose selected name is
    var index:int=db.selectedindex;
    var selname:string =bd.dataprovide.getItemAt(index).name;(name id datafield of the column).
    now you got the selected name search for the same rows in datagrid.
    var totallen:int=(db.dataprovider).length;
    for(var i:int=0;i<totallen;i++)
        var  checkduplicate:string=bd.dataprovide.getItemAt(i).name;
       if(checkduplicate==selname)
         db.dataProvider.removeItemAt(i);
    this will delete all the row which are with same name with selected row name...
    Gajanan Hiroji | [email protected] | www.isacglobal.com

Maybe you are looking for