How to Delete the condition record in CRM

HI,
Can you please help me how to delete the condition record from condition table in CRM.
Please explain the usage of FM CRMXIF_CONDITION_SEL_DELETE with examples.
I have also read the documention of the function module. How to use this FM for custom defined condition table.
(this is the code given in Documentation)
DATA-OBJECT_REPRESENTATION         = 'E'
DATA-SEL_OPT-CT_APPLICATION              = 'CRM'
DATA-SEL_OPT-OBJECT_TASK                    = 'D'
DATA-SEL_OPT-RANGE-FIELDNAME        = 'PRODUCT_ID'
DATA-SEL_OPT-RANGE-R_SIGN                  = 'I'    (Including)
DATA-SEL_OPT-RANGE-R_OPTION           = 'EQ'
DATA-SEL_OPT-RANGE-R_VALUE_LOW  = 'PROD_1'
Thanks
Shankar

Hi Shankar,
I am using the same CRMXIF_CONDITION_SEL_DELETE function module to delete condition record present in CRM.
But it is giving me below error in the return table of the FM after i run the program. Can you please correct me if I am doing any thing wrong?
Error in  lt_return: SMW3     CND_MAST_SEL_DEL_EXT_VALIDATE     CND_M_SD
code:
ls_range-fieldname = 'PRODUCT_ID''.
ls_range-R_SIGN = 'I'.
ls_range-R_OPTION = 'EQ'.
ls_range-R_VALUE_LOW = '123456'.
APPEND ls_range TO lt_range.
MOVE lt_range TO ls_entry-SEL_OPT-range.
ls_data-SEL_OPT-object_task = 'D'.
ls_data-SEL_OPT-ct_application = 'CRM'.
ls_data-object_representation = 'E'.
CALL FUNCTION 'CRMXIF_CONDITION_SEL_DELETE'
  EXPORTING
    DATA          = ls_date
IMPORTING
   RETURN        = lt_return
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  IMPORTING
    return = lt_ret.
Edited by: Saravanaprasad Nadar on Jul 7, 2010 1:27 AM

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 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 the material records related to storage type

    Dear SAP guru's,
    I got a situation that if the material "XXXXXX" exists in two different storage type (let say 001 & 002 ) and the material needs to be removed out of one (Let say 002) to avoid the picking and putaway in future.
    Inorder to accomplish an above requirement we tried the below cases
    Case 1: By flagged the material "XXXXXX" under storage type 002 in MM06 transaction.But it didn't restrict the system on allocating and removing the stock from /to to the storage type 002.
    Case 2:After we flagged the material for deletion under storage type 002 ,we used to MM71 transaction to archive & delete the material record that assocaited with the storage type 002 completely.
    I am kind of queiries to know if there is any other method or procedure available to delete the storage type associated material records in SAP.
    Please guide me with the other options.Thanks.
    Regards,
    John.

    Hi John,
    Its very simple, remove the Storage type indicators from the material master - Warehouse View 1 at Stock placement & Stock removal section, with this it won't pickup or place the materials in the concerned storage type.
    If you have extended this materials to more than 1 storage type, you need to do the same for all the storage types.
    Reward if it is helpful.

  • How to delete the duplicated records, not just surpress the records?

    I am new to CR. Right now I am doing a project which needs CR get query from Oracle. I got the query from Oracle. There are records with duplicated fields. For example (the following only show part of fields):
    ID    body_code  
    1            10            
    2             10            
    3             15            
    4              15           
    5              15           
    6              16           
    I need to only select records (not surpress, because I will do some caluculate later) like following:
    ID         body_code        
    1             10         
    2              15
    3               16   
    I tried to creat selection fomula in fomula workshop, shown as follows:
    onlastrecord;
    <>next
    but CR said next can be evaluated. I think it must have something to do with the print-time. So what show I do to delete the duplicated records.Thank you very much.

    Ting,
    Try this:
    Insert a group on body_code.  Then create a running total called Distinct Count.  Field to summarize -> ID, Evaluate on change of group Group # 1 Body Code, and Never Reset.
    Then insert a chart in the report header:
    In the advanced layout, select body_code on change of and select Distinct Count running total in the Show values.
    I hope I understood what you're looking to accomplish.
    Z

  • 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 create the condition record by ABAP program

    Hi Friends,
    I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
    Joe GR.

    Joe,
      Check with below FM..
    BAPI_PRICES_CONDITIONS.
    Check this link:
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    examples....
    http://www.4ap.de/abap/bapi_prices_conditions.php
    Two useful threads on Same topic
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Re: Problem with BAPI_PRICES_CONDITIONS
    BAPI_PRICES_CONDITIONS
    Please check this sample code from other thread.
    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Don't forget to reward if useful....

  • How to populate the condition tables of CRM 7.0

    Hello Friends,
    How to populate values in CND* tables , i assume these are the tables that hold the conditions.
    Thanks and Regards,
    Vasu

    Hi,
    if you refer to CND* tables those are tables involved in the condition master data exchange between ERP and CRM (on CRM side). Actual condition tables for pricing related condition records start with CNC*. In the help there is a documentation of the condition master data tables for pricing available: http://help.sap.com/saphelp_crm70/helpdata/EN/0e/91f9392486ce1ae10000000a114084/content.htm
    Hope this helps.
    Best Regards,
    Michael

  • How to delete the Initialization records in  2LIS_03_BX

    BW3.5 - R/3 4.6c - LO-Cockpit - SCM Implementation - Inventory Management 0IC_C04 InfoCube.
    I wanted to use 2LIS_03_BX and RSA3 was showing zero records. I ran MCNB to collect records for this extract and it collected 815000 stock records. When I checked the extractor, I realized that the zero quantity records were not exactly what I was expecting for. I was looking for zero quantity records for valid/active bins. But it seems that we are receiving 100's of zero quantity record for every material that we don't really care for anylonger. I definitely want to see the zero quantities in case the bin is active but we've just run out of material.
    I turned off the zero quantity collection in MCNB but at the end of run, it only over writen the 815000 records rather than deleting them all and collecting about 70,000 entries as expected.
    My question is how can we delete the results of a previous initialization of open stock transfer structure (trans# MCNB)so I can run it again?
    I'll appreciate any hints or comments.
    Thanks a lot.
    Bilal

    Hi,
    I assume using OLIX, we will be able to delete the data from either 2LIS_03_BX or 2LIS_03_BF. As opposed to using LBWG, where if we select '03' the data is cleared off from the set up tables of both datasources.
    If that is true, could you please mention the 'Info structure' to be used in OLIX for 2LIS_03_BX and 2LIS_03_BF?
    Thanks a lot.
    Regards,
    Sri.

  • How to delete the all records in Ztable from report program

    Hi Guys,
    Good Day!
    How to delete all records in Ztable from report program(Means I want to clean Ztable records from report program) .  Please send me the code.
    Thanks & Regards,
    Reddy

    Use this.
    DELETE { {FROM target [WHERE sql_cond]}
           | {target FROM source} }.
    *But before deleting the rows please check if this Ztable is being used in any other programs or used by others.
    Check "where-used-list"
    in se11 give the table name
    utilities- where-used list.
    I hope this helps.
    thanks.

  • How to delete a condition record

    hi,
    i maintained one condition record and deleted it in chane mode i.e using t.code vk12. Again if i make new condition records the system showing "validity dates are over lapping".
    wt is it?

    hi srinivas,
    go to VK12 , there you can see the record maintained and the validity period. Just do one thing, select your condition record and change the valid to date in the past. Thn you will get a warning below that the date is in past, just press enter and save the record. Then if you go and check the record it will not be there. Then created your new condition record.
    I hope i have answered your query. reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • How to delete the child record from the database

    how to delete a parent and child record from the database can we do it in the servlet and my database is oracle

    I'm not sure I understand the question but you could certainly use the JDBC API from within your servlet to access and modify a DB. You could also use an EJB layer to access your DB and accomplish the same tasks.

  • How to delete the Transaction Data in CRM

    Hi Gurus,
    I have a requirement to delete the Transaction Data in one Client.
    But Configuration should be as it is ?
    How can i over come this situation?

    HI.
    Do you mean refresh the client ? if that is the case, i think you are posting in wrong forum since this one is for People Centric User Interface. Try in   Customer "Relationship Management (CRM) - General & Framework".
    Best Regards.
    Armando Rodriguez.

  • How to delete the master records when corresponding details records exist.

    What is the SQL statement to delete the records of master when the corresponding detail records are present.
    Note: No Cascade clause was used at the time of creation of referential integrity constraint.
    "M"- Master Table
    "D"- Detail Table
    I used, "Delete from M cascade". This statement is not working.
    Your favour in this will be deeply appreciated.
    Cheers
    PremChin

    Hi folk,
    i appreciate your suggestion,
    my crux of the situation is to know whether there is a way to make it without disabling,removing or modifying the referential integrity constraint.
    If so, modifying, please help me out how to modify the constraint in order to remove the master records keeping detail records in-tact.
    Cheers
    Premz

  • How to delete the double records connected to one or more than one tables in SQL 2008?

    Hi
    Can anyone please help me with the SQL query. I Im having a table called People with columns names: personno., lastname, firstname and so on. The personno. is having duplicate records,so all the duplicate records i have written with "double" in
    the beginning of the numbers. I tried deleting these double records but they are linked to one or more than one tables. I have to find out, all the tables blocking the deleting of double person. And then create select statements which creates update statements
    in order to replace the current id of double person with substitute id. (The personno. is in the form of id's in the database)
    Thanks

    You should not append "double" in the personno. When we append it will not be able to join or relate to other table. Keep the id as it is and use another field(STATUS) to mark as duplicate. Also we will require another field(PRIMARYID) against
    those duplicate rows i.e the main or the primary personno.
    SELECT * FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    UPDATE OtherTable SET personno = b.primaryid
    FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    NOTE: Please take backup before applying the query. This is not tested.
    Regards, RSingh

Maybe you are looking for