Skip to Content
avatar image
Former Member

FMS for Item Group

Hi Experts!

Is it possible to create an FMS in the Items Group in Items Master Data that will be dependent on the Series?

For example, I have created different series for Items in the Document Numbering. I want the Item Group to be dependent on the Series. If a user chooses the "OS" series, the Item Group would automatically be set to "Office Supplies" or it could be the other way around as well.

I need help with the creation of the query for this FMS.

Thanks :).

1.png (31.7 kB)
2.png (28.4 kB)
2.png (28.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 24, 2017 at 12:39 PM

    Hi Nikka,

    Use this query:

    DECLARE @Series AS NVARCHAR(100)
    SET @Series = (SELECT SeriesName FROM ONNM T0 INNER JOIN NNM1 T1 ON T0.ObjectCode = T1.ObjectCode WHERE T0.ObjectCode = '4' AND T1.Series = $[$1320002059.0.0])
    
    
    SELECT 
    	CASE WHEN @Series = 'OS' THEN (SELECT ItmsGrpCod FROM OITB WHERE ItmsGrpNam = 'Office Supplies')
    		 WHEN @Series = 'SERIE 2' THEN (SELECT ItmsGrpCod FROM OITB WHERE ItmsGrpNam = 'GRUPO 1')
    		 WHEN @Series = 'SERIE 3' THEN (SELECT ItmsGrpCod FROM OITB WHERE ItmsGrpNam = 'GRUPO 2')
    		 WHEN @Series = 'SERIE 4' THEN (SELECT ItmsGrpCod FROM OITB WHERE ItmsGrpNam = 'GRUPO 3')
    ELSE 0 END
    

    Don't forget to replace the values with your correct values and add how many "when" clause is necessary to your need.

    In your Item group field add this config:

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded