Duplicate entry check in Tb control with 6 same fields

actualy i have made a table control with six same fields.
batch1      batch2     batch3    batch4        batch5           batch6
the data type of all fields is same.
i want to assign a check for duplicate entries.
the value entered in batch1 (say bgp000001). then it cannot be entered in any row or column of table control.that means this value bgp000001 cannot be entered again in entire table control.
although i have been able to create a validation for table control current line.
In PAI
loop at i_packcase.
FIELD I_PACKCASE-batch1 MODULE CHECK_CRTNO1_0107.
    FIELD I_PACKCASE-batch2 MODULE CHECK_CRTNO2_0107.
    FIELD I_PACKCASE-batch3 MODULE CHECK_CRTNO3_0107.
    FIELD I_PACKCASE-batch4 MODULE CHECK_CRTNO4_0107.
    FIELD I_PACKCASE-batch5 MODULE CHECK_CRTNO5_0107.
    FIELD I_PACKCASE-batch6 MODULE CHECK_CRTNO6_0107 .
endloop.
corresponding modules are coded as below:
there is no check in field-batch1( as this is the first entry in table contrl)
module check_crtno2_0107 input.
if i_packcase-batch2 eq i_packcase-batch1.
   message v_duplicate type 'E' display like 'I'.
endif.
endmodule.
module check_crtno3_0107 input.
if i_packcase-batch3 eq i_packcase-batch2
        or i_packcase-batch3 eq i_packcase-batch1.
        concatenate 'CASE'  i_packcase-batch3
        ' ALREADY ENTERED' into v_duplicate.
        message v_duplicate type 'E' display like 'I'.
endif.
endmodule.
similarly field-batch6 is checked against all previous 5 fields
this works only for current line of table control.
*now i want to extend this check to all lines of table control.

Hi,
Save the entries of each row and column into an internal table containing one field (fieldx)  the required data type. Delete adjacaent duplicates for the internal table. If successful, give error message as required.
Loop at i_packcase.
itab-fieldx = i_packcase-batch1.
append itab.
itab-fieldx = i_packcase-batch2.
append itab.
itab-fieldx = i_packcase-batch3.
append itab.
itab-fieldx = i_packcase-batch4.
append itab.
itab-fieldx = i_packcase-batch5.
append itab.
itab-fieldx = i_packcase-batch6.
append itab.
endloop.
delete adjacent duplicates from itab comparing fieldx.
if sy-subrc eq 0.
****appropriate error message****
endif.
Regards,
Konda Sravanthi.

Similar Messages

  • BP Duplicate Entry Check - CRM UI

    Hi Experts,
    I am able to have duplicate entry check in CRM GUI but its not working in the Web UI. I want to do a similar check in CRM UI. I have to check whether its a corporate of individual BP. Then I have to display a warning message if a duplicate entry exists for the given fields.
    In CRM GUI, I am using a function module to throw the message. Its called at an event.
    Warm Regards,
    Abdullah

    Hello!
    Only some remarks about the Duplicate Check. This is based on the BAS Interface (BAS=Business Address Services) and Third-Party solutions are certified for this Intervace.
    http://service.sap.com/bas => Information about the Interface
    http://www.sap.com/ecosystem/customers/directories/searchpartner.epx
    Link to find certified Partners (Certification Category=Central Address Management)
    Best regards
    Arno

  • How join the two query block with same field

    sorry sir i am posting dublicate thread
    i thought you not understand my question
    sir i have two query block in report with same field
    i try the link object but that creat now block not creat link withen query block
    please give me idea
    thank

    Dear,
    Use data link object.
    Click at data link object then click on the fild in query block1 and drag it into the other query block data link will be created.
    try it

  • Is there any other table like BSEG with same fields.

    Hi Abapers,
    I want to use BSEG table.But due to some promblem BSEG table is not supporting.So is there any other table like BSEG with same fields.
    can any one help me.
    with regards

    Since performance may be an issue when hitting BSEG table
    Any of the below accounting tables can be used.
    1.BSAD
    2.BSAK
    3.BSAS
    4.BSID
    5.BSIK
    6.BSIS
    These are normal database tables, not clusters. Normally every record from BSEG can be found in one of these 6 tables. The program which selects data
    From these tables runs faster than from BSEG.
    Plz reward if helpful.
    Thanks.
    Ramya

  • Multiple entries in a Z table with same key fields

    Hi
    I do have a ZTABLE, with 3 key fields defined earlier. It consists of around 1 lakh records. Later onwards, two of the non keyfields have been made to key fields.
    This table is being populated with records at the time of saving a ztransaction.
    But some times, the system is updating the same records, some times twice, sometimes thrice, etc. I got to know that all fields (both key fields and non-key fields) of the record are same. That is, records are being updated in to the database table n number of times may be depending of some false logic in the program.
    If I tried to enter the same using SM30, it is showing me an error message stating that the record is already existing.
    What can be the reson?

    Hi,
    It seems there is some kind of data inconsistency..try to get all the records and then delete the duplicate entries through program....Now once u r done , from now onwards there won't be any duplicate entiers.,also before updating table use filters to avoid the duplication..
    Regards,
    Nagaraj

  • Masterdata Duplicate Entries Check

    Hi All,
    I would like to search for duplicate entries for field WBS_ELM_EX in the table /BI0/MWBS_ELEMT.
    This table has 612,976 records.
    Is there any program / functional mode available which lists out duplicate entries.
    Can anyone help me in this.

    Hi Mani,
    Goto RSRV
    All Combined Tests
    Master Data
    Check Master Data for a Characteristic
    Regards,
    Ramkumar.

  • Why does LabVIEW allow me to have 2 controls with same name

    Here's a general LabVIEW question:
    Why does LabVIEW allow me to have 2 controls with the same name in the same VI?  It seems like this only increases the chances of confusion.  Especially when someone is just looking at a block diagram (or documentation of a block diagram).
    No other programming language that I know of allows this.  I realize that uniqueness of name is not as critical in LabVIEW as it is in any text based language.  For example, in a text based language, if I had 2 variables called abc and I wrote a statement
    abc = 12;
    the compiler would not know which abc was being referred to.  In LabVIEW, if we had 2 controls called abc, the equivalent of doing an abc=12 is writing to a local variable (which is always linked to one of the controls) and there is no ambiguity.  Still, someone looking at the code cannot figure out which abc is linked to unless he does a right click>>Find>>terminal (or a double click).
    Even though I have never and never will name 2 controls the same, I think it would be a nice constraint to see enforced by LabVIEW.
    Any input from NI engineers on this?
    Message Edited by S G on 12-18-2007 03:38 PM
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
    Attachments:
    Trial1.JPG ‏21 KB

    I know when you copy and paste a control or indicator, LabVIEW automatically increments the label. But since you can hide the label, and show or hide the caption, there must be another mechanism that LabVIEW uses to keep track of all the controls. I thought I remember back in the "old days" (ver 6 or 6i) LabVIEW would give you an error if you tried to make two controls with the same name. Perhaps that was LabWindows/CVI.
    I don't know where the index is actually stored, but if you look at a property node linked to the Pane, you will see an array of references to the controls and indicators. Since the references are stored in an array, I assume that any local variables are tied to the index of that array. Since the labels themselves are properties of the control, I guess there's no reason to limit what that label is. They all have a unique index number.
    Interestingly, this array of references grows from the beginning. That is, any new control or indicator is put at index 0, not the end of the array.
    B-)
    Message Edited by LabViewGuruWannabe on 12-18-2007 08:45 PM
    Attachments:
    Labels.png ‏12 KB

  • How to check-in multiple files with same name having different revision num

    Hi
    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Regards
    Raj
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • In OWB I need to update the target table with same field for match/update

    In OWb I am trying to update the target table with the match and the update on the same field can this be done. I am getting a error match merge error saying you cannot update and match on the same field. But in SQl my select is
    Update table
    set irf = 0
    where irf = 1
    and process_id = 'TEST'
    Hwo do i do this in OWB.

    table name is temp
    fields in the table
    field1 number
    field2 varchar2(10)
    field3 date
    values in the table are example
    0,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    In the above example I need to update the first row field1 to 1.
    Update temp
    set field1 = 1
    where field1 = 0
    and field2 = 'TEST'
    when I run this I just need one row to be updated and it should look like this below
    1,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    But when I run my mapping I am getting the rows like below the second row with 9 also is getting updated to 1.
    1,'TEST',05/29/2009
    1,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009

  • New to Crystal, seeing duplicate records in my report of the same field

    Post Author: trillium
    CA Forum: General
    I am new to Crystal Reports 10.   I am having to use it with Rational ClearQuest and I am seeing the same problem over and over again and I am hoping someone can help!
    Some reports I have created the records in clearquest are displaying only once.   I have started a new report in crystal and for some reason when I perform the report query in rational one record is displaying 2 to three and sometimes four times even though in the database there is only one record.  I have seen this in other reports I have created but I attributed it to multiple values in one field.
    Any help on fixing this would be greatly appreciated, I have tried the Suppress Duplicates but it doesn't seem to help except hiding something I need.

    Post Author: GraemeG
    CA Forum: General
    I agree with SKodidine - check your joins and selections to make sure that all variations are taken care of. Here's a simplified version of one that I messed around with for ages when I started on CR:
    Table 1 - TRANSACTIONS, Item, date, warehouse, qtyITEMA   AUCKLAND          01/01/07    15ITEMA   AUCKLAND          20/01/07    10ITEMA   CHRISTCHURCH  31/01/07    25ITEMA   OTAGO                15/01/07     5
    Table 2 - ITEM MASTER, Item, descriptionITEMA   WINDOW FRAME
    Table 3 - ITEM/WAREHOUSE MASTER, Item, warehouse, ABC Class, unit costITEMA   AUCKLAND         MEDIUM USAGE  $5.00ITEMA   CHRISTCHURCH  HIGH USAGE       $5.05ITEMA   OTAGO  LOW      USAGE                $5.00
    The report was to show:Item, description, date, qty, movement cost
    My joins were:Table 1 - Table 2 on itemTable 1 - Table 3 on item
    What I got out was:ITEMA   WINDOW FRAME   01/01/07   15   $75.00ITEMA   WINDOW FRAME   01/01/07   15   $75.75ITEMA   WINDOW FRAME   01/01/07   15   $75.00ITEMA   WINDOW FRAME   20/01/07   10   $50.00ITEMA   WINDOW FRAME   20/01/07   10   $50.50ITEMA   WINDOW FRAME   20/01/07   10   $50.00ITEMA   WINDOW FRAME   31/01/07   25   $125.00ITEMA   WINDOW FRAME   31/01/07   25   $126.50ITEMA   WINDOW FRAME   31/01/07   25   $125.00ITEMA   WINDOW FRAME   15/01/07    5    $25.00ITEMA   WINDOW FRAME   15/01/07    5    $25.25ITEMA   WINDOW FRAME   15/01/07    5    $25.00
    Because I didn't make the warehouse part of my Table 1 - Table 3 join, I got a report line for every warehouse in the Table 3 file.
    So I changed my joins to:Table 1 - Table 2 on itemTable 1 - Table 3 on item and warehouse
    What I got out was:ITEMA   WINDOW FRAME   01/01/07   AUCKLAND          15    $75.00ITEMA   WINDOW FRAME   20/01/07   AUCKLAND          10    $50.00ITEMA   WINDOW FRAME   31/01/07   CHRISTCHURCH   25   $126.50ITEMA   WINDOW FRAME   15/01/07   OTAGO                  5   $25.00
    Hope the example helps.

  • While i am trying to save the existing record with same fields in cloud DTO using flex4 mxml app

    hi,
    i am doing flex4 web application with mxml tags,
    i  am having one text box and one datagrid and one save button. text box  having one company name, data grid having employee names.
    when i click save button which is placed in outside the datagrid it will save all the details in cloud DTO.
    Now  my requirement is text box having the same company name and when i  enter same employee name in datagrid and click save button means it wont
    allow to save that record, and through msg box with some alerts.
    this is my code:
    private function saveRecord():void
                 refreshRecords();
                 model.employeeDetailsReq=new EMPLOYEEDETAILS_DTO();
                     var lengthindex:uint=model.employeeDetailsReqRecordsList.length;
                     var i:int;
                     for (i = 0; i < lengthindex; i++)
                     if((model.employeeDetailsReqRecordsList.getItemAt(lengthindex).employee name==customerdet.selectedItem.employeename)&&
                          (model.employeeDetailsReqRecordsList.getItemAt(lengthindex).employeeNumber==customerdet.s electedItem.employeeID)){
                         Alert.show("you cannot Add Same CustomerName and Invoiceno again");
    (when this line come the error through like this: Index '8' specified is out of bounds.
    else
    var dp:Object=employeedet.dataProvider;             
    var cursor:IViewCursor=dp.createCursor();
    var employeename:String = employeename.text;
             model.employeeDetailsReq.employename = employeename;
    model.employeeDetailsReq.employeeNumber=cursor.current.employeeID;
    var sendRecordToLocID:QuickBaseEventStoreRecord = new
                         QuickBaseEventStoreRecord(model.employeeDetailsReq, new
                             KingussieEventCallBack(refreshList))
                     sendRecordToLocID.dispatch();
    <mx:Button  id="btnAdd" x="33" y="419" enabled="false" label="Add" width="65"  fontFamily="Georgia" fontSize="12" click="saveRecord()"/>
    employeename and employeeID are datafields of datagrid. datagrid id=customerdet
    employeeDetailsReqRecordsList---recordlist of save records
    please help .
    any suggession or snippet code welcome
    B.venkatesan

    sorry but you question  is not very  clear...are you trying to show the item clicked on the datagrid on the input box? with an alert? you should look at "listevent" if thats the case?... sorry i just dont follow.
    Miguel

  • Selecting two different Names using the same table with same field

    Hello,
    I am trying to display several fields from different tables. Here are some of the fields that I need: The instructor needs to go after the social.
    WESL | ENGR-1101-SW1 | Hinojosa | Ashley | Social | Instructor |
    I am using a table where they have the social and I need to get both the student and the instructor. How do I select the instructor when the instructor's id is on a different table. example
    CLASS PERSON CLASS_ASSIGN
    student_id student_id: name facutly_id
    Here is the code that I have so far and it works.
    rem ----------------
    rem Filename: cer.sql
    rem Purpose: to get data from banner and put into flat file
    rem Date: August 17, 2006 4:51 P.M.
    rem Author: Robert Hernandez
    rem ---------------
    rem Notes: Need to add the Instructor - having problems
    rem using the same spriden_id.
    rem Also need to have admissions enter the grad date for
    rem several students: Procedure is working as is.
    declare
    l_output utl_file.file_type;
    grad_month varchar2(2);
    buffer varchar2(1000);
    cursor cursor1 is
    select ssrmeet_bldg_code,
    ssbsect_subj_code,
    ssbsect_crse_numb,
    ssbsect_seq_numb,
    spriden_last_name,
    spriden_first_name,
    spriden_id,
    scbcrse_title,
    ssbsect_term_code,
    sfrstcr_grde_code,
    sorhsch_graduation_date,
    decode(substr(sorhsch_graduation_date,4,3),'JAN','01',
    'FEB','02',
    'MAR','03',
    'APR','04',
    'MAY','05',
    'JUN','06',
    'JUL','07',
    'AUG','08',
    'SEP','09',
    'OCT','10',
    'NOV','11',
    'DEC','12') as grad_month,
    sorhsch_sbgi_code
    from ssbsect,ssrmeet,sfrstcr,spriden,scbcrse,sorhsch
    where rownum < 200
    and ssbsect_seq_numb like 'S%'
    and (ssrmeet_term_code = ssbsect_term_code
    and ssrmeet_crn = ssbsect_crn)
    and (ssbsect_crn = sfrstcr_crn
    and sfrstcr_pidm = spriden_pidm
    and length(spriden_id) = 9
    and substr(spriden_id,1,1) <> 'A')
    and (ssbsect_crse_numb = scbcrse_crse_numb
    and ssbsect_subj_code = scbcrse_subj_code)
    and spriden_pidm = sorhsch_pidm
    and sorhsch_graduation_date is null
    order by ssbsect_crse_numb;
    begin
    l_output := utl_file.fopen('CER','rbfpce.txt','W');
    for cur1_rec in cursor1 loop
    buffer:= cur1_rec.ssrmeet_bldg_code||'|'||
    cur1_rec.ssbsect_subj_code||'-'||
    cur1_rec.ssbsect_crse_numb||'-'||
    cur1_rec.ssbsect_seq_numb||'|'||
    cur1_rec.spriden_last_name||'|'||
    cur1_rec.spriden_first_name||'|'||
    substr(cur1_rec.spriden_id,1,3)||'-'||
    substr(cur1_rec.spriden_id,4,2)||'-'||
    substr(cur1_rec.spriden_id,6,4)||'|'||
    cur1_rec.scbcrse_title||'|'||
    cur1_rec.ssbsect_term_code||'|'||
    cur1_rec.sfrstcr_grde_code||'|'||
    '20'||SUBSTR(cur1_rec.sorhsch_graduation_date,8,2)||
    cur1_rec.grad_month||'|'||
    cur1_rec.sorhsch_sbgi_code;
    utl_file.put_line(l_output,buffer,false);
    end loop;
    utl_file.fclose(l_output);
    exception
    when no_data_found then
    utl_file.fclose(l_output);
    end;
    /

    Can you be more precise , please :
    - which table stores the people identities ? (I call this one Identity)
    - which table gives the class where the student works in (I cal l this one Claa_attendees)
    - which table gives the instructor of a class (I call this one Class)
    If your issue is that you have one table which stores Itendities , and you need to display Student identity and Instructor Identity, you have to call this table twice in your query , using table aliases . I mean :
    Select Stud_iden.name, Instr_iden.name
    From Identity Stud_iden, Identity Instr_iden, Class_attendees, Class
    Where Class.clas_id = class_attendees.class_id
    and class.instructor_id = Instr_iden.people_id
    and class_attendees.student_id = Stud_iden.people_id
    Is this what you need to do ?

  • Duplicate Reference check not working with fb60!!

    Dear SAP Members,
    User when posting vendor invoice using fb60 enters reference number in reference field . Once the invoice is posted the user clears the document. When entering another invoice using the same vendor account if the user enters the same reference the system does not prompt for duplicate entry Whereas if he does not clear the invoice document and then enters another invoice using the same vendor account and inputs the same reference number in the reference field the system prompts for duplicate entry.
    Please advice.
    Regards,
    Mohammed Ali Khan.

    hI,
    @ Grindhar: Yes the double check indicator is set.
    @ Mukta: So this means that double check indicator would only prompt me for a duplicate entry if invoice date entered is same. It will not prompt/warn me if the invoice date is different for the same vendor account.
    Another question: If in future i want to set a check on repetition of reference field how do i do it no matter what invoice date is inputted for a particular vendor account. Is possible or not? Just a hypothetical question
    Regards,
    Mohammed Ali Khan.

  • Deleting Duplicate Entries in sender JDBC adapter

    Hi i am working on JDBC to IDOC scenario.
    When i am fetching the records from the Oracle database table using select query, i am getting the records but its getting duplicated many a times and hence its failing at an idoc processing at ECC side..
    Could someone help me in deleting the Duplicate entries and passing only the required entries from Oracle databse to IDOC.
    Here is my select query.:
    Select a.order_num, a.sap_delivery_number, a.sap_delivery_line_number, a.warehouse, a.product, a.product_size, a.order_qty, a.ship_qty from XXX_h a,tr_log t where a.Prod_id = 101..
    Appreciate your help.
    Regards

    >> Its not picking up the old data instead, it is repeating the same set of data multiple times.
    The below suggestion might be helpful
    a) First do your select statement
    b) Second , Use update statement and here set some flag in that table that these records are already queried.  say boolean read = true for the above queried records.
    That's it. When you query next time, you will not reread the same data. You will read the new data.
    Duplicate Entries:  Check with db client tool like Toad or sqlplus and see whether duplicate entries exists in the table. If so, then fix the data first.
    Edited by: Baskar Gopal on Feb 22, 2011 1:02 PM

  • How to create a scenarios for duplicate entries

    Hi friends,
    Please help me how to create a scenarios for duplicate entries, we are using stock transfer orders from there we need to create scenarios for duplicate entries, please guide me on the same.

    Hi,
    F-01 can be used to create a sample document.
    Regards
    Aditya

Maybe you are looking for

  • Access AFP, email, Remote Desktop via VPN and local network but NOT web

    How can I do this? Right now I can set up all these services where I can access them via VPN only, but not on the local network or via the web. If I want to access them via the local network I have to open up the ports in the firewall, however this o

  • Buttons in panels that doent work..

    hi all. im currently developing an application where panels are switched on a frame. each panel has its own actionlistener, and is working. the problem is that the buttons i create in a panel get a null value when an action event occurs. you can see

  • Playing MP4 Files

    I just bought a new video camera which records in HD and creates an Mp4 movie file. How do I play this file on my Mac? I am not an overly technical person, but have never had an issue where my Mac was unable to read a video file. Help.

  • SSL on OAS 4.0.8.1

    Hello, We want to test SSL on the OAS 4.0.8.1 but we have no CA certificate on our hand. Is there any free trail certificate for testing? By the way, there are three files needed for configurating the SSL form, like, 1. cert file 2. dist name file 3.

  • Dead pixel on MacBook Pro 15"

    Hi, my Macbook Pro 15" has one dead pixel on the top right of the screen. It's a tiny red dot, and it is seen very clear when the screen does dark (like when you run FrontRow). Is it in the warranty condition? Thanks