Unable to delete GRN numbers


Your Merch users are trying to delete GRN numbers but get the error:

'Cannot forward move as this is not the latest version of the receipt'



You would like to know if you can somehow delete those GRNs.


Normally if where the stock-keeping period is open we would suggest processing this through WS0C through the on-onward movement option. However, if the stock-keeping period for the GRN is already closed, please, contact the Customer Support team and provide GRN(s)\pre-GRN(s) so we can delete the GRN and pre-GRN by updating the quantity to 0 for all of the items in the DB.



  • The agent should have access to the customer's DB.
  • The queries will need to be adjusted according to the client's implementation and architecture.
  • It is recommended to create backup tables first before changing the data and drop the backup tables after the solution is confirmed.
  • Use unique names for backup tables so that they can be identified.

Follow the steps below:

1. Backup queries:

create table sup.zd2354747_gtrans_items as 
select * from gtrans_items where gtrans_num in ( 26825513, 26826274 )

26825513, 26826274 - GRNs provided by the customer.

2.  To bypass the stock-keeping closed period blockage check the stock position of the sty_qual before and after step 3, specifically for stock types INBOUND and MAKE, as it should from INBOUND to MAKE:

select * from gar_stk where loc_num = 90003 and gstock_type in ( 'GAR-INBOUND-STK','MAT-GAR-PROC') and sty_qual in ('47796','57967')

3. Update quantities:

update company_calendar set skp_open = 'Y' where wk_code = 2024;
update gtrans_items set qty1 = 0, tot_item_qty = 0 where gtrans_num in ( 26825513, 26826274 ) and sty_qual in ('47796','57967') ;
update company_calendar set skp_open = 'N' where wk_code = 2024;

sty_qual are taken from the backup table from step 1.

4. Use again SQL query from step 2 to check that there are no changes in the stock position.






Article is closed for comments.