How to validate an entry in a table?

I have a (single column) table view linked to an NSArrayController that has a custom class definition as its 'Class Name'. I also have KVC compliant methods to populate the array controller within my 'model'. I can see the 'countOf...' and 'objectIn...AtIndex' methods being called and the table contains the correct data.
I have the 'Validates Immediately' option set on both the table column binding and the controller content array binding.
My problems come when I alter the contents of an entry in the table. Firstly, the only 'validate...:error:' method that is called is on the custom class for the field that is updated.
Secondly, the 'insertObject:in...:AtIndex' and similar (especially the 'replaceObjectIn...AtIndex:withObject:') methods are not called.
I have checked and rechecked that the KVC names include the correctly capitalised name of the class.
How can I get the validation (and other) routines to be called?
Thanks
Susan

Abandoned!!

Similar Messages

  • How to validate the dates in the table control ?

    How to validate the dates in the table control ?
    Can I write like this ?
    LOOP AT it_tab .
    CHAIN.
    FIELD : it_tab-strtdat,it_tab-enddat.
    module date_validation.
    ENDCHAIN.
    ENDLOOP.
    Module Date_validation.
    ranges : vdat type sy-datum.
    vdat-sign = 'I'.
    VDAT-LOW = it_tab-STRTDAT.
    VDAT-HIGH = it_tab-ENDDAT.
    VDAT-OPTION = 'BT'.
    APPEND VDAT.
    WHAT CODE I have to write here to validate ?
    and If I write like this How can we know which is the current row being add ?
    It loops total internal table ..?
    Bye,
    Muttu.

    Hi,
    I think there is no need to put chain endchain.
    To do validation you have to write module in PAI which does required validations.
    Thanks
    DARSHAN PATEL

  • How to populate multiple entries to Bapi Table

    Hi all,
      How to populate multiple entries to Bapi Table.....
    Here is the code(in component controller)
      Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
           int  size = wdContext.nodeApplicants().size();
                for(int i = 0 ; i < size ; i++)
                    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
                     if(isselected == "true")
                               com.models.veteranpoint.Zrecr_Aplno appid = new
                                    com.models.veteranpoint.Zrecr_Aplno();                                        
                                    appid.setAppl_Number(wdContext.nodeApplicants().
                                        getApplicantsElementAt(i).getAppl_Number());
                               request.addApplicants(appid);
    I want to pass the selected input field to bapi..
    Please tel me where i pass the input field...
    Please correct my code...
    Thanks & regards
    Mathi s

    Hi,
    Steps to insert multiple entries to BAPI table.
    1.Create an instance for BAPI input
    2.Bind the instance to the Node of the BAPI input
    3.Create instance of the Structure(BAPI table) to which input has to be added.
    4.Set the input values to the Structure instance.
    5.Add the instance to the BAPI input.
    6.Execute
    From the given example,I assume Z_Recr_Apply_Point_Input  is the BAPI Input and com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno as Structure
    Step 1:
    Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
    Step 2:
    <b>wdContext.nodeZ_Recr_Apply_Point_Input.bind(request);</b>
    Steps 3 & 4:
    int size = wdContext.nodeApplicants().size();
    for(int i = 0 ; i < size ; i++)
    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
    if(isselected == "true")
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno appid = new
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno();
    appid.setAppl_Number(wdContext.nodeApplicants().
    getApplicantsElementAt(i).getAppl_Number());
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().addRecr_Aplno(appid);</b>
    Step 5:
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().execute();</b>
    Regards,
    Viji Priya

  • How to find latest entry in the table according to time

    how to find latest entry in the table according to the time
    is there any function module to do so
    \[removed by moderator\]
    Regards
    Shashi
    Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PM

    Hi,
    If you want to read the entry from an internal table,
    sort the internal table in the descending order by the time and
    delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
    Suggestion: instead of only time try to have one more field called date with the time combination
    Regards,
    Ramesh

  • How to check duplicate entries in internal table??

    Dear Friends,
    How to check duplicate entries in internal table??
    Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
    Thanks,
    Sridhar

    Hi,
    After storing the data into internal table say ITAb, move the data into another internal table.
    t_dup[] = itab[].
    LOOP AT itab.
        count1 = count1 + 1.
        itab-count1 = count1.
        MODIFY itab.
    ENDLOOP.
    LOOP AT t_dup.
        count2 = count2 + 1.
        t_dup-count2 = count2.
        MODIFY t_dup.
    ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT t_dup.
        record_dup = 'N'.
        READ TABLE itab WITH KEY count1 = t_dup-count2.
        IF sy-subrc = 0.
          record_dup = 'Y'.
        ENDIF.
        IF record_dup NE 'Y'.
          t_dup-message = 'DUPLICATE ENTRY'.
          t_dup-flag = 1.
          MODIFY t_dup.
        ENDIF.
      ENDLOOP.
    Use this sample code.
    Reward pts if it is helpfull.
    Regards
    Srimanta

  • How to validate an attribute in a table/EO using a DB Table

    I have an attribute LocationId in DuplicateLocationEO(LocationId,LocationName)
    And I need a validation on this so that user can enter a LocationId that exists in LOCATION_ID of HR.LOCATIONS table
    How to validate an attribute in a table/EO using a DB Table?

    Issue: Insert a value into an attribute if it is valid, Like it is available in another table.
    Scenario: Insert a Location into a DuplicateLocationEO based on LocationEO.
    Solution: Create a Entity Validator on LocationId of DuplicateLocationEO that is list based on query of LocationEO’s LocationId.
    Note: if the validation is created at attribute level, then it leads to NPE or Undesirable results.
    Procedure Steps:
    Step#01: Open desired Entity Object “DuplicateLocationEO”, Go to “Overview” tab & “Business Rules” finger tab.
    Step#02: Select “Entity Validators” & Click “+”
    Step#03: Set the following Rule Definition Tab:
    •     Select Rule Type as “List”
    •     Attribute “LocationId”
    •     Operator “In”
    •     List Type “Query Result”
    •     Enter SQL Statement “Select LOCATION_ID FROM LOCATIONS”
    Step#04: Now go to “Failure Handling” tab & Select radio button for “Error”.
    Step#05: Click the Magnifier link to create a message.
    Step#06: In the “Select Text Resource” popup. Provide the following
    •     Display Value: “Invalid LocationId: {LocationId}. Please enter a valid Location”
    •     Key: INVALID_LOC
    •     Description: message when user enters an invalid location.
    Step#07: Click “Save and Select” Button
    Step#08: Click “OK” Button
    Reference:
    DuplicateLocationEO DDL Script:
    CREATE TABLE "HR"."TEST_LOC"
    (     "LOCATION_ID" NUMBER NOT NULL ENABLE,
         "LOCATION_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         CONSTRAINT "TEST_LOC_PK" PRIMARY KEY ("LOCATION_ID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    To Populate Rows:
    Insert into TEST_LOC select Location_id, city from LOCATIONS

  • How to delete the entries in CDCLS table

    Hi All,
    There is a potential issue with the size of table CDCLS on production system. We need to reduce or manage the amount of data in this table. CDCLS is a cluster table and cannot be reduced directly,
    So first we were reduced the entries in CDHDR and then from CDPOS tables.
    After that we tried to reduce the entries from CDCLS table through the program - RSSCD7RE, We are facing the error as - no data available and No active archive key was selected.
    Please help me out, how to proceed further in this task. Thanks in advance.

    Go to DB15 and see the archiving object.
    You can also use the archiving object CHANGEDOCU, please refer SAP documents for that.
    Transaction is
    SARA -> Archive object CHANGEDOCU
    Message was edited by:
            ANIRUDDHA DAS

  • How to find delete entries in custom table

    Hi,
    We have a custom table with table maintenance in Production. Some one deleted all the entries from the table. Can you please let me know how to retreive the old entries from the table and how to check who deleted the entries.
    Thanks
    Rama

    hi rama,
    Please refer to the below given link,
    [http://help.sap.com/saphelp_nw70/helpdata/en/43/0510abcda521abe10000000a1553f6/content.htm]
    I think it will sove ur problem,
    Reward points if usefull,
    Thanks,
    Kalyan.

  • How to delete obsolete entries in SID table

    I have an Infoobject (0PCA_ITEMNO)  without master data and is used in a DSO. The sid table of the info object and its index has grown very large to about 207 gB. The DSO is periodically selectively deleted to hold the last 3 months data. How can I delete the the old and unused sid table entries to reduce the size.

    Correct...you wouldn't want to delete the SID table values using custom code. This would potentially cause inconsistencies because you may inadvertently delete a SID value that is located elsewhere in your environment.
    For example, if you have an InfoObject with SID value 1 for actual value of A1 and it's deleted. However, there is an InfoCube that has SID value 1 for this InfoObject in a dimension table.
    To remove the values from the SID table for this InfoObject, your best bet is to use RSRV as stated before.

  • How to generate an entry in COSS table?

    Hello, i need to generate an entry in the COSS table.How can i do this? Can i create a billing document using the cost center i have created?

    Hi,
    COSS stores totals for internal CO postings. So any CO posting, e.g. allocation (SKV5), costs transfer (KB11N), etc. should update COSS.
    Regards,
    Eli

  • How to validate the data in the table

    Hi Experts,
    My question is
    I am having a table control on my view. I need to validate the data entered by the user on the table
    and after validation i need to save the data into database table.
    Now my question is only related to Data Validation on table UI element.
    If the user enters 3 rows and if the 2nd and 3rd row are already existing,
    It should throw the message Entry already exists and the pointer should
    be at Row number 2 in this case.
    Similarly in the 2nd row i have a date field and if the user enters some character
    then it should throw an error message that Numeric values are only allowed and
    the pointer is placed in the 2nd row Date column so that it allows user to modify
    the wrong entry.
    Please advise.
    Regards,
    Chitrasen

    Hi,
    for validating user input in table , you have to get the entries inserted by user into an internal table using get_static_attribute_table and futher have your check using loop endloop.
    For date field, make the context attribute binded to date column as DATS. This would make sure the user inputs a valid date without your custom code.

  • How to delete the entries in internal table

    Hi Experts,
    I have 2 internal tables ,
    if i find any same entries of 2 internal tables,  i have to delete that entries in first internal table.
    Regards,
    Srinivasu

    hi check this..
    report .
    data:begin of itab occurs 0,
         f1 type c ,
         f2 type i,
         end of itab .
    data:begin of itab1 occurs 0,
         f1 type c ,
         end of itab1 .
         itab-f1 = 'A'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'b'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'c'.
         itab-f2 = 12.
         append itab .
         itab1-f1 = 'A'.
         append itab1 .
    loop at itab1 .
    read table itab with key f1 = itab1-f1 .
    if sy-subrc  = 0.
    delete itab where  f1 = itab1-f1 .
    endif .
    endloop.
    loop at itab.
    write:/ itab-f1,itab-f2.
    endloop.

  • How to delete the entries from NAST table

    Hi,
    Please help me out by providing any function module that delete's the entries from hte NAST table.
    Regards,
    Kiran.L

    REPORT ZSCD_TEST13.
    delete from nast where VSTAT = '1'.
    =====
    If you see the FM : NAST_DELETE_OBJECT, its only useful when NACHA = 7 (i.e. message transmission medium = Simple Mail)
    For others its not useful.
    We had similar issue few days back and after long RnD, we straightaway deleted the entries using the Zprogram.
    regards,
    Edited by: Pranu Pranu on Aug 19, 2008 1:42 PM

  • How to delete an entry in a table when drop a user????

    I want to write a trigger that when someone drop a user, delete the related data in one table ..
    how to write this one ???

    Hi,
    You can create a DDL trigger. (a trigger that fire after a DROP command for example):
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#i2235611
    In this trigger you can look for a specific event (use the ora_sysevent, ora_dict_obj_owner, ora_dict_obj_name system variables if you only wnat to track the drop of users.
    you have a such example here:
    http://psoug.org/reference/ddl_trigger.html
    I suggest you to start with a trigger that log all drop command and then you issue different drop command and see how the trigger is logging the different events ..
    Edited by: user11268895 on Aug 16, 2010 10:44 AM

  • How to read specific entry in standard table view :

    Hi Friends,
    Can anybody please give me code on how to read a record in table view having 5 records.
    I have a requirement on how to read the specific address out of 5.
    I tried doing in ON_NEW_FOCUS method.
    Thanks,
    Chitrakant

    Hello,
    Try to do it in the DO_PREPARE_OUTPUT mathod before calling super->do_prepare_output( ). What we need to do is,
    1. get the collection from context node ( get_collection_wrapper )..
    2. filter the entity based on the value ( using iterator !!! )
    3. set back to context node
    4. call super->do_prepare_output.
    Hope it helps.
    Regards,
    Sandeep Kumar B

Maybe you are looking for

  • One field is not downloading properly from ALV to EXCEL

    Hi, while downloading ALV out put to EXCEL sheet one field(CSTCTR) is not displaying properly it's truncating left and right side digits, I have used function REUE_ALV_GRID_DISPLAY FORM SUMMARY_REPORT .   PERFORM BUILD_FIELDCATLOG.   IF I_FINAL[] IS

  • What is the Full Charge Capacity showing for your 11.6 MBA

    Mine started out at around 4675 and is now at 4539 with 16 Cycles. I'd like to see if I'm in the ballpark and if not, what the users with higher capacity are doing: charging, conditioning, etc.

  • Face recognition using labview

    I, am into my final year project. I am  doing face recognition using labview. I want to know how to compare image using labview. it would be  great if someone helped , as it is proving to be a major obstacle in my way

  • List PM orders and Service PR no. from them

    Hi      is there any Tcode that displays the list of PM orders and the service PR no. generated from the associated order.

  • All SDK files crash when started  (errors generated and closed by windows)

    Every time I try to start a java program in SDK 1.4 through windows or through dos, it gives me an error approximate to: Javac.exe has created erros and will be closed by windows. An error log has been created. This happens EVERY time, and I was wond