Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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

replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question