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.

Similar Messages

  • 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

  • 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 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 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 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

  • 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 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 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 Other yellow section in Storage

    I had about 190 GB of Other which suddenly appeared a while ago. I was able to control it a little through OmniDiskSweeper, OnyX and cleaning/optimizing for a while (I have a late 2011 MBP kept pretty clean and never had this Other stuff before). But still, despite the cleaning, I had about 180 GB and it never went any lower than that...
    Then I realized I'd never (apart from OnyX telling me the disk status had to be fixed) repaired the HD/permissions. I thought it may be due to that, so I used the Disk Utily application to verify and repair both permission and HD, came out permissions were all messed up and the HD itself had issues too. As soon as it was repaired the Other was gone.
    This is just to help all of those people who have been wondering/trying, with no success, to delete/reduce the Other section in their HD storage. Because I'd never read anywhere that the solution could be to just run Disk Utility. I don't know if it works for everyone, if I was just lucky, no idea... But it did the thing for me! I can finally transfer all of my audio back from the external mobile HD I was forced to purchase a while ago.

    Dear applewarm,
    I just wanted to tell you how much of a legend, god and genisus you are.
    I have been searching for almost a year on how to fix this problem and this worked straight away...
    Thank you so so so so much
    Campbell
    Ps, I only created this account so I could thank you. I will Facebook this to all my friends who have the same problem
    Thanks again

  • Regarding how to delete the record in internal table

    Hi experts ,
    how to delete the record in intarnal table after validating the data,
    if record contains invalid fields?
    i am giving my code see this and give me the answer?
    loop at it_data into wa_data .
    Validate  Cost Center
        READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-004.
        ENDIF.
    Validate source file material ( material number )
    loop at it_mara into wa_mara .
      read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
               if sy-subrc NE 0 .
       PERFORM update_error_log USING wa_data
                                           text-002.
    delete it_data-objek .
         else.
      read table it_mara into wa_mara with key  matnr = wa_ausp-objek .
           if sy-subrc EQ 0 .
           wa_data-objek = wa_mara-matnr.
           wa_data-matkl = wa_mara-matkl.
         ENDIF.
         Modify it_data from wa_data  .
      endif.
    *endloop.
    Validate unit of measure (unit)
        READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-003.
        endif.
    Validate delivery location ( storage location )
        READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-001.
             if wa_data-flag ='x' .
          delete it_data from  wa_data .
        endif.
        ENDIF.
    endloop.

    Hi Naren,
    First get the index number of the IT_data table and store it in one variable whose declaration like this.
    data: tabix type sy-tabix.
    while reading the internal table it_data set the tabix variable.
    tabix = sy-tabix.
    Instead of  the above use below one.
    Delete it_data-objek
    Use the Below statement it will delete  the row from the internal table.
    Delete it_data-objek index tabix
    Thanks,
    Chidanand

  • How to delete  the record  of saved HRA Details...

    Hi Experts,
    I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
    When i m trying to delete it is showing  RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
    How can delete the record.
    Thanking u .
    Sai

    Hi
         Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
    Rajeshk

  • IDoc to file - how to delete a blank record at the end of the file.

    Hi,
    My senario is IDoc to file.  I have successfully implemented this using FCC. But when i checked the flat file, it has a blank record at the end of the file( i think PI adds one blank line/record at the end of the file).  Please suggest me What i need to do, to delete the blank record .
    Thanks & regards
    Sreeni

    Kindly Check below.
    Check whether the problem is at mapping level of  adapter level.. to do this count no. of rows/IDOC before mapping and after mapping in IE and no. of rows in the output file.
    Thnx
    Subbu

Maybe you are looking for