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.
When the stock-keeping period is open, we would suggest processing this through WS0C through the on-onward movement option. If this is not possible, another workaround is to check if you can use the Onward Move option in WS0C (O0C) for the corresponding Pre-GRNs. If the window pops up then populate:
New State = 'DONE'
New Destination = 'SUPP' (if this is not allowed then try 'NUL')
New Stock Type = 'MAKE'
New Bin = 'X'
Internal Comments = Indicate the GRN needs to be deleted.
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. Find the week code and verify if the stock-keeping period is open.
select * from company_calendar
Find the period that includes the date where the records in gtrans_items are dated. Note the wk_code and skp_open values.
3. Confirm with Professional Services (Roger King) if the GRNs can be deleted. Provide the GRNs, pre-GRNs, stock keeping period. Only continue if PS has confirmed.
4. 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')
5. 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.