Item Code Auto generation in item master UDF field
Dear Expert,
I want to Generate automatic item code in the item master U_STY UDF field . the number start with 'SL' prefix
like this 'SL000001' and continue when i generate next item master.
for example 'SL000001' for X item . when add next item Y then item nuber will be 'SL000002'. kindly help me.
thanks.
sridharan
Edited by: Sridharan.R on Oct 28, 2011 10:02 AM
Hi!
Try this
declare @temp as char(15)
IF (Select max(Itemcode) from OITM ) IS Null
BEGIN
set @temp = 'SL000001'
select cast(@temp as char(15))
END
set @temp=(select max(right(ItemCode,6)) + 1 from OITM )
set @temp='SL'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(15))
END
Regards,
[Thanga Raj K|Q3 Wrap-Up: What happened in the third quarter of 2009 in the SAP Business One Community]
Similar Messages
-
Item Code Auto Generation Based on User defined Tables
I need the Item code like
PRODUCT TYPE-ITEMGROUP-ITEMCODE-SUBITEM-BRAND-COLOR e.g .FG-01-01-00-001-00.
I created the following User define Tables and link to Item Master data
U_PRO - FOR PRODUCT TYPE
U_GROUP - FOR ITEM GROUP
U_ITEMCODE - FOR ITEMCODE
U_SUBITEM - FOR SUB ITEM
U_BRD - FOR BRAND NAME
U_COLOR - FOR COLOR
i need a formatted search in Item code to fetch the codes from the user defined table
i tried with the following
SELECT T5.[Code]'-'T2.[Code]'-'T3.[Code]'-'T4.[Code]'-'T0.[Code]'-'T1.[Code] FROM [dbo].[@BRD] T0 , [dbo].[@COLOR] T1, [dbo].[@GROUP] T2, [dbo].[@ITEMCODE] T3, [dbo].[@SUBITEM] T4, [dbo].[@PRO] T5 INNER JOIN OITM T6 ON T5.Code = T6.U_PRO WHERE
T5.[Code] = T6.[$U_PRO] AND
T2.[Code] = T6.[$ U_GROUP] AND
T3.[Code] = T6.[$U_ITEMCODE] AND
T4.[Code] = T6.[$U_SUBITEM] AND
T0.[Code] = T6.[$U_BRD] AND
T1.[Code] = T6.[$U_COLOR]
showing errors. Can any one help me regarding this. I badly need the query for Auto generation of ItemcodeHi,
How can you assign those UDF value without ItemCode in the first place?
Thanks,
Gordon -
Auto generation of Item Code And Business Partner
Hello All,
My client want to create Auto generation of Item Code And Business Partner with some prefix value.
Thanks
DeepakHi Dipak Patel,
i created BP code by BP Group use FMS . you can refer code.
declare @temp as char(20)
IF $[OCRD.GroupCode] =100
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =100) and (len(CardCode)=8))
set @temp='C11'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 102
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =102) and (len(CardCode)=8))
set @temp='C12'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 103
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =103) and (len(CardCode)=8))
set @temp='C13'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 104
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =104) and (len(CardCode)=8))
set @temp='C14'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 101
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =101) and (len(CardCode)=8))
set @temp='V11'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 105
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =105) and (len(CardCode)=8))
set @temp='V12'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 106
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =106) and (len(CardCode)=8))
set @temp='V13'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 107
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =107) and (len(CardCode)=8))
set @temp='V14'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 108
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =108) and (len(CardCode)=8))
set @temp='V15'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 109
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =109) and (len(CardCode)=8))
set @temp='V16'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 110
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =110) and (len(CardCode)=8))
set @temp='V17'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
thanks
H2 -
Hi Experts,
Is it possible to create auto generation of Item Codes in SAP B1?
E.g Customer want specific format say ... I000001---- I9999999
tks,
SB1Dear,
You posted the same thread twice.
Check you previous thread for reply :
Re: Auto generation of Item Code
Hope this will help u.
Thanks,
Neetu -
Item Codes and Revisions to Items
Hi Experts!
I have a client who does Custom Manufacturing. I have a question about Item Codes and Revisions.
My understanding is that it is better to use a unique Item Code for each change to an Item. Therefore every revision would have a new Item Code with all the nessesary drawings etc. linked to it.
Is there a way to keep the same Item Code and just mark it as Revision 1, 2,3 etc....(not in the ItemCode) BUT keep the history of the old revisions, like the drawings that was attached to it...
Any help would be appreciated.
Thanks.
MarliHi Marli,
Unfortunately No. Item Code is the primary key for item table OITM. You have to make it unique. You could keep the same initial with suffix like a, b, c to make the different item codes but identifiable easily.
Thanks,
Gordon. -
Item code change into another item code
Hi friends,
problem situation:-
i am having X item in A warehouse,i realised that now that is not going to sell, then there are Y item in B warehouse, in know that if i make X as aY1 and transfer to B warehouse it is going to sell(IS IT POSSIBLE TO MAKE X AS Y1???) ,at that time A warehouse stock should get deducted and Y warehouse stock should get added.(IS IT POSSIBLE???)
MAHESH AMALEHi,
Please check the following thread regarding your issue and see if it is relevant :
Re: Item Master Data
Regards,
Jitin Chawla -
Item code construction for Textile/Fabric industries
Hi all
can anyone help me to construct the item master (Production is also involve and batch is associated with each in and out transaction.)
Current scenario
a. One item code associated with one series.
b. One or more design associated with one series
c. One and more shade associated with one design
According my tinking
ITEM CODE LOGIC:
Stage 1(Quality in the form of meter)
Quality: RIGHT CHOICE
Series: 21000
Division: SU (SU, SH, GU, GH)[SU stand for Suiting, SH stand for shirting, GU stand for grey suiting, GH stand for grey shirting]
Design: 22001
Shade: Blue
Grey/Semi-finished/Finished: G[G for grey, S for semi finished, F for finished]
Form: MM[ MM for meter, LF for lump finished and TF for taka finished, PC for pieces ]
Therefore
Item Code= GSU220010121000MM
Item Name= RIGHT CHOICE (Grey right choice suiting of Design 22001 in blue shade)
(Then Item Code of this Design may be G-SU-22001-01-21000 and Item name is Grey right choice of Design 22001 in blue shade)
Level one production
Stage 2 ((Quality in the form of meter/Lump after processing)
Quality: RIGHT CHOICE
Series: 21000
Division: SU
Design: 22001
Shade: Blue
Grey/Semi-finished/Finished: S
Form: LF[ MM for meter, LF for lump finished and TF for taka finished, PC for pieces ]
Therefore
Item Code=SSU220010121000LF
Item Name= RIGHT CHOICE (Semi finished right choice suiting of Design 22001 in blue shade)
Level two production
When cutting happen and semi finished quality becomes finished quality
Stage 3((Quality in the form of meter/Taka/Than)
1: When cutting happen and semi finished quality becomes finished quality
Now new code look like
Quality: RIGHT CHOICE
Series: 21000
Division: SU
Design: 22001
Shade: Blue
Grey/Semi-finished/Finished: F
Form: TF[ MM for meter, LF for lump finished and TF for taka finished, PC for pieces ]
Therfore
Item Code= RIGHT CHOICE (FSU220010121000TF)
Item Name=finished right choice suiting of Design 22001 in blue shade
2: If the outcomes of cutting are in the form of pieces (Let BOARDING CARD)
The code will be accordingly these items also contain only single series and design so that anyone can identify the quality in the form of pieces.
Quality: BOARDING CARD
Series: 21000
Division: SU
Design: 22001
Shade: 01
Grey/Semi-finished/Finished: F
Form: PC[ MM for meter, LF for lump finished and TF for taka finished, PC for pieces ]
Therefore
Item Code=FSU220010121000PC
Item Name= BOARDING CARD
If I apply these logic then our item master go up around 500000 which is too much so looking some other best fit logic. Help.Check 'ApparelOne' addon from Apollo Consulting
[http://www.apollocon.com/det_prod.asp?id=13] -
Hi Friends,
My problem is this. My client is want automatic item code generation so how I can do this can you please suggest me.Hi Naveen,
I found these two fms's which would enable automatic item code generation. See if it helps you.
declare @temp as char(20)
IF $[OITM.ItmsGrpCod] = 101
BEGIN
set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 101) and (len(ItemCode)=7))
set @temp='DRM'+isnull(replicate(0,4-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OITM.ItmsGrpCod] = 102
BEGIN
set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 102) and (len(ItemCode)=7))
set @temp='PKG'+isnull(replicate(0,4-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
And:
DECLARE
@NUM AS CHAR(7)
SET @NUM =
(SELECT RIGHT(MAX(CardCode), 7) FROM OITM)
SET @NUM = @NUM + 1
BEGIN
IF @NUM IS NULL OR @NUM = 0
BEGIN
SELECT 'I0000001'
END
IF @NUM < 10
BEGIN
SELECT 'I000000' + @NUM
END
IF @NUM > 9 AND @NUM < 100
BEGIN
SELECT 'I00000' + @NUM
END
----COMPLETE THE CODE
END
Thanks,
Joseph -
Wondering if something like this is possible...
We have a UDF in Item Master Data that contains our "web site item code" an alternate itemcode we use for sales on our web site.
Is it possible to add a UDF (call it WebCode) to the row level of a Sales Order and create a formatted search that will:
As I type a "WebCode" into the UDF field of Sales Order and then tab off, it will populate the Item No. field with the ItemCode associated with the UDF contents of an Items Master Data.
I might not be explaining the concept correctly. Please let me know if I should clarify anything.
Thanks,
-SteveHi Steve,
Since you already created a UDF (assuming your field name is WebCode) on item master, you can create another UDF under the row level of marketing documents (also called WebCode).
You don't need to type anything. Instead, you can create a FMS to link the item U_WebCode to this new UDF in the Marketing document and auto fresh will do the job.
The FMS for the new UDF looks like:
Select U_WebCode from oitm where itemcode = $[$38.1.0]
Thanks,
Gordon -
Dear Friends
I want to generate a Item Code with the following method :
catgory - 1 digit
costcenter - 3 digit
equipment - 4 digit
srno - 4 digit
for ex
bearing 14" xxx then could sould be 1-100-1001-0001 (110010010001)
rightnow i had given the following code but i am unable to get the last 4 digit based on (category+costcenter+equipment + max(srno) of the perticular category+costcenter+equipment
t:=:catcode||:costcode||:equipcode;
sandyHello,
Assuming that last 4 digit are serial number and will get increase by one depend on three fields as you mentioned. Then try your code like this...
SELECT :catcode||:costcode||:equipcode||(LPAD(MAX(TO_NUMBER(SUBSTR(actual_field_name,9))+1),4,0))
INTO :form_field_name
FROM table_name
WHERE catcode=:catcode
AND costcode=:costcode
AND equipcode=:equipcode;Or if you don't want to generate code on basis of three field then remove the where clause and use only...
SELECT :catcode||:costcode||:equipcode||(LPAD(MAX(TO_NUMBER(SUBSTR(actual_field_name,9))+1),4,0))
INTO :form_field_name
FROM table_name;
actual_field_name this the name of field for which you will generate code.
-Ammad -
How to generate item codes automatically
Hi,
My customer wants that the inventory item code be generated automatically based on its description. The code should have:
- 3 first characters of the description
- A sequential increased number, to make the code unique.
e.g. the item called "Petrol" should have the code "pet004".
To achieve this, I have created a database procedure. So the user that works in "Item Master" form, will fill out "description" field and the "Item" field should be automatically populated based on the return value of this procedure.
Is there any way how to achieve this through personalization?
Or, is there any standard way that Oracle offers for automatic generation of item codes?
Thank youlHi,
You have to do it using forms personalization.
Thanks,
PS. -
Formatted Search is not auto-refreshed when Item Description changes
Hi all,
I have a UDF "Packing Details" at Goods Receipt screen row level.
My formatted search setting is the field should be auto-refreshed when Item No is changed.
1) I press TAB at Item No and choose an Item, Packing Details UDF will auto-refresh. (No problem)
2) However, if i press TAB at Item Description and choose an Item, Packing Details UDF will not auto-refresh. I need to press SHIFT+F2 to make packing details appear.
I try the same setting at Goods Receipt PO, the Packing Details UDF will refresh automatically regardless i choose the item from Item No or Item Description.
Is anyone face this problem before?
Thanks.
Regards,
Lay ChinThanks Gordon.
I have told this to customer before, but they prefer to have 'Refresh' on both Item Code and Item Description.
I think we have no choice but let the customer to choose either one, right?
Thanks.
Regards,
Lay Chin -
How I can know which row is parent item code or child item in matrix?
Hi,
In marketing document, when insert a item into contents page, if it is a BOM then all child item will be inserted into matrix automatically. My question is when i view the rows in matrix how i can know which row is normal master item and which row is a child item row? From the UI, i can only see the child item code looks readonly but how i can know it in my add-on code? I tried to get the edittext box object from item No. cell, but i can't find any difference.
Thanks!
LanSorry, i found an issue when i try to retrieve the BOM Type column value. I am in adding mode, when i insert a BOM with components, the bom type will appears as "Component of a Sales BOM". But in the event, when I try to get the value from this cell (it is combobox), it gives another value which is not same with the one it appears in the matrix. Is anyone know how to solve my problem?
Thanks!
Lan -
Item Category N (non-stock item) in BOM creation - Preq Generation
Hi All
I have a material component that is planned in APO and not in ECC6. We would like to keep the one BOM for the finished good. Problem is that when we perform the backflush in ECC6, the system wants to backflush the material and causes errors due to missing stock.
So I assigned the material as a non stock item in the BOM but the system will auto generate a purchase requisitions for Non stock bom components (item category N) when the process order is created. It is possible to turn off the auto creation of the purchase req for non stock bom components?
I have tried the following:
- Explosion type in item data, created new key with 'Switch off planning' indicator set in system configuration
- created new 'Z' item category with inventory management de-selected
Both approaches causes system error: Puchase data of material in not maintained
I also tried leaving as a stock item with the bulk material indicator selected in the item data. This does not work as the cif will then exclude the component when data is transferred to APO
Funny enough, the system does not generate a purchase req for non stock bom items when using Repetitive Manufacturing. Any help will be greatly appreciated
kind regards
Grant brockelbankHello Vivek
Thank you for your response
The item is a non stock item. I do not want this item to be backflushed at all. This can be achieved using the 'N' non stock item category but the problem is that the system will attempt to generate a purchase requisition when the process order is created.
I do not want the system to generate a purchase req in ECC6 as this item is a planning material that is planned in APO (used for medium to long term planning in a simulation version). We are hoping to use the one Bom for ECC6 and APO planning. The generation of the purchase reqs is a bit of a waste as we will never convert them and there is potential to cause issues for purchasing.
Any other thoughts?
Thanks again for your help
kind regards
Grant -
Report to find Bid Invitation against an item code
I have an item code(product master) in SRM. I want to find whether any Bid Invitation exists against this item code? Is there any report or function module to find??
regards
HarshbHi,
YS,
I must thank you for taking interest in my question.
I tried to test the FM BBP_PD_BID_GETLIST; I put product-id in the Import parameter I_ITEM_ORDERED_PROD; But it is not bringing any result, where as Bid inviation exists against the product. Then I put product id in import parameter I_ITEM_PRODUCT, but still no result. Can you pl. suggest what is wrong?
regards
HARSHB
Maybe you are looking for
-
How to display the transport button in the screen of stms
Hi expert, I can not see the transport button in my PRD system, but I can see it in my QAS system. PRD System: QAS System: How can I adjust to display the transport button in my PRD system. Thanks a lot,
-
Cannot purchase prints and send them to APO address
I'm trying to purchase prints using the new Photos application. When I go to the Checkout and use an APO address it first warns me that it cannot Confirm the address, but I can click continue to bypass this. The problem is the next dialog says "Inv
-
Control hints for AM Client interface
Hello, I am exposing a method in Application module through user interface. I want to configure the parameter labels as AM control hints. Is it possible? where can I set them? Thanks Ponraj
-
I have to print a check: The check will be split into two sections: the actual check and the remittance section. The remittance section must contain the details of all invoices paid with that specific check. When the payment includes remittances
-
Somebody knows the link to download of Illustrator CC for MAC?
Somebody knows the link to download of Illustrator CC for MAC?