How to validate more than one item.

Hi guys,
I cannot create a composite primary key. I need to validate three items in a form at once ( P1_Project , P1_unit_type, P1_unit_number.)
if in the DB there is a record containing identical data ( project , unit_number, unit_type), then the validation should prevent me from creating the new record.
I hope my question is clear.
Regards,
Fateh

Fateh,
Unless you are supporting old data that prevents you from creating a unique index on these columns, I would do so to make sure you do not get bad data. To control this in the application you want to make a not exists validation which resembles the following:
select 1
  from <table_name>
where project     = :PXX_PROJECT
   and unit_number = :PXX_UNIT_NUMBER
   and unit_type   = :PXX_UNIT_TYPEThe validation should be not exists because in order to pass the validation a record cannot contain the same values for these columns.
Cheers,
Tyson Jouglet

Similar Messages

  • Production Order - How to recieve more than one item in a single Prod .ord

    Hello everyone ,
            Hope and wish all is fine with u all ..
    Well .. My scenario is as follows ..
    While producing a particular item ( Item1) using the raw materials (say R1,R2 etc..) ..we also get another by-product ,(item2) which is also a revenue generating item.
    I want to know  , how do we do a receipt for this item ( item2 )  ...
    I did read the forum thread posted on 12/12/07 " Receiving By Products on basis of Production order "
    what I dont understand is , if we add it as a raw material in the BOM and then how or why do we issue it ..
    and if we are goin to issue it ,,then when how  will u update that inventory... I dont know if  scenario in the thread (backflush )  is the right way to do it ..
    Thanks in advance
    Best Regards,
    Arul...

    Arul,
    I beleive this is case of using the functionality of Disassembly Production order. Now your Item no. 1 is a BOM of say RM1RM2RM3. The goods receipt would be Item No.1. Now you can create a disassembly production order where in the by product would be say Item no. 2 which is as as per your information a revenue generating item hence to be marked as a sales item in the Item master.
    Please check this out and let me know.
    Nagesh.

  • How can I buy more than one item at a time?

    How can I buy more than one item at a time i iPhote fx a book and a calander? It would be nice to place one order and only pay for the shipping once!

    You can't.
    Regards
    TD

  • How can i put more than one item in a same row of a form?

    guys!
    it seems item is positioned in a single row one by one each time item is appened to a form. i can't append more than one item in same row.
    i'm using sun wtk and default colored phone emulator.
    xxxx

    Hi,
    It is not possible to have more than one combo in the source frame. This is because frame drivers can take only
    two columns in the sql query, one is the display value and the other the return value.
    Thanks,
    Sharmila

  • Is there a datatype that allows me to store more than one item at a time

    Hello Everyone,
    Is there a datatype that allows me to store more than one item at a time , in a column in a row?
    I have to prepare a monthly account purchase system. Basically in this system a customer purchases items in an entire month as and when required on credit and then pays at the end of the month to clear the dues. So, i need to search the item from the inventory and then add it to the customer. So that when i want to see all the items purchased by a customer in the current month i get to see them. Later i calculate the bill and then ask him to pay and flushout old items which customer has purchased.
    I am having great difficulty in preparing the database.
    Please can anyone guide me! i have to finish this project in a weeks time.
    Item Database:
    SQL> desc items;
    Name Null? Type
    ITEMID VARCHAR2(10)
    ITEMCODE VARCHAR2(10)
    ITEMPRICE NUMBER(10)
    ITEMQUAN NUMBER(10)
    Customer Database:
    SQL> desc customerdb;
    Name Null? Type
    CUSTID VARCHAR2(10)
    CUSTFNAME VARCHAR2(20)
    CUSTLNAME VARCHAR2(20)
    CUSTMOBNO NUMBER(10)
    CUSTADD VARCHAR2(20)
    I need to store for every customer the items he has purchased in a month. But if i add a items purchased by a customer to the customer table entries look this.
    SQL> select * from customerdb;
    CUSTID CUSTFNAME CUSTLNAME CUSTMOBNO CUSTADD ITEM ITEMPRICE ITEMQUANTITY
    123 abc xyz 9988556677 a1/8,hill dales soap 10 1
    123 abc xyz 9988556677 " toothbrush 18 1
    I can create a itempurchase table similar to above table without columns custfname,csutlnamecustmobno,custadd
    ItemPurchaseTable :
    CUSTID ITEM ITEMPRICE ITEMQUANTITY
    123 soap 10 1
    123 toothbrush 18 1
    ill just have it as follows. But still the CUSTID FK from CustomerDB repeats for every row. I dont know how to solve this issue. Please can anyone help me.
    I need to map 1 customer to the many items he has purchased in a month.
    Edited by: Yukta Lolap on Oct 8, 2012 10:58 PM
    Edited by: Yukta Lolap on Oct 8, 2012 11:00 PM

    You must seriously read and learn about Normalization of tables; It improves your database design (at times may increase or decrease performance, subjective cases) and eases the Understanding efforts for a new person.
    See the below tables and compare to the tables you have created
    create table customers
      customer_id       number      primary key,
      fname             varchar2(50)  not null,
      mname             varchar2(50),
      lname             varchar2(50)  not null,
      join_date         date          default sysdate not null,
      is_active         char(1)     default 'N',
      constraint chk_active check (is_active in ('Y', 'N')) enable
    create table customer_address
      address_id        number      primary key,
      customer_id       number      not null,
      line_1            varchar2(100)   not null,
      line_2            varchar2(100),
      line_3            varchar2(100),
      city              varchar2(100)   not null,
      state             varchar2(100)   not null,
      zip_code          number          not null,
      is_active         char(1)         default 'N' not null,
      constraint chk_add_active check (is_active in ('Y', 'N')),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    create table customer_contact
      contact_id        number      primary key,
      address_id        number      not null,
      area_code         number,
      landline          number,
      mobile            number,
      is_active         char(1)   default 'N' not null,
      constraint chk_cont_active check (is_active in ('Y', 'N'))
      constraint fk_add_id foreign key (address_id) references customer_address(address_id)
    create table inventory
      inventory_id          number        primary key,
      item_code             varchar2(25)    not null,
      item_name             varchar2(100)   not null,
      item_price            number(8, 2)    default 0,
      item_quantity         number          default 0,
      constraint chk_item_quant check (item_quantity >= 0)
    );You may have to improvise and adapt these tables according to your data and design to add or remove Columns/Constraints/Foreign Keys etc. I created them according to my understanding.
    --Edit:- Added Purchases table and sample data;
    create table purchases
      purchase_id           number        primary key,
      purchase_lot          number        unique key  not null,     --> Unique Key to map all the Purchases, at a time, for a customer
      customer_id           number        not null,
      item_code             number        not null,
      item_price            number(8,2)   not null,
      item_quantity         number        not null,
      discount              number(3,1)   default 0,
      purchase_date         date          default sysdate   not null,
      payment_mode          varchar2(20),
      constraint fk_cust_id foreign key (customer_id) references customers(customer_id)
    insert into purchases values (1, 1001, 1, 'AZ123', 653, 10, 0, sysdate, 'Cash');
    insert into purchases values (2, 1001, 1, 'AZ124', 225.5, 15, 2, sysdate, 'Cash');
    insert into purchases values (3, 1001, 1, 'AZ125', 90, 20, 3.5, sysdate, 'Cash');
    insert into purchases values (4, 1002, 2, 'AZ126', 111, 10, 0, sysdate, 'Cash');
    insert into purchases values (5, 1002, 2, 'AZ127', 100, 10, 0, sysdate, 'Cash');
    insert into purchases values (6, 1003, 1, 'AZ123', 101.25, 2, 0, sysdate, 'Cash');
    insert into purchases values (7, 1003, 1, 'AZ121', 1000, 1, 0, sysdate, 'Cash');Edited by: Purvesh K on Oct 9, 2012 12:22 PM (Added Price Column and modified sample data.)

  • GR-GI printout for more than one item in one document

    Hi Friends,
    In my GR document, there are more than one materials receipted in one document. I am taking the printout of GR slip by assigning the printer in MB02 T-Code. And then through MB90 i am taking the printout. But in MB90 in the print preview, I can see only one item at a time. where as I have receipted more than one item in one document. In MB02 I have to assign the printer one by one to each item and in MB90 also i can see only one item in the GR slip. How can I take the printout of the of all the items in the GR document all at a time??????
    Same is the case for Goods Issue slip. Here also i can see the print preview of only one item at a time.
    Please advice.
    Thanks & Regards
    Satya

    Satyabrata,
    <b>In transaction "OMBR" define print version indicator as "3" for the transactions through which you are creating this material document</b> this basically defaults when performing the transaction. You can also set the indicator to collective in the intial screen of the transaction.
    Defination of print version:
    Version for printing of GR/GI slip, Specifies the version of the goods receipt/issue slip.
    You can print out three different versions of a GR/GI slip:
    <b>Individual slip (version 1)</b>
    In this case, one GR/GI slip is printed out for each item.
    <b>Individual slip with inspection text (version 2)</b>
    In this case, one GR/GI slip is printed out for each item. In addition, a quality inspection text is printed if there is one in the material master record.
    <b>Collective slip (version 3)</b>
    In this case, a collective slip including all the items in a document is printed.
    Hope this helps...
    Regards,
    Prasobh

  • How to share more than one Time Machine folder

    Hi,
    With Snow Leo Server I found how to find how to share more than one Time Machine Folder but I can't see how to do the same with Lion Server, could you help me with that ?
    The goal of that is to offer one TM folder per user which is located on a dedicated partition in order to limit the size of TM backups per user (150Gig).
    In Lion, in can only share one TM folder for everybody and I didn'tfind if I can set a limit size per user...
    Thank you in advance,

    I have figured out a way to enable multiple backup targets.
    However, it's one of these things I wouldn't want to describe to anyone except true programmer types, because everyone else has a 90%+ chance of messing up their system if they do something wrong.
    It involves turning off file sharing, and then editing the plist files in /private/var/db/dslocal/nodes/Default/sharepoints/
    The gist of it is this:
    a) first create all the share points you later want to use for TimeMachine, and set them up for afp-only file sharing, also create one TM target, which you can either use later, or have there so the system has one entry it knows how to handle. I just made a bogus one that I'm not actively using.
    b) turn off file sharing in Server.app
    c) turn off TimeMachine in Server.app
    d) now you can edit the files, the easiest is with Xcode, so you may want to install that first
    e) for each sharpoint you made in a) there will be a corresponding .plist file in the location indicated, these are the files that need to be edited.
    f) for each of these files
         1) the item0 string property in the timeMachineBackup array must be switched from 0 to 1
         2) a new key of type array with the name timeMachineBackupUUID must be created
         3) in the newly created array an item of type string must be placed with the value of a UUID, which can be created with the shell command uuidgen
    g) make sure all the edited plist files are saved
    h) turn on TimeMachine in the Server.app again
    If all went well, you now should be able to go to one of your networked client computers and see all the time machine share points just created as options for being a time machine target.
    Anyway, if you go that route: be careful, don't blame me if you muck things up...

  • Can't add a goods-issue with more than one item and one is serial managed.

    Hi,
    We are trying to issue more than one item to a production order using the DI API.  If none of the items is serial managed, they all are accepted and the goods-issue Add is successful.  If one the items is batch-managed, the goods-issue Add is also successful.  I am able to add the goods-receipt if I it contains only one item and it is serial-number managed.  However, if I’m issuing more than one item and one or more of the items is serial number managed, then the DI API will not add the goods-issue.  The error message that appears refers to an item that is not among the items being issued.  The message is:
    -10: (IGE1.WhsCode)(line: 3), ‘Item ‘A00006        ‘ with system serial 1 is not in stock.’
    Again item A00006 is not even in the group of items being issued.
    The code I am using for the serial number part is:
    With oGoodsIssue.Lines.SerialNumbers
              .SystemSerialNumber = rs.Fields.Item("SysSerial").Value
              .ManufacturerSerialNumber = rs.Fields.Item("MfrSN").Value
              .InternalSerialNumber = rs.Fields.Item("IntrSerial").Value
              .SetCurrentLine(n)
              .Add()
              rs.MoveNext()
              n += 1
    End With
    The rs is a recordset that the code is looping through as the serial numbers are being added.
    The error message does not occur during this code.  It occurs when it tries to add the full goods-receipt.  Does anyone have any idea how I can fix this?
    Thanks,
    Mike
    Edited by: Mike Angelastro on Mar 31, 2008 8:43 AM

    Hi Mike,
    Try to do the ".Add" only if you need it. Doing a ".add" without assignation may cause the error you have.
    I guess your n variable start at 1 or 0, so you could put code like this :
    With oGoodsIssue.Lines.SerialNumbers
    if n = 0 then (or 1, also I don't the correct syntax of your programming language)
    .Add()
    end if
    .SystemSerialNumber = rs.Fields.Item("SysSerial").Value
    .ManufacturerSerialNumber = rs.Fields.Item("MfrSN").Value
    .InternalSerialNumber = rs.Fields.Item("IntrSerial").Value
    .SetCurrentLine(n)
    rs.MoveNext()
    n += 1
    End With
    HTH
    Jodérick

  • How to display more than one column with for each

    Hi guys,
    how to display more than one column with for each like below?
    for each
    Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7
    Item8
    Item9
    Item10
    End for each
    for each          
    Item1     Item2     Item3
    Item4     Item5     Item6
    Item7     Item8     Item9
    Item10          
    End for each

    Take a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
    Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
    Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
    Thanks,
    Bipuser

  • PC Suite ignores more than one item of each kind

    PC Suite ignores additional items when there are more than one item of the same kind - example: if I have two or more notes in a contact, only one is showed, and the remaining ones are ignored. It seems to be a bug, since even exportation of a contact with multiple items of the same kind only exports one of them, ignoring all the others. My cell phone is 5610, is connected with the USB cable, and my PC Suite is version 7.1.30.9

    Hi,
    As you mentioned when i add one more notes to a contact on Nokia N86, after sync, in view sync last report i saw the second note as Unsupported properties Note(2) and its content displayed on view last report.  So i dont think this will be supported.  Similar issue we have for contacts, if you same contact(say mobile home1, mobile home 2) pc suite will recognise only the first (mobile home1) and pc sync will say unsupported properties for rest of mobile home nos# and you cannot view them on Nokia Communication centre/PC Suite.... Similarly though your phone supports adding more than one note for a contact, it wont be supported by pc suite as per view last sync report May be this is currently how it behaves

  • Reg: how to join more than one cluster table into one

    Hi gurus
    How to join more than one cluster table into one
    amk

    Hi,
    You cannot join cluster tables
    Best way is to select from the header table and then select from the item table table using for all entries of header table.
    regards,
    Advait

  • How to from more than one delivery note - conversion into one invoice

    Dear Experts,
    How to from more than one delivery note - conversion into one invoice?
    Thanks and best regards,
    Wilson Hong

    Dear Wilson Hong,
    Single invoice for multiple deliveries will takes place based on these criterion
    1.If you want single billing document for multiple deliveries these data should be same in all order for all items.
    -> Payer
    -> Inco term
    -> Payment term
    -> Actual GI Date from Delivery
    -> Shipping Condition
    -> Account Assignment Group
    -> Exchange rate (in case of export sale order)
    -> Foreign trade data.
    2.In addition to this you need to maintain proper copy control settings between delivery and invoice.
    Go to VTFL transaction input your delivery type and invoice type then go in to the item level settings here you find field Data VBRK/VBRP maintain this field with routine 3-Single invoice.
    If the above data and settings are exists you can do single invoice for multiple deliveries.
    I hope this will help you,
    Regards,
    Murali.

  • How to add more than one attachment in comment

    All my friends that visit my blog page ask me how can they add attach more than one item in their comments, I do not know how.. though I did suggest them to join all the image/item as one image/item.. that is ok so far, but the outcome is not as beautiful as original.

    Unfortunately only one attachment can be added per comment. Advise your friends to add multiple comments, one for each attachment, or combine the images in a photo editing program and upload as one composite image.

  • How to add more than one clip to a drop zone?  New guy

    Hey all, I'm new to DVD studio and I'm trying to fiqure out how to add more than one clip to a Template drop zone. I'm using a 6 button template. I've named each button .. Football, Baseball, Hockey ...etc.
    How can put in MORE THAN ONE CLIP in the Football track/drop zone. So when someone clicks on Football they can see 3 examples.
    Do I need to create something to link to that Football button?
    Any replies appreciated

    You can edit the segments to be used in FCP or Motion so that the asset drop in has three examples
    Another way (if you want) is to make the entire menu outside of DVD SP so that the background layer is an m2v and the items are revealed/masked to some degree
    Take a look towards the bottom of this thread http://discussions.apple.com/thread.jspa?messageID=2951183&#2951183 where I discuss http://www.dvdstepbystep.com/Overmovies.zip
    Note that you can also use a basic overlay to do this. The overlay would be just solid black instead of the arrows/circles things I use in that example.
    For instance make the text one color and the box over the movie another (You can make it blue and the box red lets say) Draw a region over both for the button. Map blue for highlights/transparencies for normall/selected/activated and the same for the Box

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

Maybe you are looking for

  • How to calculate the Percent change in a dynamic

    hi All, I'm trying to get the percent increase/change of two dynamic colums.  In my report, the user has a checkbox where he can select two colums to calculate the percent growth. My DataSet is PilarName, Calification(is a decimal value) and Period (

  • Business partner maintenance for Product catalog view - Problem

    Hi All, I am using the FM 'CRM_PRP_MAINTAIN' to create Business partner assignment for product catalog view. Can anyone help me with this FM? I am passing the following:         gs_prp_bupa_i-ref_kind = 'B'.         gs_prp_bupa_i-processing_mode = 'A

  • After jumpstart host doesn't prompt for root password

    Hiya gang, I am migrating my jumpstart functionality to a new server and while it would appear that 100% of things are identical on both (as far as my /jumpstart tree is concerned), when I jumpstart a host (V240, in this case, but I've seen it on a S

  • AIR ADT duplicates icons within package

    I have a detailed question on SO, but hoping to get more exposure to experts here. In short, in regards to application icons in descriptor-app.xml, the documentation states: "The path specified is relative to the application root directory. Note: The

  • Wiki or Robohelp - What are the benefits of using a wiki vs publishing projects in robohelp?

    What are the benefits of using a wiki vs publishing projects in robohelp? I currently use RH9/RH9 Server and  publish multiple SSL.  The company is looking to stop using Robohelp and replace our online help authoring tool  (RH) with a wiki. Are there