Skip to main content
Solved

Custom Event to Move Inventory Part

  • October 10, 2024
  • 1 reply
  • 100 views

Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 20 replies

Hi,

Is there a way of receiving by-products automatically to a different location other than the Shop Order’s proposed location?

We have tried to implement a custom event to move the by-products to their default floor stock location after they’re received, but unfortunately getting this error: “ORA-20105: Transaction.OVERLOAD”, when trying to use Inventory_Part_In_Stock_API.Move_Part, since there are two procedures with the same name.

Is anyone able to suggest another API method which I could use for this, or better yet, a solution which can be achieved with standard functionality?

I am considering having putaway zones set up, and having the event perform putaway instead.

Thanks!

Best answer by Charana Udugama

You can push this Event to be execute as a background Job like around 2,3 seconds after the main process. That way I think it should be able to achieve. Please be mindful about the syntaxes. 
 

DECLARE
 attr_ VARCHAR2(32000);
 sql_msg_ VARCHAR2(32000);
 stmt_ VARCHAR2(32000);
 queue_id_ NUMBER := 10;
BEGIN
 stmt_ := '

<your current custom action> 

';

 sql_msg_ := Message_SYS.Construct('UPDATECOLINE');
 Message_SYS.Add_Attribute(sql_msg_, 'SQL', stmt_);

 Client_SYS.Clear_Attr(attr_);
 Client_SYS.Add_To_Attr('SQL_DATA_', sql_msg_, attr_);
 Client_SYS.Add_To_Attr('MSG_', '', attr_);

 Transaction_SYS.Deferred_Call( 'Fnd_Event_Action_API.Action_Executeonlinesql',  'PARAMETER',
 attr_, Language_SYS.Translate_Constant('Event', 'description of the action', sysdate, 'FALSE', queue_id_));
END;

You can readmore from here

Tips to avoid mutating table error in IFS event actions – DSJ's Blog (dsj23.me)

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

1 reply

Charana Udugama
Superhero (Employee)
Forum|alt.badge.img+12
  • Superhero (Employee)
  • 117 replies
  • Answer
  • October 10, 2024

You can push this Event to be execute as a background Job like around 2,3 seconds after the main process. That way I think it should be able to achieve. Please be mindful about the syntaxes. 
 

DECLARE
 attr_ VARCHAR2(32000);
 sql_msg_ VARCHAR2(32000);
 stmt_ VARCHAR2(32000);
 queue_id_ NUMBER := 10;
BEGIN
 stmt_ := '

<your current custom action> 

';

 sql_msg_ := Message_SYS.Construct('UPDATECOLINE');
 Message_SYS.Add_Attribute(sql_msg_, 'SQL', stmt_);

 Client_SYS.Clear_Attr(attr_);
 Client_SYS.Add_To_Attr('SQL_DATA_', sql_msg_, attr_);
 Client_SYS.Add_To_Attr('MSG_', '', attr_);

 Transaction_SYS.Deferred_Call( 'Fnd_Event_Action_API.Action_Executeonlinesql',  'PARAMETER',
 attr_, Language_SYS.Translate_Constant('Event', 'description of the action', sysdate, 'FALSE', queue_id_));
END;

You can readmore from here

Tips to avoid mutating table error in IFS event actions – DSJ's Blog (dsj23.me)


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