Skip to main content

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; 

 

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