Removing items from Assemblies

May 21, 2008 5 Replies

We are using MSRMS with HQ. At the store level, we have set security so that no changes can be done to items. All changes are made at HQ and then transmitted to the stores. We have encountered a problem though when trying to change assembly items. We are able to add items to assemblies or change the quantity in an assembly. The change takes effect after running a 250 that includes the item number changed. What we have not been able to do is remove items from an assembly. We remove the item at the HQ. We have then run a 250 in various ways in an attempt to have that change transmitted to the stores. We have run the 250 with just the item removed, with just the items left in the assembly and with both the items left within the assembly and the item removed. Regardless of how we run it, at the store level, the item we wish to remove is still part of the assembly though it is removed at the HQ. That leaves us going to each location and removing the item at the store level. Is this a bug or is there some other worksheet or some other method that will remove items from assemblies at the store level from HQ. Thanks in advance for any suggestions.



Ed


Doing a 250 on the item removed from an assembly should remove it at the store level. I just confirmed it on my databases.

After you removed it from the assembly, did you go into the item properties of the removed item at HQ and make sure it does not report being part of the assembly? Check this before you do a 250. If it isn't part of the assembly from which you removed it, the 250 should do the trick.

Did you confirm the 250 ran successfully at the store level? Checked the logs?

I am running RMS 1.3.1011. What version do you have?

We are running Version 2.0.0110. HQ and all stores are on the same version. I have verified that the item was removed from the HQ assembly prior to running the 250 and that in the item properties it is not showing as a member of an assembly. All 250's ran successfully. The log shows that all the

250's ran with no errors.

Sounds like a bug. Can you duplicate the error repeatedly?

Just another reason I am still waiting to move to 2.0.

RR Assembly Fix

Environment: HQ

Background: Create an assembly with item A and B & download to all stores. Now change the assembly components to be item A and C [Delete item B from assembly]. When it goes to store it creates an assembly with A, B & C.

Resolution: Run RRAssemblyFix_HQ.sql script file using HQ Administrator.

Result: If successfully executed, RR Assembly Fix creates WS 51 for all stores with SQL statements to be run at store to correct all assembly items at store. Please note that none of the items are deleted from HQ or Store. RR Assembly Fix redefines association of individual items with assembly at store.

Note: No action is required at store side

Run the SQL below

- - - - - - - - SET NOCOUNT ON

Declare @WS_ID Int Declare @Title nvarchar(50) Declare @Notes nvarchar(255) Declare @CreatedComment nvarchar(255) Declare @ApprovedComment nvarchar(255) Declare @Style Int Declare @Status Int

DECLARE @StrSQL nvarchar(4000) DECLARE @StrIn nvarchar(4000) DECLARE @ItemClassID Int DECLARE @ItemID Int

Set @Title = 'Execute SQL Command' Set @Notes = 'Automatically Created By RR Assembly Fix' Set @CreatedComment = 'Created By RR Assembly Fix' Set @ApprovedComment = 'Approved By RR Assembly Fix' Set @Style = 51 Set @Status = 2

If Exists (Select ID From ItemClass Where ClassType = 1)

BEGIN BEGIN TRANSACTION

Insert Into Worksheet (Style,Status,Title,Notes) Values (@Style,@Status,@Title,@Notes) Select @WS_ID = @@Identity

Insert Into WorksheetHistory (WorksheetID,Comment) Values (@WS_ID,@CreatedComment) Insert Into WorksheetHistory (WorksheetID,Comment) Values (@WS_ID,@ApprovedComment) Insert Into WorksheetStore (WorksheetID,StoreID) Select @WS_ID,ID FROM Store

DECLARE ItemClassID_Cursor CURSOR STATIC FORWARD_ONLY FOR Select ID From ItemClass Where ClassType = 1 OPEN ItemClassID_Cursor

FETCH NEXT FROM ItemClassID_Cursor INTO @ItemClassID WHILE (@@FETCH_STATUS -1) BEGIN

DECLARE ItemID_Cursor CURSOR STATIC FORWARD_ONLY FOR Select ItemID From ItemClassComponent Where ItemClassID = @ItemClassID OPEN ItemID_Cursor Set @StrIn = '' FETCH NEXT FROM ItemID_Cursor INTO @ItemID WHILE (@@FETCH_STATUS -1) BEGIN IF (@@FETCH_STATUS -2) BEGIN Set @StrIn = @StrIn + Cast(@ItemID As nvarchar(4000)) + ',' END FETCH NEXT FROM ItemID_Cursor INTO @ItemID END

If Len(@StrIn) > 0 Begin Set @StrIn = LEFT(@StrIn,Len(@StrIn)-1) Set @StrSQL = 'Delete ItemClassComponent From ItemClassComponent ICC Left Join ItemClass IC On IC.ID = ICC.ItemClassID Left Join Item I On I.ID ICC.ItemID Where IC.HQID = ' + Cast(@ItemClassID As nvarchar(4000)) + ' And I.HQID Not In (' + @StrIn + ')'

Insert Into Worksheet_SQL (WorksheetID,SQLCommand) Select @WS_ID As WorksheetID,@strSQL As SQLCommand End

CLOSE ItemID_Cursor DEALLOCATE ItemID_Cursor

FETCH NEXT FROM ItemClassID_Cursor INTO @ItemClassID END CLOSE ItemClassID_Cursor DEALLOCATE ItemClassID_Cursor

COMMIT TRANSACTION END

SET NOCOUNT OFF

- - - - - - - -

Thank you Afshin. The next time we need to change our assemblies, we will give this a try. Ed

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required