Prevent Duplicate Job Card Number

Hi, I am using the below SBO code which tries to block users inputting duplicate job card number when issuing items from after sales warehouses, but it doesn't seem to be working.
6)Block Duplicate Job Card No's in After Sales Deliveries
IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'60')
Begin
IF  EXISTS(SELECT T0.DocEntry FROM dbo.[@SBO_SP_NOTIFICATION] T0 where IsNull(T0.U_Active,'')in('Yes') and T0.U_QueryNo = 'GI012') 
BEGIN
IF EXISTS (SELECT T0.DocEntry FROM [dbo].[IGE1] T0, dbo.[OIGE] T1 WHERE T1.U_DocType = 'After Sales Delivery' AND T1.DocEntry = T0.DocEntry   AND  T1.DOCENTRY= @list_of_cols_val_tab_del)
BEGIN
declare  @JCNo int
set @JCNo=-1
set @JCNo=(SELECT T0.LineNum+1 FROM IGE1 T0
WHERE T0.DocEntry =@list_of_cols_val_tab_del
and exists(select linenum from IGE1
          where WhsCode in ('NAWW_KE','MASW_KE') and BlockNum=T0.BlockNum
               and DocEntry<T0.DocEntry) )
If @JCNo<>-1
begin
SET @error = 10
SET @error_message = N'SBO: GI012-Duplicate Job card No '
end
end
END
END
Please help.

Thanks,
It now works after I added unique constraints to each of the fields.
Google results showed me that ORA-00001 is Oracle's Duplicate message and I added a condition in the SQLException Catch area and it catches all my Duplicate entry attempts and shows message to the user.
Here is what I have and would like to know if this is an efficient way I am doing this??
try
// db stuff
catch (SQLException sqle)
    String message = sqle.getMessage();  
    if (message.indexOf("ORA-00001") != -1)
        out.println("Duplicate Data entry.");  
    else
      out.println("some other ORA error");  
}

Similar Messages

  • Hi i do not have a job or bank account. i am a student. how can i create a free apple account. without giving a credit or debit card number.

    how do i create a free apple account without giving a credit card number.because i am still in school.

    These are user-to-user forums, you are not talking to iTunes Support nor Apple.
    The link that rmgman gave has instructions for how to create an account without giving credit card details - if you use them when creating an account then you will be able to download items from the store without having to give card details.

  • How do I prevent computer from remembering my credit card number?

    I want my computer to NOT remember my credit card number. When I go to renew a subscription on line my credit card number appears automatically. I do not want this to happen.

    Hello Robin.
    Hopefully this support article is what you need:
    https://support.mozilla.com/en-US/kb/Form+autocomplete
    In any case, your form autocomplete information is safe and will not be transmitted to outside your computer. Now, inside your computer (when someone else uses your Firefox profile), it's not as secure, but it's still fairly secure.

  • Can't Change Credit Card Number, told to reregister but can't find reregister button

    Hello,
    Sorry to be a trouble, But I can't change my credit card # (because BBapps will not allow me to log on to control panel to do so. Made the mistake as a 1st timer to assume would ask for credit card number after I purchased Documents to Go.
    Did not ask, but charged the purchase to the CDMA number from former owner of my BBS2. I then erased the downloaded Docuiments to Go as I was not intending to charge some one else's card. Need to change credit card number to square this away. This is my first BB machine and I find that I don't know all the needed things.
    Can someone point out how to reregister so I can add my credit card #
    OR
    Can someone point out how to change the current assigned Number/credit card charge in control panel.(does not allow me in with my password that works for downloading free apps)
    Can still dow free programs, but cannot buy upgrades. Frustrating,  THanks, Ty Parr, Ph,D,

    Hello,
    I am more than willing to pay for the Documents to Go app on my own credit card, the problem is getting to  it. I don't intend to have Blackberry service, but surely this does not prevent paying for and down loading programs for my device, If I will wipe the device without a new CDMA number I suspect that will not allow me to to offer a credit card number and get the Documents to Go program as well as others. Why is it impossivle to buy programs for a blackberry without a blackberry service contract for a CDMA number? This really seems very rigid since the BBS2 is so long out of date. There must be plenty of individuals that are doing this who had the wisdom to give a credit card number when they registered - I did not realize this was required as I routinely buy things on the net AND THEN give CREDIT CARD # to compelete the purchase. Is this some sort of Catch 22 situation ?
    I like this phone and don't want to give it up. If necessary, I will buy a second BBS2 and try to register that WITH A CREDIT CARD number so that I Can use this machine. This an endless Catch 22?   I don't want a CDMA service that is very hard to get outside the USA. 
    Can I register my BBS2 if I have a T-Mobile plan for the CDMA number (which I will never use and for which I will pay for programs with a separate credit card number ?). ?  Otherwise I have a wonderful piece of junk because of arbitraty and rigid rules that are also preventing Blackberry profits as well as App producer profits .  If I can't solve this, I will have to re-examine whether I want this machine that I still really like. 
    Again thanks, If you can help me navigate this seeming endless Catch 22 ! 

  • How can I take out my credit card number from purchasing anymore app

    How can I take out my credit card number from the App Store to prevent purchasing anymore apps

    How to Get Apps From the App Store Without a Credit Card
    http://ipadhelp.com/ipad-help/how-to-get-free-apps-from-the-app-store-without-a- credit-card/
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    http://support.apple.com/kb/ht2534
    Why can’t I select None when I edit my payment information?
    http://support.apple.com/kb/ts5366
    If None is not available - On your computer launch iTunes and click “iTunes Store” in the left navigation pane. Click the “down arrow” next to your name at the top right side of the page and click “Account.” Enter your username and password and click “View Account” to log into your account information. Next to your Payment Type, click “Edit.” Select the “None” button and click “Done.” Confirm that your card has been removed by returning to the Apple account information screen. Under Payment Type, it should say that there is no credit card on file.
    iTunes Store: Changing your payment information
    http://support.apple.com/kb/HT1918
    iTunes Store Accepted Forms of Payment
    http://support.apple.com/kb/HT5552
     Cheers, Tom

  • Hi when i am giving credit card number in payment gatway it should change to password dots , how it is possible, which plug in i have to use

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/891259]]</blockquote>
    Hi when i am giving credit card number in payment gatway it should change to password dots , how it is possible, which plug in i have to use for this feature...

    Hi vishwanath123-
    Most websites when asking for your credit card do encrypt your password, but it is not based on a plugin. The website is responsible for securely receiving and storing your data. If you do not trust the website is secure, be careful with your data.

  • Multiple Duplicate Jobs in Solution Manager.

    Greetings,
    We see duplicates of Job CCMS_CPH_AGGR_DATA_UPDATE and CCMS_CPH_RAW_DATA_UPDATE in our Solution Manager.
    I understand these jobs are used to transfer data from the CCMS monitoring infrastructure to the associated BI of the SAP Solution Manager. The data is written directly to a number DSOs. Job CCMS_CPH_AGGR_DATA_UPDATE should be scheduled once every day and Job CCMS_CPH_RAW_DATA_UPDATE should be executed every hour.
    However, we see huge number or duplicate jobs. I wanted to know if it’s alright to delete the duplicates?
    Thank you,
    Haseeb Ahmed.

    Hi Roland, Thanks for your reply. These jobs are completing successfully and No errors have been recorded. In our Solution Manager System, we see Job CCMS_CPH_RAW_DATA_UPDATE and CCMS_CPH_AGGR_DATA_UPDATE has been created multiple times by user SM_EXTERN_WS. There are like hundreds of same jobs created. Since these are weekly and daily jobs, it does not make sense to keep them all. I wanted to know if its okay to clean-up the duplicates or not? I don't understand why duplicate jobs were created and is there a specific case when once of them will be active? Thanks, Haseeb Ahmed.

  • Auto fill is now storing my security number as well as my credit card number. How can I stop this? Thanks

    I've been concerned for sometime about the amount of information that autofills on forms but failed to find security settings to prevent this. Today I find that not only my credit card number but also my credit card security number was there for autofill on a website that I was using for a purchase. I don't think I have ever used that site before but I believe it to be safe.

    If you want to clean your browser's previous remembered private data. You can just follow these steps:
    # Click "Tools" in the menu bar
    # Choose "Options".
    # Turn to the "Security" tab
    # You can cancel the tick in front of "Remember website passwords".
    # Then click the "Saved websit passwords" button, and then click the "Remove all" button.
    May this answer help you.

  • Preventing duplicates in Aperture?

    I'm using the Import function (not dragging from the Finder) JPG photos and I have the box checked "do not import duplicates" - yet when I import files into the same project I'm getting duplicates and they are the exact same file name.  Is there some other setting I need to have checked or this a bug - does anyone know?  It is definitely creating a lot of manual work to try and get rid of the duplicates once I've completed the import.  Thanks for any help anyone can provide. 

    If you import from the same card into the same project, then it shouldn't duplicate. That said, this functionality is imperfect.
    The best way to prevent duplicates is to not continually import the same files. When you import, you have the ability to choose what files you import; you should only select new files.

  • Assignment of multiple duplicate credit card asignment

    In oracle(11i) istore ,i had book ordered the items for two times using same credit card number, but in customer bank account window having the two duplicate credit card assignment for the same bank account . weather this is the oracle standard process? .
    Oracle Standard process_order API creates new entry for every transaction or update the exiting bank account for using the same credit card number.
    Thanks in advance
    prabu

    Dear Ramesh,
    It is not possible to assign multiple credit control areas to the single company code but you can assign single credit control area to the multiple company codes.
    Relation bet ween company code and credit control area is
    Many  to One
    But not
    One  to Many
    I hope this will help you,
    Regards,
    Murali.

  • Manufacturing project - printing job cards

    Hi All,
    My client has manufacturing projects, which are used to manage the job floor activities. The client wants to print job cards from SAP PS that will have the PS project#, WBS, a legacy code, network activity number/description, sales order number among a few other fields (including the activity long text). Could you please suggest if anyone had encountered a similar requirement?
    If so, should we go for a smartform in SAP to do this? Any suggestions would greatly help.
    Regards,
    Venkata.

    I have never come across with such kind of requirement, but i think it is possible to print shop papers from PS.
    Check the control key settings of network activity, you have some check boxes for priniting in that and also check OPS0 - Print control for Shop papers. This will help you to start with the process.

  • Prevent duplicate data

    I would like to make sure there are no duplicate data entries in my JSP that populates an Oracle database with a table called MainTable. MainTable has an Id field that is the primary key, ValData with a varchar data type, Fid and Fid2 are number data types. Fid and Fid2 are foreign key values that are taken from another table.
    Id   ValData   Fid   Fid2
    1    abc         34    2
    2    efg          23    34
    3    zeo         25    43Sometimes someone can enter duplicate data and the ValData, Fid and Fid2 will end up like this:
    Id   ValData   Fid   Fid2
    1    abc          34    2
    2    efg           23    34
    3    zeo          25    43
    4    zeo          25    43Is there anything in Java I can implement to prevent duplicate data entry in the above example?

    Thanks,
    It now works after I added unique constraints to each of the fields.
    Google results showed me that ORA-00001 is Oracle's Duplicate message and I added a condition in the SQLException Catch area and it catches all my Duplicate entry attempts and shows message to the user.
    Here is what I have and would like to know if this is an efficient way I am doing this??
    try
    // db stuff
    catch (SQLException sqle)
        String message = sqle.getMessage();  
        if (message.indexOf("ORA-00001") != -1)
            out.println("Duplicate Data entry.");  
        else
          out.println("some other ORA error");  
    }

  • SSRS subscription creating duplicate job

    We have this sporadic problem where when we go in to save an edit on a SSRS report subscription, it gives us a duplicate job number error.  When I look at the Jobs in the Agent, there are duplicates, so I need to manually delete both duplicate jobs,
    then the subscription save will work.  If we delete just 1 of the jobs, the issue seems to clear for a while, but then reoccurs.  This has happened to us on multiple reports, but not consistently.  The subscriptions look fine.  Has anyone
    else run into this?  Any ideas what is causing this to happen?

    I have the issue with version 10.50.1600.1 where one unique subscription ID has created three corresponding SQL jobs with the same name but unique job IDs. When I attempt to execute the job manually via SSMS, i.e.  exec
    sp_start_job@job_name
    =
    '0E02285B-4D85-4F5C-92C3-74F44F27B5ED', SQL Server throws the following error:
    Msg 14293, Level 16, State 1, Procedure sp_verify_job_identifiers, Line 54
    There are two or more jobs named '0E02285B-4D85-4F5C-92C3-74F44F27B5ED'. Specify @job_id instead of @job_name to uniquely identify the job.
    So it would be helpful to know the root cause to avoid the same issue in the future.
    Thanks,
    Ben Lezin
    Ben Lezin

  • Preventing duplicate rows insertion

    suppose i have a table with 2 columns
    no constraints are there
    then how i will prevent duplicate rows insertion using triggers.

    but i tried to solve the poster's requirement.yes, but the trigger does not solve it.
    The example you posted above, try this:
    do the first insert in your first sql*plus session, and then without committing, open another sql*plus session and do the second insert.
    Do you see an error?
    SQL> create table is_dup(x number, y varchar2(10));
    Table created.
    SQL> CREATE OR REPLACE TRIGGER chk
      2      BEFORE INSERT ON is_dup
      3      FOR EACH ROW
      4  BEGIN
      5      FOR i IN (SELECT * FROM is_dup)
      6      LOOP
      7          IF (:NEW.x = i.x) AND
      8             (:NEW.y = i.y)
      9          THEN
    10              raise_application_error(-20005, 'Record already exist...');
    11          END IF;
    12      END LOOP;
    13  END;
    14  /
    Trigger created.
    SQL> insert into is_dup values(123,'MYNAME');
    1 row created.
    SQL>
    SQL> $sqlplus /
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 23 10:17:07 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> insert into is_dup values(123,'MYNAME');
    1 row created.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from is_dup ;
             X Y
           123 MYNAME
           123 MYNAME
    SQL> commit ;
    Commit complete.
    SQL> select * from is_dup ;
             X Y
           123 MYNAME
           123 MYNAME
    SQL>

  • Changing credit card number

    I got this email today. What am I supposed to do?
    Dear John,  There appears to be a problem with your current billing method. This may prevent the automatic renewal of your subscription for NYTimes.com + Tablet APP. To update your billing information and avoid interruption of your subscription, or to turn off auto-renewal, click below and sign in to your account.
    Regards,
    The iTunes Store team
    Apple Inc.
    You can find the iTunes Store Terms of Sale and Sales Policies by launching your iTunes application and clicking on Terms of Sale or Sales Policies
    Answers to frequently asked questions regarding the iTunes Store can be found at http://www.apple.com/support/itunes/store/
    Sooo, I logged into the iTunes Store from my Windows XP machine using Firefox, and hoped I could find some help on this topic.
    Well, the answer is, no, I could find no help. What happened is that I had to change my credit card number because I lost the one I had entered as the place to bill Apple, Inc. charges, which there are a lot of, right?
    So, WHERE DO I GO TO CHANGE THE CREDIT CARD ON MY ACCOUNT?
    Where do I go to change the credit card number on my Apple Store account?
    Seems like a simple task.
    On Apple I find it to be very difficult.
    I will try logging in from my iPad 4 to see if I can get anywhere. I'm skeptical. If I don't get anywhere, what next. Have I lost my ability to use my iPad?
    WHERE CAN I GO TO TALK TO A LIVING<, BREATHING PERSON?

    No, it is not difficult. You log onto your iTunes account, and under Account>Payment type, you click on Edit and change your billing info:
    http://support.apple.com/kb/ht1918
    To turn off your auto renewing subscription:
    http://support.apple.com/kb/ht4098
    Cheers,
    GB

Maybe you are looking for

  • Need to upgrade my hardward...advice please?

    BeeJay just answered a similar question, but this is slightly different. Help is appreciated... The new Mac Pros are up, which I'm sure we've all seen, and I have been holding out. I'm running currently, Logic 7, on dual 2.3G processors, on a G5, 10.

  • Smart form question

    Hi, there 1. When i print the header , some issue happened. outputting ========= , how to output the line, which is not broken line 2. Date is always not correct , it always depend on client data configuration. 3. Why i use the sys page, the '*' will

  • XML publisher multiple templates in a single report

    Hello We are currently implementing PeopleSoft benefits where the user will have an option to select a benefit template from multiple selections and create a report form based from the combination of template he selected. My question would be based f

  • Icloud error message

    I get an error message when installing iCloud on my PC HResult 0x8007054F

  • Transactional publication with updatable subscriptions

    Which system table stored the information of Transactional publication with updatable subscriptions? I would like to check if any publication is using. Thanks