Delete Items In Bulk

If you need to delete a large number of items, you can use a web service to add the items in bulk to a delete group. This technique might be more convenient than adding the items using only the Manage Delete Groups task.

To delete items in bulk:
  1. Create a delete group that doesn't contain any items:
    1. In the Product Information Management work area, click the Manage Delete Groups task.
    2. Click Actions > Create.

    3. Enter a name and optional description for the delete group. For example, Item_Delete01.

    4. Click Save and Close.

  2. Run a web service to populate the delete group with items in bulk.

    Run the Item Version 2 web service using the deleteItem operation to add items to delete group. For more information, see the Oracle Fusion Cloud SCM: SOAP Web Services for SCM guide. Call deleteItem in a loop for every item to be deleted.

    The parameters orgId, itemId, and deleteGroupName are required.

    The orgId can be obtained using the findItem operation by passing in the itemNumber and orgCode.

    The itemId can be obtained using a query based on itemNumber, where inventory_item_id is itemId and Organization_id is orgId.

    select Item_number,inventory_item_id,Organization_id
    from egp_system_items_b where item_number = 'SF1A'

    Here is an example request payload in SOAP XML:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/t
    ypes/">
       <soapenv:Header/>
       <soapenv:Body>
          <typ:deleteItem>
             <typ:orgId>204</typ:orgId>
             <typ:itemId>300100578417258</typ:itemId>
             <typ:deleteGroupName>Item_Delete01</typ:deleteGroupName>
          </typ:deleteItem>
       </soapenv:Body>
    </soapenv:Envelope>

    Here is an example response payload in SOAP XML:

    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
       <env:Header>
          <wsa:Action>http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2//ItemService/deleteItemResponse</wsa:Action>
          <wsa:MessageID>urn:uuid:dff50971-26c7-4dc7-a99e-1c48e2e888f2</wsa:MessageID>
       </env:Header>
       <env:Body>
          <ns0:deleteItemResponse xmlns:ns0="http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/types/">
             <result xmlns="http://xmlns.oracle.com/apps/scm/productModel/items/itemServiceV2/types/">Success</result>
          </ns0:deleteItemResponse>
       </env:Body>
    </env:Envelope>
  3. Submit the populated delete group for processing:
    1. On the Manage Delete Groups page, query for the delete group that you created, and click its name to open it. The delete group now contains the list of items to be deleted.
    2. On the Edit Delete Group page, click Check Constraints. Examine the constraint check status for whether there are errors or pending transactions for an item.
    3. When errors or pending transactions are resolved, click Submit on the Edit Delete Group page to process the deletion of the items.