on 01-08-2015 8:03 AM
hello
I have a User Defined Field of 10 characters on the batch details screen.
I want to force the users to do the following when capturing info in the field.
e.g. AAA-123-BC
characters 1-3 must be Alphanumeric
characters 4 - must be a dash
characters 5-7 - must be numeric
characters 8 - must be a dash
characters 9-10 characters must be Alphanumeric
Is there a way to force this on the Stored Procedure or using B1UP?
Thanks in advance
Janice
Hi Janice,
As per your custom requirement, you must create Transaction Notification for this requirement.
Try below Transaction Notification for Goods Receipt PO Screen
IF @object_type='20' AND @transaction_type IN ( 'A','U')
begin
IF EXISTS (SELECT OPDN.DocEntry from OPDN Left Outer Join OIBT on OPDN.DocEntry=OIBT.BaseEntry
WHERE OIBT.BaseType=20 and OIBT.BATCHNUM not LIKE '%%%-%%%-%%' and OPDN.DocEntry = @list_of_cols_val_tab_del )
BEGIN
SET @error = 121
SET @error_message = 'Please Enter Batch Number in Proper Format'
END
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nishit/Manish
The client UDF field is as follows :
1-96
A-J
1-3
Sometimes at the end "RW","LB","QC".
e.g.
1 A 1 | 2 A 1 | 3 A 1 | 4 A 1 | 5 A 1 |
92 A 1 | 93 A 1 | 94 A 1 | 95 A 1 | 96 A 1 |
5 J 3 LB | 5 J 3 RW | 1 J 3 QC | 2 J 3 RW |
I tried the following in the sbo transaction notification, but it is not working.
IF EXISTS (
SELECT OPDN.DocEntry from OPDN Left Outer Join OIBT on OPDN.DocEntry=OIBT.BaseEntry
WHERE OIBT.BaseType=20 and OPDN.DocEntry = @list_of_cols_val_tab_del
and ( SUBSTRING(OIBT.U_BinLoc,1,1) not like '[1-9]'
(SUBSTRING(OIBT.U_BinLoc,1,2) not between '10' and '96'
SUBSTRING(OIBT.U_BinLoc,1,2) not like '[A-Z]')
(SUBSTRING(OIBT.U_BinLoc,3,1) not like '[A-Z]' or SUBSTRING(OIBT.U_BinLoc,3,1) not like '[1-3]')
(SUBSTRING(OIBT.U_BinLoc,4,1) not like '[A-Z]' or SUBSTRING(OIBT.U_BinLoc,4,1) not like '[1-3]'))
@ERROR = 1, @error_message = @list_of_cols_val_tab_del
Anyone have any feedback on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janice
Try this
IF @object_type='20' AND @transaction_type IN ( 'A','U')
begin
IF EXISTS (SELECT a.docentry from
OPDN a left join OIBT b on a.DocEntry=b.BaseEntry
WHERE b.BaseType=20 and b.BATCHNUM not LIKE '%%%-%%%-%%' AND A.DOCENTRY = @list_of_cols_val_tab_del )
BEGIN
SET @error = 121
SET @error_message = 'MK - Enter the Batch Number Based on the formatt - AAA-123-BC'
END
END
--Manish
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.