cancel
Showing results for 
Search instead for 
Did you mean: 

Need FMS For Auto Generation of Item Code Based on Item Group Name and UDF

Former Member
0 Kudos
872

Dear Experts,

Need FMS For Auto Generation of Item Code Based on Item Group Name and U_SubCat

In UDF U_SubCat i have link User Defined table SubCat,

In this table i have some data like BO,HP,PP,Define New etc.

I want to generate item code based on this data

Scenario is

ItemGroupName             U_SubCat      ItemCode have to generate

LLM                              BO             --->     LLMBO001

LLM                             BO             ---->    LLMBO002

LLM                             HP             ---->   LLMHP001

SP                               BO             ---->    SPBO001

SP                               HP             --->     SPHP002

AutoRefresh on U_SubCat

please help me for this

Thanks & Regards,

Navanath

View Entire Topic
Former Member
0 Kudos

Hi Experts,

Can any one help me for this

Regards,

Navanath

pierrecanali
Active Participant
0 Kudos

Hi Navanath,

try this:


select ((select ItmsGrpNam from OITB where ItmsGrpCod = $[$39.0]) 

+ $[OITM.U_SubCat]

+ right(N'00000' + convert(nvarchar(5), (select isnull(count(*), 0) + 1 from OITM where ItmsGrpCod = $[$39.0] and U_SubCat = $[OITM.U_SubCat])), 5))

hope this will definitively solve your question.

Regards

Pierre