Editing a record using Objects SAP2007a

Hi
I  wrote a program using SAP objects to store contact information for one of our customers.
I created a SAP object which handled the master table and 2 transactions tables
There was very little code in the program but the screens are quite complicated
The user has been adding and editing records for some years now with no problem
Recently though a user must have changed the contact number ( code field ) of an existing record and they lost the information in the 2 child tables
When I looked in the tables the code field in the main table had changed but not the code fields in the transaction tables
Should I test for this in code or is there some automatic way for the code field to be changed in the transaction tables ?
Any ideas please ?
Regards Andy

Hi Andy,
I doubt both your thoughts, code either being changed automatically or thru code.  If the same code has been working all these years, and if the user has done a similar operation earlier, there is no chance of problem being in the code.
If such an operation performed by the user is for the first time, then, there might be a doubt in the way things are handled in the code. 
My sincere advice is, you might check with the user himself as to what exactly was done during the update of the contact info.  If they had tried to change any other value, like say code or something due to a typo perhaps, and if that is not handled by your code, then, chances are there for this scenario of yours.
Regards,
Satish.

Similar Messages

  • Archive Records using object MM_SPSTOCK, MSKA records not archived.

    Hello ,
    I am trying to Archive some material using object MM_SPSTOCK, i used Tcode MM74, I have just checked only "other special stock " option and executed. its giving me below error messages :
    MSKA: 18345 EN30 EN31 E V57292 000100 unrestricted-use stock exists for previous period
    MSSA: 18345 EN30 E V57292 000100 dependent sales order stock records exist
    I have checked the stock, its cleared. In table MSKA, i can see one records with 0 stock.
    I have also checked the stock using MMBE, but no stock found.
    Can you guide me why above errors are coming, because of this i am not able to archive my sales order.
    Regards,
    Sujeet Mishra

    FM MSKA_EXTEND  is used to check previous period stock.
    the message and I told you already that you have stock in a previous period.
    And I told you to read OSS 30656 as this note explains how to remove stock in a previous period.
    further I told you that it does not make sense to archive something what is still in use, which is the case for a special stock if it has stock in the previous period.
    There is no legal work around. 
    Please open a message at SAP Support and have them confirm what was said, or  raise a developement request directly

  • Is it possible to edit parameters of an object in the environment using a midi controller?

    Is it possible to edit parameters of an object in the environment (such as the key parameter of a chord memorizer) using a midi controller?

    Anyone know what I can do? Maybe even some kind of setup in the environment that will do this?
    Thanks

  • I record with a sony ax2000 and use the 1080 60i setting. what should i edit with when using adobe premiere ele 10

    I record with a sony ax2000 and use the 1080 60i setting. what settings should I edit with when using adobe premiere elements 10?

    smannino
    You have duplicate threads on this issue related to project preset suggestion for your 1080 60i video.
    I have responded to your question in the other thread
    if i record with a sony ax2000 using 1080 60 i what is the best editing setting to use with elements 10?
    Please reply in that other thread.
    Thank you.
    ATR

  • Error while using "edit" transaction on Equipment Object - SAP Work manager on Syclo Agentry

    Hello Experts,
    I am trying to execute an edit transaction on Equipment object. I have currently called the edit transaction using a button on Equipment Details screen as follows.
    1) Created a transaction on Equipment object.
    P
    2) Properties have "EquipmentID".
    3) Config. under this property:
    4) the Update step under this transaction.
    5) the action which calls this transaction:
    6) Action steps:
    7) Action step to call the transaction:
    Apart from these settings, I have created the required screen set, required button, navigation, set up fields on the screen referring to the transaction and all other required settings.
    Now, while running the application, I am able to navigate and pass the field values from details screen to custom edit screen.
    While clicking on apply (green check button), it throws the following error:
    What can be missing here? Is it mandatory to create a rule on Key property of the transaction? As of now, no rule exists on the ID as it is an edit transaction.
    Any help will be greatly appreciated.

    Hi Steve,
    Thank you so much for your reply. along with these 3 steps, I also changed the action step to point it to equipment instead of "none" and it stopped throwing the error.
    However, I got an exception while executing the BAPI using stephandler.
    My source code looks as below.
    Steplet:
    public boolean execute() throws AgentryException {
        try{
    EquipmentEditStephandler handler = new EquipmentEditStephandler((com.syclo.sap.User)_user);
    handler.editEquipment();
        return true;
        catch(Throwable exception){
        throwExceptionToClient(exception);
        return false;
    StepHandler:
    public void editEquipment() throws Exception{
            CustEquipment[] array = null;
            CustEquipment custEquipObj = new CustEquipment();
            EquipmentEditBapi bapi = new EquipmentEditBapi(user, new GregorianCalendar());
            bapi.run(custEquipObj);
            bapi.processResults();
    The BAPI code to set parameters:
    public void setParameters(SAPObject obj) throws Exception
    super.setParameters(obj);
    try {
    Logger log = new Logger(_user, "FetchBAPI_Java_Class");
    //Pass Transaction Vales to BAPI_WRAPPER
    JCO.Structure jcoStructure = _imports.getStructure("IS_EQUI_ADDR");
    String City = user.getString("transaction.City");
    setValue(jcoStructure, log, "CITY", City);
    String Country = user.getString("transaction.Country");
    setValue(jcoStructure, log, "COUNTRY", Country);
    String Name2 = user.getString("transaction.Name2");
    setValue(jcoStructure, log, "NAME2", Name2);
    String EquipmentID = user.getString("transaction.EquipmentID");
    setValue(jcoStructure, log, "EQUIPMENTID", EquipmentID);
    catch (Exception e) {
    user.rethrowException(e, true);
    while executing, the data structure that reaches ECC, is blank.
    on the Java front, this exception is thrown:

  • Edit / delete MySql records using dreamweaver Tutorial

    is there any tutorials out there to show the edit & delete records, i can add records into a mySql database, then when i try and edit the list whatever record i try to edit off a edit list it just takes me to the first record on the database? instead of the record i have selected?
    any ideas would be appreciated
    Thanks

    I know of a great book that you would really benefit from. I got started on php/mysql with it. Sometimes the author contributes on this forum too. It is called PHP Solutions by David Powers. It is way better than any simple tutorial.
    If you are actually trying to learn php/mysql this book is going to be one you will reference frequently and find what you are looking for.
    Good luck. Check out amazon, they usually have it for pretty cheap (about 30 USD).

  • How to detect if a user has changed a record using a custom method?

    I am in the process of developing a test case application using ADF JSF and a collection of Java objects that are not populated by a database.
    Details of what I have developed so far can be found on this post:
    how to create a new record using a custom method?
    Is it possible to detect if a user has changed the value(s) of a record?
    I have set the edit page up (as described in the other post) and this works fine, but how could I tell if the user has changed something on that record. This is what I would like to do, but am not sure how to achieve it or whether it is possible....
    when the user puts a record in edit mode, take a copy of that record
    then when the user presses save or exit to navigate away from the edit page do a comparison between the original values and the potentially changed ones
    then depending on the outcome of the comparison call an appropriate action
    Thanks in advance for your help
    David

    If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
    Brian
    Attachments:
    Changed.vi ‏22 KB

  • File I/O Using Object Streams

    My program is supposed to be a Driving instructor program that allows someone to enter a Name and Lesson Number, and it will pull up the Date, and Comments that the lesson took place. The information is saved in a file with the person's name, and saved as an array. We are required to use Object Streams for the file i/o. The only part of the program that I don't have working is the actual file i/o. The large commented section that I have in the datamanager class is the notes from the professor on the board and I haven't removed them yet. There are 4 classes for this file.
    The main class that creates the program and calls the other classes.
    import java.awt.*;
    import javax.swing.*;
    public class main {
    /** Creates a new instance of main */
    public main() {
    * @param args the command line arguments
    public static void main(String[] args)
    guiLayout labelFrame = new guiLayout(); // creates LabelFrame
    labelFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
    labelFrame.setSize(600, 200);
    labelFrame.setVisible(true);
    } The second class is the GUI class and event handler class.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class guiLayout extends JFrame{
        private JPanel centertop;
        private JPanel centermiddle;
        private JPanel centerbottom;
        private JLabel dateLabel;
        private JLabel nameLabel;
        private JLabel lessonLabel;
        private JLabel commentsLabel;
        private JTextArea DateTextArea;
        private JTextArea NameTextArea;
        private JTextArea LessonTextArea;
        private JTextArea CommentsTextArea;
        private JButton Save;
        private JButton Retrieve;
        private String tempDay[];
        private DataManager DMO;
        /** Creates a new instance of guiLayout */
        public guiLayout()
            super("Drive Application");
            setLayout(new FlowLayout());
            dateLabel = new JLabel("Date (mm/dd/yy)");
            nameLabel = new JLabel("Name");
            lessonLabel = new JLabel("Lesson (1-10)");
            commentsLabel = new JLabel("Comments");
            DateTextArea = new JTextArea(1, 7);
            NameTextArea = new JTextArea(1, 15);
            LessonTextArea = new JTextArea(1, 2);
            CommentsTextArea = new JTextArea(6, 30);
            Save = new JButton( "Save");
            Retrieve = new JButton( "Retrieve");
            //insert into GUI
            //TOP
            centertop = new JPanel();
            centertop.add(nameLabel);
            centertop.add(NameTextArea);
            centertop.add(lessonLabel);
            centertop.add(LessonTextArea);
            centertop.add(dateLabel);
            centertop.add(DateTextArea);
            centertop.setLayout(new GridLayout(6,1));
            add(centertop, BorderLayout.NORTH);
            centermiddle = new JPanel();
            centermiddle.setLayout(new GridLayout(1,1));
            centermiddle.add(CommentsTextArea);
            add(centermiddle, BorderLayout.CENTER);
            centerbottom = new JPanel();
            centerbottom.setLayout(new GridLayout(1,3));
            centerbottom.add (Save);
            centerbottom.add(Retrieve);
            add(centerbottom, BorderLayout.SOUTH);
            ButtonHandler handler = new ButtonHandler();
            Save.addActionListener( handler);
            Retrieve.addActionListener(handler);
        private class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent event)
                String Namein = NameTextArea.getText();
                String Datein = DateTextArea.getText();
                String Commentsin = CommentsTextArea.getText();
                int Lessonin = Integer.parseInt(LessonTextArea.getText());
                if(event.getSource()==Save)
                   DMO.Save(Namein, Datein, Commentsin, Lessonin);
                if(event.getSource()==Retrieve)
                    if(Lessonin >= 1 && Lessonin <= 10)
                       LessonRecord r = (DMO.Retrieve(Namein, Lessonin));
                    else
                        String errormess = "Lesson Number must be between 1 and 10!";
                        CommentsTextArea.setText(errormess);
    }The third class is the DataManager class which handles the actual file i/o.
    import java.io.*;
    import java.util.*;
    public class DataManager implements Serializable
        //private String Path = "P:\\D00766703\\CET431\\Assign5";
        private String Path = "C:\\Java";
        FileInputStream fin;
        FileOutputStream fout;
        ObjectInputStream oin;
        ObjectOutputStream oout;
        public String Retrieve(String name, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            if (f.exists() == true)
                try
                    if(fin == null)
                        fin = new FileInputStream(itemFile);
                        oin = new ObjectInputStream(fin);
                    LessonRecord r[] = oin.readObject();
                    if(fin.available() == 0)
                        oout.close();
                        fout.close();
                        return r[lesson - 1];
                catch(IOException ioe)
                    System.out.print(ioe);
            else
                LessonRecord LR = new LessonRecord();
                LR.date = " ";
                LR.comment = "File Not Found";
                return LR;
        /*create file object for Path\\Name
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *  return |r[lesson - 1];
         *else file does NOT EXIST
         *  LessonRecord LR = new LessonRecord();
         *  LR.date = " ";
         *  LR.comment = error message;
         *  return LR;
        public void Save(String name, String date, String comment, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord |r[];
            if (f.exists() == true)
                try
                    fin = new FileInputStream(itemFile);
                    oin = new ObjectInputStream(fin);
                    LessonRecord r[] = oin.readObject();
                catch(IOException ioe)
                    System.out.print(ioe);
            else
                r = new LessonRecord[10];
            r[lesson - 1] = new LessonRecord(date, comment);
            fout = new FileOutputStream(itemFile, true);
            oout = new ObjectOutputStream(fout);
            oout.write(r);
            oout.close();
            fout.close();
        /*create file object for Path\\Name
         *LessonRecord |r[];
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *else
         *  |r = new LessonRecord[10];
         *|r[lesson - 1] = new LessonRecord(date, comment);
         *createfileoutputstream(BaseDir\\Name);
         *createobjectoutputstream - oout
         *oout.write(|r);
         *closeobjectstream
         *closefilestream
    }And the fourth class is the LessonRecord class which is serializable and has the date and comments variables.
    import java.io.Serializable;
    public class LessonRecord implements Serializable
        public String Date;
        public String Comment;
        /** Creates a new instance of LessonRecord */
        public LessonRecord()
            Date = "";
            Comment = "";
        public LessonRecord(String Datein, String Commentin)
            Date = Datein;
            Comment = Commentin;
    }I could have sworn that the professor said to make it |r for the account records variable names, but I always get errors when I do that, and I need to know how to cast to an array too.

    hi Friend,
    I have made some modification to your code. and try this...I think it will help you...
    /*guiLayout.java*/
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class guiLayout extends JFrame{
        private JPanel centertop;
        private JPanel centermiddle;
        private JPanel centerbottom;
        private JLabel dateLabel;
        private JLabel nameLabel;
        private JLabel lessonLabel;
        private JLabel commentsLabel;
        private JTextArea DateTextArea;
        private JTextArea NameTextArea;
        private JTextArea LessonTextArea;
        private JTextArea CommentsTextArea;
        private JButton Save;
        private JButton Retrieve;
        private String tempDay[];
        private DataManager DMO;
        /** Creates a new instance of guiLayout */
        public guiLayout()
            super("Drive Application");
            DMO=new DataManager();
            setLayout(new FlowLayout());
            dateLabel = new JLabel("Date (mm/dd/yy)");
            nameLabel = new JLabel("Name");
            lessonLabel = new JLabel("Lesson (1-10)");
            commentsLabel = new JLabel("Comments");
            DateTextArea = new JTextArea(1, 7);
            NameTextArea = new JTextArea(1, 15);
            LessonTextArea = new JTextArea(1, 2);
            CommentsTextArea = new JTextArea(6, 30);
            Save = new JButton( "Save");
            Retrieve = new JButton( "Retrieve");
            //insert into GUI
            //TOP
            centertop = new JPanel();
            centertop.add(nameLabel);
            centertop.add(NameTextArea);
            centertop.add(lessonLabel);
            centertop.add(LessonTextArea);
            centertop.add(dateLabel);
            centertop.add(DateTextArea);
            centertop.setLayout(new GridLayout(6,1));
            add(centertop, BorderLayout.NORTH);
            centermiddle = new JPanel();
            centermiddle.setLayout(new GridLayout(1,1));
            centermiddle.add(CommentsTextArea);
            add(centermiddle, BorderLayout.CENTER);
            centerbottom = new JPanel();
            centerbottom.setLayout(new GridLayout(1,3));
            centerbottom.add (Save);
            centerbottom.add(Retrieve);
            add(centerbottom, BorderLayout.SOUTH);
            ButtonHandler handler = new ButtonHandler();
            Save.addActionListener( handler);
            Retrieve.addActionListener(handler);
        private class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent event)
                String Namein = NameTextArea.getText();
                int Lessonin = Integer.parseInt(LessonTextArea.getText());
                if(event.getSource()==Save)
                    String Datein = DateTextArea.getText();
                     String Commentsin = CommentsTextArea.getText();
                   DMO.Save(Namein, Datein, Commentsin, Lessonin);
                if(event.getSource()==Retrieve)
                    if(Lessonin >= 1 && Lessonin <= 10)
                       LessonRecord r = (DMO.Retrieve(Namein, Lessonin));
                       System.out.println("Retrieve:"+ r.Comment+":"+r.Date);
                    else
                        String errormess = "Lesson Number must be between 1 and 10!";
                        CommentsTextArea.setText(errormess);
    /*DataManager.java*/
    import java.io.*;
    import java.util.*;
    public class DataManager implements Serializable
        //private String Path = "P:\\D00766703\\CET431\\Assign5";
        private String Path = "C:/Java";
        FileInputStream fin;
        FileOutputStream fout;
        ObjectInputStream oin;
        ObjectOutputStream oout;
        public LessonRecord Retrieve(String name, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord[] r=null;
            if (f.exists() == true)
                try
                    if(fin == null)
                        fin = new FileInputStream(itemFile);
                        oin = new ObjectInputStream(fin);
                    r= (LessonRecord[])oin.readObject();
                    System.out.println(r[lesson-1].Comment+":"+r[lesson-1].Date);
                catch(IOException ioe)
                    System.out.print(ioe);
                  catch(ClassNotFoundException c){
                    c.printStackTrace();
                finally
                    try {
                        if(fin!=null)fin.close();
                        if(oin!=null)oin.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            else
                LessonRecord LR = new LessonRecord();
                LR.Date = " ";
                LR.Comment = "File Not Found";
                return LR;
        /*create file object for Path\\Name
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *  return |r[lesson - 1];
         *else file does NOT EXIST
         *  LessonRecord LR = new LessonRecord();
         *  LR.date = " ";
         *  LR.comment = error message;
         *  return LR;
      return r[lesson - 1];
        public void Save(String name, String date, String comment, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord r[]=new LessonRecord[10];
            if (f.exists() == true)
                try
                    fin = new FileInputStream(itemFile);
                    oin = new ObjectInputStream(fin);
                     r = (LessonRecord[])oin.readObject();
                catch(IOException ioe)
                    System.out.print(ioe);
                catch(ClassNotFoundException c){
                    c.printStackTrace();
                finally
                    try {
                        if(fin!=null)fin.close();
                        if(oin!=null)oin.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            else
                r = new LessonRecord[10];
       try
            r[lesson - 1] = new LessonRecord(date, comment);
            fout = new FileOutputStream(itemFile);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(r);
            oout.flush();
       catch(IOException ioe)
            finally
                try {
                    if(fout!=null)fout.close();
                    if(oout!=null)oout.close();
                } catch (IOException ex) {
                    ex.printStackTrace();
        /*create file object for Path\\Name
         *LessonRecord |r[];
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *else
         *  |r = new LessonRecord[10];
         *|r[lesson - 1] = new LessonRecord(date, comment);
         *createfileoutputstream(BaseDir\\Name);
         *createobjectoutputstream - oout
         *oout.write(|r);
         *closeobjectstream
         *closefilestream
    }main.java and LessonRecord.java does not have any changes so you use the old code....
    Thanks
    Edited by: rajaram on Sep 28, 2007 1:24 PM

  • Restricting User from creating new records using when-validate-record

    Hi,
    I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.
    I have done the following setups
    Seq 10
    Description Restricting user from creating Affiliate records
    Level Function
    Enabled Yes
    Condition:
    Trigger Event WHEN-VALIDATE-RECORD
    Trigger object VNDR
    Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
    and
    ${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
    Processing Mode BOTH
    Context
    Level User
    Value User Name
    Action Sequence 1
    Type Message
    Action Description Saving Affiliate record
    Language ALL
    Message Type Show
    Message Text You Cannot Create Affiliate records Here
    Action Sequence 2
    Type Builtin
    Action Description Stop Proceesing
    Language ALL
    Action Enabled Yes
    Builtin Type RAISE FORM_TRIGGER_FAILURE;
    This is working good on one instance but when I moved it to another instance
    when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
    Any suggestions on this would be higly appriciated.
    Thanks in Advance.

    Hi Srini,
    Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
    Sometimes it doesn't give any response.
    Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
    Please share any ideas/example if yiou have to achieve the below requirement.
    Requirement:
    Once New record is created , a Custom Procedure should be invoked.
    with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
    Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
    Thanks & regards,
    Edited by: user632004 on Mar 16, 2010 7:50 PM
    Edited by: user632004 on Mar 16, 2010 8:09 PM

  • How can I Edit preferences performance use Graphics Processor option through the jsx script

    Hi I need to check and access the Edit>preferences>performance>use Graphics Processor option setting through the script. i cant find it in the object domain, I have the following to check the current state:
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    var openglEnabled = executeActionGet(ref).getObjectValue (charIDToTypeID('CchP')).getBoolean (stringIDToTypeID('openglEnabled'));
    alert( openglEnabled );
    but then i am unable to set the value using this:
    var openglEnabled = executeActionGet(ref).getObjectValue (charIDToTypeID('CchP')).putBoolean (stringIDToTypeID('openglEnabled'));
    I tried using a recorded action but that doesnt work. Any recommendations?

    If you load the scriptlisener plug-in when you set  your preference to enable your GPU it will record the code you need.  The Code I posted to your thread in the scripting forum the other day.
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc29 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref19 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idCchP = charIDToTypeID( "CchP" );
            ref19.putProperty( idPrpr, idCchP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref19.putEnumerated( idcapp, idOrdn, idTrgt );
        desc29.putReference( idnull, ref19 );
        var idT = charIDToTypeID( "T   " );
            var desc30 = new ActionDescriptor();
            var idMmrU = charIDToTypeID( "MmrU" );
            var idPrc = charIDToTypeID( "#Prc" );
            desc30.putUnitDouble( idMmrU, idPrc, 90.000000 );
            var idopenglEnabled = stringIDToTypeID( "openglEnabled" );
            desc30.putBoolean( idopenglEnabled, true );
        var idCchP = charIDToTypeID( "CchP" );
        desc29.putObject( idT, idCchP, desc30 );
    executeAction( idsetd, desc29, DialogModes.NO );

  • Frames (Cannot Edit a Record)

    I have a program.
    It displays the Form. On the form are the various controls i.e text fields and buttons.
    They ask the user to enter the name and phone nos.
    Their are also add record button, find record button, delete record button and save record button.
    My problem is that when I am suppose to edit a record it does not do so.
    Please help.
    I am using java version 1.3.1
    <---------------------------------------------------------------------->
    Here is the Phone.java file
    <---------------------------------------------------------------------->
    public class Phone
    public Phone(long aPhoneNo, String aName)
    phoneNo = aPhoneNo;
    name = aName;
    public long getPhoneNo()
    return phoneNo;
    public String getName()
    return name;
    private long phoneNo;
    private String name;
    <---------------------------------------------------------------------->
    Here is the PhoneBook.java file
    <---------------------------------------------------------------------->
    import java.util.ArrayList;
    public class PhoneBook
    public PhoneBook()
    records = new ArrayList();
    public void addPhone(Phone aPhone)
    records.add(aPhone);
    public long findPhone(String name)
    long phoneNo;
    Phone p;
    for (int i = 0; i < records.size(); i++)
    p = (Phone)records.get(i);
    if (name.equals(p.getName()))
    return phoneNo = p.getPhoneNo();
    return 0;
    public void deletePhone(Phone aPhone)
    long phone1, phone2;
    String name1, name2;
    for (int i = 0; i < records.size(); i++)
    Phone p = (Phone)records.get(i);
    phone1 = p.getPhoneNo();
    name1 = p.getName();
    phone2 = aPhone.getPhoneNo();
    name2 = aPhone.getName();
    if ((phone1 == phone2) && name1.equals(name2))
    records.remove(i);
    public void editPhone(long phoneNo, String name)
    Phone p = new Phone(phoneNo, name);
    long phone1, phone2;
    String name1, name2;
    for (int i = 0; i < records.size(); i++)
    Phone pObj = (Phone)records.get(i);
    phone1 = p.getPhoneNo();
    name1 = p.getName();
    phone2 = pObj.getPhoneNo();
    name2 = pObj.getName();
    if ((phone1 == phone2) && name1.equals(name2))
    records.set(i, p);
    private ArrayList records;
    <---------------------------------------------------------------------->
    Here is the PhoneGui.java file
    <---------------------------------------------------------------------->
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import javax.swing.JTextField;
    import javax.swing.JPanel;
    import java.awt.GridLayout;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    * <p>Title: Assignment No. 3</p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: Humber College</p>
    * @author Gurjeet Singh
    * @version 1.0
    public class PhoneGui extends JFrame
    public PhoneGui()
    objectPhoneBook = new PhoneBook();
    createEnterDataPanel();
    createButtonsPanel();
    public void createEnterDataPanel()
    JPanel enterDataPanel = new JPanel();
    enterDataPanel.setLayout(new GridLayout(2, 2));
    JLabel lblName = new JLabel("Enter a Name : ");
    txtName = new JTextField(50);
    JLabel lblPhone = new JLabel("Enter a Phone# : ");
    txtPhone = new JTextField(12);
    enterDataPanel.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT));
    enterDataPanel.add(lblName);
    enterDataPanel.add(txtName);
    enterDataPanel.add(lblPhone);
    enterDataPanel.add(txtPhone);
    getContentPane().add(enterDataPanel, BorderLayout.NORTH);
    public void createButtonsPanel()
    JPanel buttonsPanel = new JPanel();
    buttonsPanel.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HEIGHT));
    buttonsPanel.setLayout(new GridLayout(1, 4));
    JButton buttonAddRecord = new JButton("Add a Record");
    JButton buttonFindRecord = new JButton("Find and display");
    JButton buttonDeleteRecord = new JButton("Delete");
    JButton buttonEditRecord = new JButton("Save");
    buttonsPanel.add(buttonAddRecord);
    buttonsPanel.add(buttonFindRecord);
    buttonsPanel.add(buttonDeleteRecord);
    buttonsPanel.add(buttonEditRecord);
    getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
    class ButtonListener1 implements ActionListener
    public void actionPerformed(ActionEvent event)
    phoneNo = Long.parseLong(txtPhone.getText());
    name = txtName.getText();
    objectPhoneBook.addPhone(new Phone(phoneNo, name));
    ButtonListener1 listener1 = new ButtonListener1();
    class ButtonListener2 implements ActionListener
    public void actionPerformed(ActionEvent event)
    name = txtName.getText();
    phoneNo = objectPhoneBook.findPhone(name);
    if (phoneNo != 0)
    txtPhone.setText("" + phoneNo);
    else
    txtPhone.setText("No Record found");
    ButtonListener2 listener2 = new ButtonListener2();
    class ButtonListener3 implements ActionListener
    public void actionPerformed(ActionEvent event)
    name = txtName.getText();
    phoneNo = Long.parseLong(txtPhone.getText());
    objectPhoneBook.deletePhone(new Phone(phoneNo, name));
    ButtonListener3 listener3 = new ButtonListener3();
    class ButtonListener4 implements ActionListener
    public void actionPerformed(ActionEvent event)
    name = txtName.getText();
    phoneNo = Long.parseLong(txtPhone.getText());
    objectPhoneBook.editPhone(phoneNo, name);
    ButtonListener4 listener4 = new ButtonListener4();
    buttonAddRecord.addActionListener(listener1);
    buttonFindRecord.addActionListener(listener2);
    buttonDeleteRecord.addActionListener(listener3);
    buttonEditRecord.addActionListener(listener4);
    private static final int PANEL_WIDTH = 520;
    private static final int PANEL_HEIGHT = 100;
    private JTextField txtName;
    private JTextField txtPhone;
    private long phoneNo;
    private String name;
    PhoneBook objectPhoneBook;
    <---------------------------------------------------------------------->
    Here is the PhoneGui.java file
    <---------------------------------------------------------------------->
    import javax.swing.JFrame;
    public class TestPhoneGui
    public static void main(String[] args)
    JFrame frame = new PhoneGui();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.show();
    frame.pack();

    Ok, first, don't post so damn much, it makes it really annoying to read.
    public void editPhone(long phoneNo, String name)
    Phone p = new Phone(phoneNo, name);
    long phone1, phone2;
    String name1, name2;
    for (int i = 0; i < records.size(); i++)
    Phone pObj = (Phone)records.get(i);
    phone1 = p.getPhoneNo();
    name1 = p.getName();
    phone2 = pObj.getPhoneNo();
    name2 = pObj.getName();
    if ((phone1 == phone2) && name1.equals(name2))
    records.set(i, p);
    } // end if
    } // end for
    } // end editPhone()Okay, you are correct... this method DOES do nothing.
    Why should it? It creates a new Phone object, compares that against each of the existing Phone objects, if it finds one that matches, it replaces it with THE SAME ONE.
    It might be a better idea to either make
    public void editPhone(long phoneNo, String name)
    so that when it finds an entry that matches, it prompts for user input for a new phoneNo and name.
    That, or make
    public void editPhone(Phone toFind, Phone toReplace)
    which I think is simplest and most obvious.
    I personally would have made a method
    PhoneBook.editPhone(Phone toFind)
    editPhone(toFind.getPhoneNo(), toFind.getName());
    PhoneBook.editPhone(long number, String name)
    for (int i = 0; i < records.size(); i++)
    Phone p = (Phone)records.get(i);
    if ((number == p.getNumber()) && name.equals(p.getName()))
    p.edit();
    return;
    } // end if
    } // end for
    } // end editPhone()And have a Phone.edit() method, but that would be most suited to a console app.
    You need to have a look at how you want to edit a phonebook entry, and what it was you were currently doing.
    Good luck
    Radish21

  • How can i inserts record using procedure in adf

    how can i insert record using procedure
    hi i have the following i what to insert record using store procedure, i try this
    am in JDeveloper Studio 11.1.2.1.0
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="SmsPartyAddressView"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.SmsPartyAddressViewRowImpl"
      ComponentClass="sms1100.SmsPartyAddressViewImpl"
      DefClass="sms1100.SmsPartyAddressViewDefImpl"
      RowInterface="sms1100.common.SmsPartyAddressViewRow"
      ClientRowProxyName="sms1100.client.SmsPartyAddressViewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Def|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.SmsPartyAddressView_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
             SmsProperties.ERF_NO,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ZONE,
           SmsProperties.GPS_LONGITUDE,
           SmsProperties.GPS_LATITUDE,
           SmsProperties.TOW_ID,
           SmsProperties.WAR_ID,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress,
         SMS_PROPERTIES SmsProperties,
          SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
          WHERE TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SMSPARTYADDRESS.PROP_ID = SMSPROPERTIES.ID
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ID"
        Expression="ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        Expression="START_DT"
        SQLType="DATE"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLongitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LONGITUDE"
        Expression="GPS_LONGITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLatitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LATITUDE"
        Expression="GPS_LATITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="WarId"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.Integer"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>my calling method is
    public class SmsPartyAddressViewRowImpl extends ViewRowImpl implements SmsPartyAddressViewRow {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
           // String Addressline = null;
            String Zone = "UNDERF";
            Date StartDt = null;
           // EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
           // SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { getParId(), getAddressTypeInd(), getAddressLine1(),
        getAddressLine2(), getAddressLine3(), getAddressLine4(),getAddressLine(),getSuburb(),getTown(),getPostalCode(),getTowId(),Zone,StartDt });
    Edited by: ADF007 on 2012/08/13 6:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    that solution was based on the hr schema now am inserting using my schema
    inserting record in a view using procedure
    hi i have the folowing view, i what to insert record using procedure,this is what i what ,i what to insert record using the view but pass those view variable to procedure. my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsproppartyview"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.smsproppartyviewRowImpl"
      ComponentClass="sms1100.smsproppartyviewImpl"
      RowInterface="sms1100.common.smsproppartyviewRow"
      ClientRowProxyName="sms1100.client.smsproppartyviewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsproppartyview_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_LINE1,
            SmsProperties.ADDRESS_LINE,     
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE,
            SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
            SmsProperties.ID AS ID1,
           SmsPartyAddress.ADDRESS_TYPE_IND,      
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID1"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        SQLType="DATE">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="WarId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>this is what i have try
    public class smsproppartyviewImpl extends ViewObjectImpl {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
            String Addressline = null;
            String Zone = "UNDERF";
            String Town = null;
            String Suburb = null;
            String PostalCode = null;
            String Addressline1 = null;
            String Addressline2 = null;
            String Addressline3 = null;
            String Addressline4 = null;
            Integer AddressTypeInd = null;
            Integer parid = null;
            //Date StartDt = null;
            Integer towid = null;
            ApplicationModuleHandle handle = null;
                               handle = Configuration.createRootApplicationModuleHandle
                               ("sms1100.sms1100Moduleold", "sms1100ModuleShared");
                               ApplicationModule sam = handle.useApplicationModule();
                               sam.processChangeNotifications();
            ViewObject svo = sam.findViewObject("smsproppartyview1");
            svo.executeQuery();
            Row row = svo.first();
            if (svo != null){
                Addressline = (String)row.getAttribute("AddressLine");
                Zone = (String)row.getAttribute("Zone");
                Town = (String)row.getAttribute("Town");
                Suburb = (String)row.getAttribute("Suburb");
                PostalCode = (String)row.getAttribute("PostalCode");
                towid = (Integer)row.getAttribute("TowId");
                Addressline1 = (String)row.getAttribute("Addressline1");
                Addressline2 = (String)row.getAttribute("Addressline2");
                Addressline3 = (String)row.getAttribute("Addressline3");
                Addressline4 = (String)row.getAttribute("Addressline4");
                AddressTypeInd = (Integer)row.getAttribute("AddressTypeInd");
                parid = (Integer)row.getAttribute("ParId");
            //EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
            //SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
            //newSmsProperties.setAddressLine(Addressline);
            //newSmsProperties.setTowId(towid);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { parid, AddressTypeInd, Addressline1,
        Addressline2, Addressline3, Addressline4,Addressline,Town,Suburb,PostalCode,towid,Town,Suburb,PostalCode,towid,Zone });
    }am in Jdeveloper 11.1.2.1.0

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • How to create a new record using a custom method?

    Hi I want to create Jdev 11 a new record using the contructor following in the footsteps of http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.CACCIJAG/vtTopicFile.adfdevguide%7Cweb_adv~htm/.
    My problem is the following.
    Messages for this page are listed below.
    Error
    JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    Object: null is not a known entity type.
    Someone can help me?
    Cristian.

    Hello Frank, this tutorial make it and was successful but, what I am trying to do is add a new record in the table departments. The steps undertaken are suguientes
    drag over page the contructor department, with a submit, this will drag on the button, the method presistencia, set binding action with "$ (bindings.Departments.result)", and when running the application gives me the error
    Nov 2, 2007 10:06:22 PM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ADFc: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    I need to know if what I am doing is right, because I followed the steps of the tutorials and it is not functioning the insertion of a new record.
    Thank you thank you.

Maybe you are looking for

  • Could not complete the command because there is not enough memory (RAM)

    Hi Folks: I am running into an error (Could not complete the command because there is not enough memory (RAM)) when trying to open any file of any size or any format.on my Mac. This error occurs when: No other applications or files are open Upon a fr

  • IPod Classic won't charge with iPad charger

    I have a 120GB iPod Classic and tried to charge it using the charger from my iPad 2. No luck - the indicator doesn't show that it's charging. The iPad 2 charger works fine on my iPhone 4 and I read that it should work with the iPod as well. Shouldn't

  • Question about PSE 7

    I have used Photoshop Elements 7 for some time with no issues, but have recently encountered a problem with importing photos to it from my Kodak Easyshare Software. In the past, importing has been a breeze, but lately if I am trying to import an albu

  • FAQ: What are the System Requirements for the Photoshop CS6?

    System Requirements for Photoshop CS6: Windows Intel® Pentium® 4 or AMD Athlon® 64 processor; 2GHz or faster processor Microsoft® Windows® XP with Service Pack 3; or Windows 7 1GB of RAM 1GB of available hard-disk space for installation; additional f

  • Preformat Text In Java

    Hi all, I've got a text area and the form in which it is connects to a JSP file. Now, the text that is entered by the user may contain breaks. However, when I try Insert that text in Database, it shows all in one, without breaks. Thanks, Ravi