There are a lot of ways to achieve this. It depends on how you want it to be implemented. An easy way would be simply to use a second BP_CraftingManager component as a scrapping manager. The function names might be a little confusing in the beginning but if you don’t need something special it has all the functionality you need. You will also want to write a new widget class for the scrapping slot. In its OnDrop function you want to cast the operation to BP_InvItemDrag. If the cast was successful you possibly want to move the dragged item back in the slot it’s coming from and check if the item’s class exists in the scrapping manager component. If it does you save a reference to the item and display the crafting materials you get for scrapping with any text widgets. You will need to decide if you want scrapping able to be done from both, the player inventory and the inventory the player is interacting with.
If “SCRAP” is now pressed you want to run an event on the server. That event needs an integer input parameter for the inventory slot index the item is in. You can get that inventory slot index by using the function FindItemSlot. The slot index isn’t directly saved when the item is drag&dropped in the widget because that item could’ve possibly been moved by the player at this point.
This event on the server should (to prevent cheating) again search for the materials you get with scrapping in the scrapping manager component and then remove that item and add the crafting materials. Make sure the scrapping is only done if all scrapping materials can be added after the item is removed. This order is important because removing the scrapped item may free a slot that is needed to add the items you get for the scrapping. When adding one of the items isn’t successful (not enough room in the inventory) you need to remove the previously added items and add back the scrapped item you did just remove. Alternatively you could check if the scrapping can be done beforehand but that is a little more complicated due to the fact that items can be stacked. Make sure the removing / adding is only done on the server and the owning client (in case the server isn’t the owning client) like I’ve did with the whole inventory system to prevent cheating. No client should know about other client’s inventory.