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.
- Create a delete group that doesn't contain any items:
- In the Product Information Management work area, click the Manage Delete Groups task.
-
Click
. -
Enter a name and optional description for the delete group. For example,
Item_Delete01
. -
Click Save and Close.
- 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
, anddeleteGroupName
are required.The
orgId
can be obtained using thefindItem
operation by passing in theitemNumber
andorgCode
.The
itemId
can be obtained using a query based onitemNumber
, whereinventory_item_id
isitemId
andOrganization_id
isorgId
.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>
- Submit the populated delete group for processing:
- 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.
- 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.
- When errors or pending transactions are resolved, click Submit on the Edit Delete Group page to process the deletion of the items.