Skip to main content

i would like to perform a scheduled task that would scrap all inventory in a specific PLACE LOCATION.

 

i know how to create the hierarchy select to get the list of Serial id that i want to scrap but how would i pass this to perform_stock_serial_adjustment?

 

	<hierarchy_select>
<primary_table>stock_serial_id</primary_table>
<attrs>
<attr>stock_serial_id.part_id</attr>
<attr>stock_serial_id.serial_id</attr>
</attrs>
<from>
<table>stock_serial_id</table>
</from>
<where>
<data_constraint>
<constraint>
<left_operand>stock_serial_id.place_id</left_operand>
<operator>eq</operator>
<right_operand>TEST_PLACE</right_operand>
</constraint>
<constraint>
<left_operand>stock_serial_id.location</left_operand>
<operator>eq</operator>
<right_operand>REPAIR</right_operand>
</constraint>
</data_constraint>
</where>
</hierarchy_select>
	<perform_stock_serial_adjustment>
<parameters>
<adjustment_reason>SCRAP</adjustment_reason>
<location_from>REPAIR</location_from>
<part_id>@part_id</part_id>
<place_id_from>TEST_PLACE</place_id_from>
<pt_comment>Automatic Scrap of Stock </pt_comment>

<serial_id>@serial_id</serial_id>
<quantity>1</quantity>
</parameters>
</perform_stock_serial_adjustment>

 

Hi @graeme86,

Are you able to advise of the scenario that this is required for?

Usually this would be done using an SQL script rather than in XML.

Kind regards,

Lee Pinchbeck


Hi @Lee Pinchbeck thank you for your reply

 

During the RMA process we will perform a goods receipt against the RMA. this will put the stock into REPAIR stock. but we don’t use FSM for performing our repairs we use SAP. so we need to scrap all the stock after it comes into the Repair location. we do currently have a custom xml business rule that suppose to run on insert/update to the stock_serial_id table.

 

this business rule runs successfully approx 80% of the time. But some times it does not remove the stock  but by the time we notice that rule did not process the logs are gone. I have also not been able to reproduce the issue in our test environment. so i was looking into alternative solutions for scrapping the inventory.

<perform_stock_adjustment>
<parameters>
<adjustment_reason>SCRAP</adjustment_reason>
<bin_id_from></bin_id_from>
<bin_id_to></bin_id_to>
<location_from>@location</location_from>
<location_to></location_to>
<orig_reference_id></orig_reference_id>
<part_id>@part_id</part_id>
<place_id_from>@place_id</place_id_from>
<place_id_to></place_id_to>
<pt_comment>Automatic Scrap of IMAX Repair Stock</pt_comment>
<request_unit_id></request_unit_id>
<serial_ids>
<serial_id>@serial_id</serial_id>
</serial_ids>
<quantity>1</quantity>
</parameters>
</perform_stock_adjustment>

 


Hi @graeme86 ,

Instead of trigger it in the Schedule process with a larger number of records, if possible you can try to scrap the Parts while in Receiving itself, which will reduce the work and hope that will not have any issues.

Thanks,

Hari

 


Hi,

I think @graeme86 raises a good point here.

When a selection of data produces multiple responses you want a MPM to ‘loop’ through and perform a transaction for each one.

 

I don’t think there is anything within the client to be able to do this. Unless you somehow configure a Connect process to create a .csv file, drop it to a folder location and then have that folder monitored. It would then need the MPM to be triggered when being read. I am not sure that is possible.

But if feels as though the Monitor Schedules would be the right place for this. If anyone has done anything like that it may help. 

 

Ady