Canceling the order that has not been shipped


The order has not been shipped and it needs to be canceled.

You noticed that the order status is partial in the HS0A form and has 2 dispatches. One of them is dead and has zero units. The other dispatch has 1 unit and a Pick ID generated but was not confirmed.

To cancel the order you went to hs7g to zero the dispatch and then to di0d to cancel the Pick. Then while trying to cancel the order by removing an item from it in Hs7b the order status was changed to Delivered and generated another dispatch for it.


We usually delete the Pick through DI7J and then we remove the dispatch line but in the case described it is not possible since the Automatic Data Capture (ADC) check-box is in the Picking state.

Normally, this means that the request is already being pushed to the warehouse team, ​to mark the order state from Delivered, the state is defined as the order state is in 'DEAD' and there's 1 dispatch line that has more than 1 quantity.

If you want to delete this pick and update the dispatch line to 0 so that the order is corrected in the canceled state, please, create a support ticket with the request and order id.



Use the following SQL queries when you will get such requests.

Note: You will need access to the customer's DB. ids will differ for each case.


It is recommended to create backup tables first before changing the data:

create table sup.zd2557912_gtrans_items_dsp as select * from gtrans_items where gtrans_num = 29538955; 

create table sup.zd2557912_gtrans_items_pick as select * from gtrans_items where gtrans_num = 29538987;

create table sup.zd2557912_gtrans_defs as select * from gtrans_defs where gtrans_num = 29538987;


Use this code to bypass DB constraints:

exec proliba.set_pick(true); 
update gtrans_defs set hh_state = null where gtrans_num = 29538987;
exec proliba.set_pick(false);


Delete the pick and update the dispatch line to 0:

delete from gtrans_items where gtrans_num = 29538987; 

update gtrans_items set qty1 = null, tot_item_qty =0 where gtrans_num = 29538955;





Article is closed for comments.