Sp_transaction notification for serial number duplication

Hi All
I need your help with this sp , i found it here on the portal and its not working 100% please check and see if you guys can assisit me.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25),                     -- SBO Object Type
@transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error  int                    -- Result (0 for no error)
declare @error_message nvarchar (200)           -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
declare @val nvarchar (1200)           -- Error string to be displayed
declare @chrin nvarchar(30)
declare @item nvarchar(455)
declare @SysSer nvarchar(455)
declare @qry nvarchar(255)
declare @IntSer nvarchar(32)
declare @whs nvarchar(8)
declare @count int
declare @base nvarchar(6)
set @count = 0
--     ADD     YOUR     CODE     HERE
IF @transaction_type IN ('A','U') AND (@object_type = '94' )
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
set @SysSer = substring(@list_of_cols_val_tab_del, len(@item)+1, 30)
--set @qry = 'select intrserial from osri where itemcode =' + @item + ' and convert(varchar,sysserial) = convert(varchar,' + @SysSer + ')'
select @IntSer = intrserial from osri where itemcode = @item and convert(varchar,sysserial) = convert(varchar,@SysSer)
set @error_message = @IntSer
set @error = 1
select @error, @error_message
END
select @error, @error_message
END
and I have serial number checking on every transactions.
Rgds
Bongani

Here is a working SP
declare @val nvarchar (1200)           -- Error string to be displayed
declare @chrin nvarchar(30)
declare @item nvarchar(455)
declare @SysSer varchar(10)
declare @qry nvarchar(255)
declare @IntSer nvarchar(32)
DECLARE @count int
set @count = 0
--=========================
--S/N Duplication Check
--=========================
IF @transaction_type IN ('A','U') AND (@object_type = '94' )  -- For Goods Recipts
BEGIN
set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
set @SysSer = ltrim(rtrim(substring(@list_of_cols_val_tab_del, len(@item)+2, 30)))
select @IntSer = intrserial from osri where itemcode = @item and convert(varchar,sysserial) = @SysSer
SELECT @count = COUNT(*) FROM OSRI WHERE INTRSERIAL = @IntSer
IF @count > 1
BEGIN
set @error = 1
set @error_message = N'Duplicate S/N was found in the system for Item No.' +@item +' S/N : ' + @IntSer
END 
END
Regards
Bongani

Similar Messages

  • Photoshop CC keep asking for Serial Number

    Photoshop CC keep asking for Serial Number. Adobe has charged my credit card 5x since June, but my Photoshop CC still doesn't work.

    This is also happening to me.
    I've been a subscriber for the last year and a bit.
    I've moved to a new computer at home and since then I've been getting this prompt even though I'm signed in, everytime I've opened photoshop. Now the trial has expired and I'm cut off from using it.
    This is total BS.
    I've spent the last 2.5 hours going thru every adobe support doc they've posted. Nothing works. Two hour wait on the phone, 2.5 hour wait to chat (if I'm lucky and the window manages to stay open).
    Oh hey, I can see my breach notification from here too!
    You are on thin ice with me Adobe.

  • Mac OSX Photoshop CS6 keep asking for serial number

    Hi, I don't know why, but since few days ago, my photoshop CS6 started to pop up with the trial message and ask me to enter serial number. However, I'm on a one year subscription for photoshop CS6 only, there is no serial number.
    I opened the software, and choosed "lincese this software" and then signed in with my adobe ID.  After that, the message ask me for serial number.  This didn't happen before.
    My systme is :
    Now it says I only have one day for the trial. Please help me to resolve this.
    Thanks
    Eric

    @CKPAD.co - The Adobe ID you are using to post here has never signed up for the Creative Cloud, not even a free/trial account. Are you using a different Adobe ID for a Creative Cloud subscription? If not this would be the correct behavior. The 30 day trial ends and you can either puchase a perpetual license (serial number) or a Creative Cloud subscription.
    Feel free to follow up with me by email at [email protected] since I do not want you share private information like your email address in public forum.

  • Payment made for lightroom and photoshop joint package, still prompted for serial number

    payment made for lightroom and photoshop joint package, still prompted for serial number which I have not been given. what do i do next?

    Hi ,
    I think you have downloaded the program directly from adobe. As you have the Photography plan, then you have to download this from Creative Cloud Desktop then they will be activated through with your email address. Then it will not ask for serial number.

  • Serial number? I have a MacBook Air (mid 2011). When I go into about this Mac, all it says for serial number is systemserial

    Serial number? I have a MacBook Air (mid 2011). When I go into about this Mac or any of the other ways to look up the serial #,all it says for serial number is systemserial#. Is there a way to fix this?

    About This Mac will show something like this:
    Click on More Info... leads to some thing like this:
    Serial Number is the second line from the bottom.

  • Problem on forms for serial number generation with last record next_record.

    Hi Experts,
    currently i'm facing one problem like :
    i'm populating one receipt detail in Multi block , like when user key in one receipt number that time record should go in first record ,and if they key in second receipt number then record should go in second record . mean to say every time record go in last record ..but the problem is i want to generate Serial no correspondence to every last record ..
    here is my approch :
    cursor c1 is
    select * from table
    where cname =:blk_name.clm_name.
    Last record;
    next_record;
    for v1 in c1 loop
    processed record;
    next_record;
    end loop;
    last_record;
    go_block(___);
    first_record;
    :sno := system.cursor_record ;
    next_reocrd;
    end loop;
    first_record;
    And in block level i'm writing code for Serial number generation when user key in manual entry for receipt detail:
    :blk_name.coulumn_name := :system. cursor_record;
    so in this approach their is no problem it is working properly but the problem is that
    when user fetch one receipt automatically and then after he want to enter next record manually and he decided to go in detail block ,
    and once he reached in detail block that time block level trigger i firing .ans serial number 2 generated and then suddenly he came to know no i want to fetch next record automatically mean to say now user going again master block and fetching next receipt detail ,
    but the problem is when user leaving seccond sr no and going in master block and population next receipt detail that time cursor going on 3 record
    but logically have to replace the second Serial no and generate the again serial number 2 record population .mean to say its not refreshing last_record..
    so i'm appreciating is anyone if came accoross this type of issue please corrrect my code and send updated code ..plsssssssssssssssssssssssssssssss
    Thanks
    Abhishek
    [email protected]

    hi
    I put this below code on when_new_record_instance on block level..
    :blk_name.column_name :=system.cursor_record;
    so can you please help me.....
    Thanks
    Abhishek

  • I have an invoice that I paid to use photoshop and now it is asking for serial number however it does not show a serial number when I log in

    I have an invoice that I paid to use photoshop and now it is asking for serial number however it does not show a serial number when I log in

    Please then use your web Browser  address http://www.adobe.com/  and sign in with your Adobe User ID and Password to your account the has your Subscription and use https://www.adobe.com/account/my-products-services.html capture the page which shows you have a subscription like I showed you I have.
    Open Adobe Creative Cloud desktop application use the APP tab and capture that scree to show Photoshop is installed and up to date like I did. Capture that screen. Show us you have installed Photoshop and its up to date.
    Open Photoshop and use menu Help it should show tha its activated because there will be a menu item Sign Out. If it is Sign In, Sign in  using the account that has the subscription the one you used above to Activate Photoshop.

  • Lightroom 3 asks for serial number launching in non-admin account

    The following information was provided by Carey Burgess (Adobe Employee):
    Does Lightroom 3 launch and work fine in an admin account, but when you launch the application in a standard (i.e. non-admin) account it asks for a serial number?
    If so, then it is likely due to a file permissions issue either in the original (admin) account or with the standard account.
    (Although you need administrator access to install Lightroom, and you do need proper access permissions to your photos, you should be able to run Lightroom without issue in a standard user account.)
    Lightroom 3 stores registration data (the serial number) in a file called Lightroom 3.0 Registration, which is stored by default in one of these locations:
        * Mac OS: /Library/Application Support/Adobe/Lightroom
        * Windows XP: C:\Documents and Settings\All Users\Application Data\Adobe\Lightroom
        * Windows 7/Vista: C:\ProgramData\Adobe\Lightroom
    -  Check for the registration file in the appropriate location for your system.
    If the file does not exist in that location, then ensure you are logged in with the admin account (the one where Lightroom doesn't prompt for a serial number) and check the user-specific location instead:
        * Mac OS: /Users/YOUR USER NAME/Library/Application Support/Adobe/Lightroom
        * Windows XP: C:\Documents and Settings\YOUR USER NAME\Application Data\Adobe\Lightroom
        * Windows 7/Vista: C:\Users\YOUR USER NAME\AppData\Roaming\Adobe\Lightroom
    If the file exists in the user-specific location instead, then I would suggest that you ensure that you have quit Lightroom, and then move the registration file from the user location to the default system-wide location. Lightroom should now no longer prompt for serial number when you open it from a non-admin account.
    If the registration file did (or now does) exist in the default system-wide location, but you are still being prompted to enter a serial number when opening Lightroom in a standard user account, then that account does not have sufficient access permission to the registration file.
    To resolve this aspect, there are two possible solutions (the first being the recommended solution):
    1. Change the access permissions on the Lightroom folder that contains the registration file to grant "Read" access for the standard user account. (You can do this for each account individually, or you can use a broader group like Everyone.)
    For more information about changing permissions, see one of these articles:
        * Windows XP: http://support.microsoft.com/kb/308419#4
        * Windows Vista/Windows 7: http://windows.microsoft.com/en-us/windows7/What-are-permissions
        * Mac OS: http://docs.info.apple.com/article.html?path=Mac/10.6/en/8342.html
    2. Copy the registration file from the system-wide location to the user-specific location for the standard user account. (You would need to repeat this step for each standard user that needs access to Lightroom.)
    Reply here if these steps do not resolve your issue, or if you have any questions.

    Months ago, I had a routine clearout of old software boxes etc and chucked out my Lightroom 1.0 box. A couple of weeks ago I reinstalled Lion on my mac to find that I cannot register Lightroom. I have the 3.0 upgrade serial, the 2.0 upgrade serial, but the 1.0 was on the box..
    I followed the instructions above to find the files in crashplan form before the fomat that hold the registration details. I have tried placing them in the location described, but it doesn't seem to work.
    The serials (or something) are in the file, but given in the string that is difficult to decipher - and doesn't work in the registration screen, wrong size and a mix of letters and numbers rather than just numbers as my 3.0 serial is.
    Any suggestions for what I could do? Could I send the strings in to Adobe to be deciphered? Perhaps move files around a bit more?
    Thanks in advance,
    Rog.

  • Why doesn't pop-up window for serial number open?

    My mother has bought the Lightroom 5 CD and is installing it but for some reason when she clicks ther installed Lr icon as told in your instruction, the serial number is not requested. The whole window with the empty boxes for serial number does not appear. I'm not sure what she has done earlier but she is saying she hasn't been able to give any serial number to her Mac (she has had earlier version in other MAc but is facing major problems with this new Mac and Lightroom, she has had trial version in this Mac). So, could the problem be that she has removed some Adobe Acrobat reader, Java, Adobe ActiveX or something and that's why the pop up window for serial number does not appear or has she managed to activate something which is blocking something or if she has already put serial number somewhere could that be blocking the process? How to change the serial number? Does Lightroom require some other sw like cloud or sth?

    Hi Sari,
    Kindly try the below mentioned steps.
    Launch Lightroom
    Click on Help.
    Click on Lightroom Registration
    Follow the on screen instruction.
    Thanks,
    Atul Saini

  • Aperture purchased from the App Store asking for Serial Number?

    Aperture purchased from the App Store asking for Serial Number?
    Has anyone seen this? I just updated the app and now I can't get in.
    I don't understand.

    First thing to try is delete the app. Open the Mac App Store and the status in the Purchases section should update to "Install". Click to download the full app rather than an update.

  • IO 229 - Batch for serial number 1234 (BBB) differs from document batch AAA

    Hello All,
    We use batch management for serialized materials only at our central plant. For all other plants, there is no batch control. Sometimes we need to return materials back to the central plant but with a different batch number.
    When we do two step stock transfer 303 / 305, we receive the following error message if we don't use the original batch number.
    "IO 229 - Batch for serial number 1234 (BBB) differs from document batch AAA".
    However, when we use one step plant to plant stock transfer 301, there is no error message. The batch number is also updated correctly in IQ02.
    I wonder if there is any configuration to use 303 / 305 with different batch numbers.
    Thanks,
    Hakan

    Thanks Arminda.
    64044 recommends to use 309 to change the batch, which works but this is an additional step.
    Currently 1 step plant to plant transfer i.e. 301 doesn't require this additional step. It updates the batch information with no problem.
    Is there any configuration option to change the behavior of 305, so that we don't have to do an additional movement?

  • Table Name for Serial Number

    Hi Gurus
    Pl let me know the Table Name for Serial Number what we are creating in IQ01 /IQ04 Transaction for Material
    K.Prabakaran

    Hello Prabakaran,
    the serial numbers to a delivery are found in the SER01 and to find the link between serial number and delivery you need the OBJK table. Here you can find the correspondent equipment.
    If you are looking for serial numbers for a production order these can found in the SER05.
    SER00  Generic table for serial numbers
    SER01  Serial numbers assigned to a delivery
    SER02  Serial numbers assigned to a guarentee
    SER03  Serial numbers assigned to a material document
    SER04  Serial numbers assigned to an inspection lot
    SER05  Serial numbers for a production order
    SER06  Serial numbers for Handling Units
    SER07  Serial numbers for Stocktaking
    SER08  serial numbers for  Orders (SD)
    The assignment of serial numbers to a production order can be done either via transaction CO02 or at the latest when the GR from Production is made.
    I hope that this information clarifies the issue.
    Regards,
    Isabelle

  • Ive downloaded csk6 design and web premium trial its asking for serial number

    I've downloaded cs6 design and web premium trial its asking for serial number,  WHERE DO I GET SERIEL NUMBER FOR TRIAL

    There are no serials for trials. it simply has expired. Read this:
    Adobe trial software expired early
    Mylenium

  • Cc lightroom trouble asking for serial number

    I purchased the cc photography package. I was able to download and open Photoshop but unable to open lightroom. It ask for a serial number. I tried the trouble shooting tips still having trouble.

    Hi Kirstygem,
    If the above mentioned steps have not helped , can you please try the below mentioned article. Although its for LR3 but its still effective for the newer version .
    Lightroom 3 asks for serial number launching in non-admin account
    Updated kb For LR5 : Preference and other file locations in Lightroom 5
    Do let us know if this worked for you or not .
    Cheers,
    Kartikay Sharma

  • ARD asking for Serial Number after Upgrade to OSX 10.9 and ARD 3.7?

    Hello All,
    I bought ARD 3.6.1 back in 2012 from MAC Store. Yesterday, I decided to upgrade to OSX Mavericks and the upgrade forced ARD to update to 3.7 from 3.6.1 and now ARD is asking for serial number...  Never had a Serial Number since I bought it from Mac Store. Anyone with same problem?
    Many Thanks in Advance!
    App Store Update says I have 3.7 already installed.

    Not sure how that would happen but you should be able to revert to the Mac App Store version with the following steps:
    1. Launch the App Store app
    2. Go to the Purchases secton and verify that Apple Remote Desktop is showing in your list
    3. Assuming it's in your list, delete Remote Desktop.app from /Applications
    4. Verify that Remote Desktop.app is not installed on any other mounted volumes using Spotlight
    5. If it is installed then either unmount those volumes or delete the app from those other locations
    6. Go back to the Purchases section of the App Store app
    7. If Apple Remote Desktop is shown as "Installed" then select "Reload Page" from the "Store" menu
    8. The entry for Apple Remote Desktop should now give you the option to "Install"
    9. Click "Install"
    After installation you should have the correct Mac App Store version that does not prompt for a serial number.

Maybe you are looking for

  • Error when installing Lion on empy HD: "Couldn't find app store version, falling back to hardcoded"

    I've run in to a problem that is making me tear the hair from my head. I'm hoping for your help! Short story: I'm trying to install OS X Lion on my 27" iMac. I've erased the HD using Disc Tool in recovery. HD shows no errors. I've tried Internet Reco

  • Considering using 20" Imac with larger external monitor - good idea?

    I've just returned my 24" Imac for a refund due to the uneven brightness issue. I want a set up for my illustration work, but can't justify the price of a mac pro + monitor. Therefore I'm considering a 20" Imac 2.4 GHZ, and connecting an external 23/

  • URGENT - ora:processxslt Error

    I am using the ora:processxslt function in my assign and below is the following syntax: <copy> <from expression="ora:processXSLT('FormatDate.xsl',bpws:getVariableData('DFUReceieve_Read_InputVariable_1','OrderDemands','/ns6:OrderDemands/ns6:OrderDeman

  • Lightroom 2 sharpen settings for scanned slides

    Hi, I'm catching up on scanning a large number of 35mm slides (shot mainly on Fuji Velvia 50, and scanned on a Nikon Coolscan  8000ED) and importing them into Lightroom so I can manage them from there.  Can anyone provide advice on suitable sharpenin

  • Problem width topLink cache

    I have a problem width TopLink. I update a record width a native query: Query q = em.createNativeQuery(sql); q.executeUpdate(); After this when I try to read the records width (in other moment of my program) ordenes = (List<com.snack.ordenAp.persiste