How to prevent Duplicate AP Invoices ??

hi Experts
End user Raised Po for 1000 quantities but good receipt Po comes one time 100,2nd time 200 ,3time 300 and so on...in between invoice raised for 100 ,2time 200 ... against GRPO..in between End user miss understand or communication some Duplicate bills are raised...
how i restrict duplicate postings??
note:(im using sap b1 2007 pl 17)
  Thanks & Regards
     AKR

Hi
Try this Stored Procedure in Test Environment.
if (@object_type = '20' or @object_type = '18')
     and (@transaction_type= 'A' or @transaction_type= 'U')
begin
     declare @venno as varchar(100)   
     if @object_type = '20'
     begin
          select @venno = NumAtCard
          from opdn
          where docentry =@list_of_cols_val_tab_del
          if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)
          begin
               select @error = 1
               select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '
          end
     end
     else
     if @object_type = '18'
     begin
          select @venno = NumAtCard
          from opch
          where docentry =@list_of_cols_val_tab_del
          if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)
          begin
               select @error = 2
               select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '
          end
     end
end
With Regards
Balaji Sampath

Similar Messages

  • How to prevent duplicate web pages from loading

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/930219]]</blockquote>
    how to prevent duplicate web pages from loading

    <s>Hi berternie, can you describe this in more detail?
    Are you saying the identical page loads in two different tabs? When does that happen -- when you click a link? or when you use a bookmark?
    Or do you have multiple tabs open every time you see your home page (i.e., when you start up, open a new window, or click the home icon)?</s>
    I see, you have more info in this thread: https://support.mozilla.org/en-US/questions/930219

  • How to Prevent duplicates on Combination of Lookup columns in sharepoint 2010 using infopath 2010 form.

    Hi All,
    I have list with some Lookup columns like  City, Pin, and Text Column Name. All these are required columns.
    Now I want to prevent duplicates while submitting InfoPath form if a Combination of  City,Pin & Name. (like a Composite primary in Database is used.)
    Can some one help me on how to achieve this using InfoPath  2010 Rules, writing  rule in Xpath.
    Thanks in Advance.

    1. Add a secondary data connection to the list where the form will be submitted.
    2. Prior to submit via rules, set the query fields in the above connection: City, Pin & Name with values entered in the form. Query the data source and check if the result has values.
    3. Show error messages accordingly if exists else continue with Submit.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How to prevent duplicates in your contacts

    When syncing two iphones via icloud with your computer how do I prevent duplicate contacts between both phones, icloud and yahoo?

    I have 11 people designated under faces.
    Do you see the 11 People when using the "Faces" view from the source list in the Library Inspector or from the "Faces" button in the toolbar?
    If you are using the Faces button from the toolbar, you may have been excluding faces stacks you already created. Then, when you enter search strings, Aperture will suggest names from your contacts and you may create the same stack again.
    Also, if the search field is not empty, you may already have more "Faces" stacks than you are actually seeing.
    As you certainly know, you can always unite "Faces" stacks by dragging a stack onto the other to merge them. The merged stack will use the name of the stack you dragged to.
    Regards
    Léonie

  • How to prevent duplicate web pages loading

    when clicking on a link, two duplicate web pages load, how to prevent this

    This started when you installed Firefox 13? Which version did you have before -- Firefox 12 or Firefox 3.6?
    Does this occur on all sites or only on particular sites?
    Do you have a very sensitive mouse or touchpad that might be double-clicking the link?

  • How to prevent duplicate submission?

    Hello!
    I have a page for gathering some data:
    private function saveHander():void {
        // Gathering data into database.
    <mx:TextInput id="name" />
    <mx:TextInput id="age" />
    <s:Button id="Submit" label="Submit" click="saveHandler();" />
    When focus on submit button,I click at the button and press the space bar at the same time,saveHander function execute two times.
    How can I prevent duplicate submission? thanks!

    Assuming this is a form you are attempting to save, good UX practice is to disable the form once you begin local form validation (submit button clicked) prior to forming your data packet for save.
    Doing so will prevent the anomaly you are experiencing.
    In other cases where the above practice is not practical, you can setFocus to another component (off the submit button) because as long as the focus remains on the button, depressing the space bar will trigger the mouse event for the button. Research ADA compliance if you want more details.
    HTH. 

  • How to prevent duplicate entry in Details block

    Dear All
    I am using Forms 10g.
    I have a detail block.
    There is a column called Ip_Address.
    There i want to prevent duplicate entry .
    How can i do this ?

    hey i have a requirement that to restrict duplicate entry in both block(both multi record).the blocks are DEPT(MATER)
    EMP(DETAIL)
    the associated fieds in master block DEPT.DEPT_NO,in detail EMP.EMP_ID .
    I have done' Kevin D Clarke’s calculated item ' both in master and detail block
    its working fine for master block but in case of detail block its only respond to the current session(i.e. if the new value is inserted or save it will restrict another record to be inserted of that last record's value),it does not restrict duplicate value enter ,checking with other existing records(which are saved in earlier session,though after query it is shown on the form)
    can anyone guide me why its not working

  • How to prevent duplicate records

    Hello all,
    This is just a general query. How do we prevent duplicate records at data target level(ODS/InfoCube).
    Thanks
    S N

    Hi,
    for ODS you can either specify in settings option "unique records" (only first combination of keys is saved, second one throws error message) or you can define "overwrite" for update rules to ODS (last occurrence of record is saved).
    For InfoCubes I think there isn't such setting and there is no possibility of overwriting existing records. So you have to load first to an ODS object to ensure unique records and update from ODS to InfoCube.
    Best regards,
    Björn

  • How to prevent duplicate vendor reference no on SAP B1 v8.8?

    Helo experts,
    I have SAP B1 v.8.8 and they system is allowing me to enter the same Vendor Reference for different POs but same BP.
    Is there a way to prevent duplicaton?
    I read in other post that there was an option in Admin'-System Initialisation-Document settings......to block duplication, but that does not show on my screen.
    Do you have any ideas or suggestions?
    Thank you

    Hello Gordon,
    Thanks for the link but I had already read those posts.
    I understand there is a way to prevent duplicate to enter vendor reference numbers.
    However, my question would be if the version that I am using would have the option to block release when When duplicated Vendor Reference No occurs as I cannot find it.
    Please advise,
    Thanks

  • How to prevent duplicate submit

    I am looking for a solution to prevent duplicate submit on the click of submit button or browser refresh. In Struts its quite easy to implement using toekn feature.
    Is there some feature in JSF which I can use to prevent duplicate submit?
    Please share your thought.

    Redirect after POST.

  • How to prevent duplicates when syncing

    Whenever I sync anything to my iPad, iPhone I constantly get duplicated. This includes contacts, tasks &amp; notebooks. How can I prevent this from happening?

    If you have an email account that syncs over the air, you can get duplicates when syncing if you have these selections checked to sync with iTunes. Go to the Info Tab in iTunes when the device is connected to your computer and you are ready to sync - and look at what you have checked to sync. Look at Contacts, Calendars,and Other.

  • How to prevent duplicate photos

    I have CD's where there are pictures that appears several times (same picture on different CD's). When importing pictures from those CD's, how do I prevent that the same picture is read twice (or more).
    Regards
    Janne43

    Create a new folder on your desktop, download the picture files from the CD's, delete the duplicates.
    As I see it, you now have 2 options:
    Burn new CD's or a DVD from the desktop folder as your source, and use the  Editor & Organizer - or
    Use Editor & Organizer, using the desktop folder directly
    Suggest that you stick to one of these options for this group of photos so as not to confuse the path in Organizer.

  • How to prevent duplicate contacts on iPhone3S

    I need to find out how to sync my iPhone3S IOS5 with iCloud without crating duplicates.
    It seems like my iPhone/iCloud created one or more extra set of groups, I might need a better set up. Some of the contacts appeared 4 times or more.
    I'll appreciate some good explanations on this issue, please.
    Thanks!

    Is Sync Contacts with a supported address book app on your computer now deselected under the Info tab for your iPhone sync preferences with iTunes? If not, deselect this followed by selecting Apply.
    If all contacts are available in your iCloud online address book, on your iPhone go to Settings > iCloud. Turn Contacts off for over the air syncing. A warning message will be provided indicating this will remove all iCloud online contacts.
    This will not remove the contacts on your iPhone that were synced direct with the address book app on your computer via the iTunes sync process.
    Turn Contacts back on for over the air syncing with your iCloud account. You should be provided a merge prompt which you want to select.
    This will eliminate the duplicates.

  • How to prevent duplicate keys in archive database?

    I am struggling with this problem.
    Background: I'm working on a project where I have to make an archive database. The archive database should get
    all data of the operational database. It should even save every update ever made, so it literally contains the entire history of the operational database (this is a must and the whole project revolves around this idea). So this is solved by using Change Data
    Capture. After that the data should go through a staging area and eventually in the data warehouse database. I came out with a solution and worked it out in the prototype and it seemed to be working all fine. I stupidly forgot to include the foreign keys,
    so the archive database didn't have the original structure but it should ofcourse (no wonder it went okay without too much hassle).
    Problem: Because we want to store everything in archive, there will be duplicate primary keys (just for instance,
    many same contact_id's because telephone number changes a couple of times). I thought to solve this by adding a new primary key which says is auto-increment and purely exist to make a record unique. But when it comes to foreign keys, it's impossible. You want
    contact_id to be able to be duplicate and in that case it cannot be a primary key. But foreign key is only able to reference to a primary key or another unique key but not other normal columns.
    Any advice on this? It's an absolute must to store all changes.

    All of you, thanks for replying, I'm happy you're trying to help me out with this problem. 
    Visakh and Louis, thanks that seems like the solution for this case indeed. Yes, the dimensional design appeals more to me as well.
    I read the articles and watched some tutorials. But I can't work it around the solution that I had.
    More background info: I use CDC to track all the changes done in the operational database and SSIS (following one of Matt Mason's tutorials and with a lot of alterations to make it fit for my project). I have this control flow (don't mind that
    error haha):
    (Oh apparently I cannot add images yet, so here's the link for the screenshot:) http://nl.tinypic.com/r/w0p1u0/8
    Basically I create staging tables in my archive database next to my normal archive tables. Then start CDC control task to get the processing range and then it copies everything from the operational database (joined with a few CDC columns) to the staging
    tables. After that the processing range ends so it will only get the rows it hasn't processed before. And then I do some updates on the staging tables and then finally insert everything into the archive tables. The staging tables then can be truncated. After
    this the data will go to the staging area for transformations and then finally at last to the DWH. The reason for having a staging area between the archive and DWH is that the archive will not only be used as source for the DWH but also on it's own. The DWH
    will not contain 100% the same stuff as the archive (like maybe some transformations, extra columns with calculated fields, plus some columns don't need to be in the DWH at all). When all the ETL stuff is done in SSIS, I have to use SSAS to define all the
    facts, dimensions, cubes. 
    Example: So I try to work with the SCD type 2. If I understood it correctly (and maybe I didn't): for example, the contact table in archive should have the surrogate key ID (the auto-increment one). The business key is the contact_id
    and can be used uniquely with the time range columns. 
    Following Visakh's post, the ID becomes the key that the foreign key will reference to. For example: 
    Contact table:
    ID: 1 contact_id: 100
    Name: Glenn start_time: 2014-01-01
    End_time: 2014-08-20
    ID: 2 Contact_id: 100
    Name: Danzig Start_time: 2014-08-20
    end_time: NULL
    Sorry, I couldn't style it as table somehow. So the employee changed his name. It makes sense that the time period tells when the first name was valid. 
    Organisation table: 
    ID: 1
    org_id: 20 
    Contact_id: 1
    Start_time: 2014-01-01
    End_time:NULL
    (it references to ID instead of contact_id as suggested)
    The employee belongs to an organisation. It references 1 which is still old data. But this is the last version of the organisation record. 
    So then I need a table to link the 2: 
    organisation_contact table
    contact_id:100
    org_id: 20
    and then I need another one to join with the surrogate key?
    ID: 1
    org_id: 20
    ID: 2
    org_id: 20
    (Guess it would make more sense to have org_id in the contact table but for now it's an example)
    Problems: I don't quite understand how this works. From the example I saw you have to have another table (the fact table) to link it to the surrogate key. Would this mean I have to have facts and dimension tables in my archive database?
    My intention was actually to have all records of the operational databases (all the updates too) in my archive. And after that create the facts and dimensions in the DWH with SSAS. The example looks like I should do it earlier. 
    I don't know how to combine this with the cdc solution. I want to get all the data by using CDC. Like how every update gets registered in the accompanying CDC table. Then the archive will get the CDC data. But then how to combine this in use with SCD. I
    have the surrogate key in archive (ID) and then I make the start and end time columns. I need to point all references to the ID and then make the other table to keep track of the contact_id (original PK) and another key. At last make another table to track
    all the current data in the fact. 
    Another question: Would you recommend the SCD task in SSIS. I read it was not that great if you have many rows to work with. What would you think is the best method to implement it. 
    Thanks so much again.
    EDIT: What about slowly changing dimensions type 4? It looks like you don't have to change the references of the foreign key then. Why do you prefer 2 over 4?

  • How to prevent duplicate photos when sync

    I have videos and pictures that I want to keep on my phone, however when I sync to nokia suite it will sync the same photos over and over. anyway to prevent this, or do I have to delete them from phone. Also,  same thing with duplicate contacts.
    What is the best way to transfer photos from Nokia suite to disc, or memory card. I have a ton of photos on Nokia suite and want to transfer them to a disc or memory card.

    Create a new folder on your desktop, download the picture files from the CD's, delete the duplicates.
    As I see it, you now have 2 options:
    Burn new CD's or a DVD from the desktop folder as your source, and use the  Editor & Organizer - or
    Use Editor & Organizer, using the desktop folder directly
    Suggest that you stick to one of these options for this group of photos so as not to confuse the path in Organizer.

Maybe you are looking for

  • Can't seem to update firmware on Zen Xtra (3

    I am having trouble upgrading firmware on player. I am trying to go from .0.0 to .20.08. Followed instructions and removed current OS from player. Launched the upgrade firmware file and followed instructions. Where I seem to be having trouble...is af

  • How to remove carriage returns in message mapping

    Hi Experts, I am getting carriage returns in one of the source field, i need to remove those carriage returns and i need to pass it to target field, can anyone suggest me how can i achieve this.

  • How do I get a receipt for final cut x

    How do I get a receipt for final cut x?  I paid for it to use at work and I cant claim the cost back unless I have a receipt.  Apple cant claim it is an app for personal use when they are pitching this software for professional editing

  • Iphoto Deleted but not trashed

    My Iphoto library was trashed but the trash was not deleted. I dragged it to the desktop then dragged it to the dock but it isn't working properly. I have the pictures in my library but whenever I scroll thru the pictures or even click on the iphoto

  • Error while calling COM routines via application program (return code 40028

    Hi , When i am doing these steps i am getting the following error. 1.from SAP menu...Demand Planning>Planning>Interactive Demand planning        2.after the transaction gets loaded...click on the 2nd button that is selection window from the left ALV