Skip to main content
Solved

FSM : Create Stock Refill Request Automatically


Forum|alt.badge.img+4

Hi Team,

 

Can you please confirm the feasibility of creating Automatic Requests for the Refill of a Stock once the Quantity goes less than Min Qty. If yes, Can you please provide the possible option.

 

NOTE : I could create a Purchase Order or Requisition using the “Refill to Tragets” option, but we are looking for a Request with Part Transfer Part Need.

Best answer by chandank

Hi Brian,

Thanks for the pointer.

Could use the below in the XML business rule to achieve the expected behavior.

<perform_batch>
<hierarchy_select result_name="related_place">
  <primary_table>place_xref</primary_table>
  <attrs>
    <attr>place_xref.related_place_id</attr>
    <attr>place_xref.related_location</attr>
  </attrs>
  <from>
    <table>place_xref</table>
  </from>
  <where>
    <data_constraint>
      <constraint>
        <left_operand>place_xref.place_id</left_operand>
        <operator>eq</operator>
        <right_operand>@place_id</right_operand>
      </constraint>
    </data_constraint>
  </where>
</hierarchy_select>
<perform_replenish_stock>
 <parameters>
  <consider_on_order>Y</consider_on_order>
  <create_stock>Y</create_stock>
  <location_from xpath_node="//hierarchy_select[@result_name='related_place']/related_location" />
  <location_to>@location</location_to>
  <place_id_from xpath_node="//hierarchy_select[@result_name='related_place']/related_place_id" />
  <place_id_to>@place_id</place_id_to>
  <transaction_type>2</transaction_type>
  <part_id>@part_id</part_id>
 </parameters>
</perform_replenish_stock>
</perform_batch>

 

View original
Did this topic help you find an answer to your question?

Brian Maus
Do Gooder (Customer)
Forum|alt.badge.img+6
  • Do Gooder (Customer)
  • August 24, 2021

The local transfers are a “replenish”.

You can schedule a process that runs the replenishment at a given interval.

As far as what to run -- you can watch the XML log for the output of Logistics Manager->Replenish Stock with your parameters or just rework this(for fill to max if under min):

 

 <perform_replenish_stock>
    <parameters>
      <consider_on_order>N</consider_on_order>
      <create_stock>N</create_stock>
      <location_from>
      </location_from>
      <location_to>
      </location_to>
      <place_id_from>PLACE1</place_id_from>
      <place_id_to>PLACE2</place_id_to>
      <transaction_type>3</transaction_type>
      <part_id>
      </part_id>
      <product_name>
      </product_name>
      <product_family>
      </product_family>
      <part_code>
      </part_code>
      <inventory_code>
      </inventory_code>
      <part_type>
      </part_type>
      <part_group>
      </part_group>
      <part_class>
      </part_class>
      <part_category>
      </part_category>
      <value_abc_code>
      </value_abc_code>
      <usage_abc_code>
      </usage_abc_code>
      <commodity_code>
      </commodity_code>
      <phy_svc_grp_a>
      </phy_svc_grp_a>
      <phy_svc_grp_b>
      </phy_svc_grp_b>
      <phy_svc_grp_c>
      </phy_svc_grp_c>
      <phy_svc_grp_d>
      </phy_svc_grp_d>
      <phy_svc_grp_e>
      </phy_svc_grp_e>
    </parameters>
  </perform_replenish_stock>

 


Forum|alt.badge.img+4
  • Do Gooder
  • August 30, 2021

Hi Brian,

Thanks for the pointer.

Could use the below in the XML business rule to achieve the expected behavior.

<perform_batch>
<hierarchy_select result_name="related_place">
  <primary_table>place_xref</primary_table>
  <attrs>
    <attr>place_xref.related_place_id</attr>
    <attr>place_xref.related_location</attr>
  </attrs>
  <from>
    <table>place_xref</table>
  </from>
  <where>
    <data_constraint>
      <constraint>
        <left_operand>place_xref.place_id</left_operand>
        <operator>eq</operator>
        <right_operand>@place_id</right_operand>
      </constraint>
    </data_constraint>
  </where>
</hierarchy_select>
<perform_replenish_stock>
 <parameters>
  <consider_on_order>Y</consider_on_order>
  <create_stock>Y</create_stock>
  <location_from xpath_node="//hierarchy_select[@result_name='related_place']/related_location" />
  <location_to>@location</location_to>
  <place_id_from xpath_node="//hierarchy_select[@result_name='related_place']/related_place_id" />
  <place_id_to>@place_id</place_id_to>
  <transaction_type>2</transaction_type>
  <part_id>@part_id</part_id>
 </parameters>
</perform_replenish_stock>
</perform_batch>

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings