Skip to Content
0

FMS for Item Group

Jan 24, 2017 at 09:02 AM

90

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
DIEGO LOTHER Jan 24, 2017 at 12:39 PM
1

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


img.png (51.5 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sir Lother!

Just tested out the query you sent a month ago, works well!

Thank you very much!

0