Skip to main content
Solved

Custom Shipment Event Action

  • April 14, 2022
  • 1 reply
  • 342 views

Erik Xeamit
Sidekick (Customer)
Forum|alt.badge.img+6

Hello all, 

 

I am interested in generating an error message when I go to RMB Reserve in shipment. Applicable on a certain Shipment type. I have tried all the ways I know but can’t get it to work. I think I am doing something wrong. But I am simply too new at this to understand why it is wrong.

 

In this case, when Shipment Type = ‘IKE’ and Next step in Shipment Flow = ‘Reserve’. When I press RMB and Reserve I want to stop the reservation and generate error message: Error_SYS.Record_General(lu_name_,'Cannot Reserve when Shipping Type IKE');

Today My event looks like this:

And action like this:

In text:

DECLARE
    lu_name_ VARCHAR(2000) := 'Shipment';
BEGIN
IF (Shipment_Flow_API.Get_Next_Step('&NEW:SHIPMENT_ID') ='Reserve') 
AND '&NEW:SHIPMENT_TYPE' = 'IKE'  
AND '&NEW:ROWSTATE' = 'Create pick list'  THEN
  Error_SYS.Record_General(lu_name_,'Cannot Reserve when Shipping Type IKE');
END IF;
END; 

 

Best answer by Charana Udugama

Hi @Erik ROL 

 

Here the issue is in the usage of Shipment_Flow_API.Get_Next_Step function. This function returns a list. Not a specific values. This function checks and lists out the next possible steps. And returns it as a single VARCHAR2. 

ie :- “Reserve, Report picking, Complete, Print pick list”

So you need to go through this VARCHAR2 and treat it as a list and look for ‘RESERVE’. 

Best Regards,
Charana

View original

Charana Udugama
Superhero (Employee)
Forum|alt.badge.img+12

Hi @Erik ROL 

 

Here the issue is in the usage of Shipment_Flow_API.Get_Next_Step function. This function returns a list. Not a specific values. This function checks and lists out the next possible steps. And returns it as a single VARCHAR2. 

ie :- “Reserve, Report picking, Complete, Print pick list”

So you need to go through this VARCHAR2 and treat it as a list and look for ‘RESERVE’. 

Best Regards,
Charana


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