Is it possible we can write a perform statement in BADI?

Hi ,
Is it possible we can write a perform statement in BADI? Can any one please let me know .
Thanks.

Sure it is possible,  you just have to reference the program inwhich  the FORM exists.  Since the call is in a method, where do you put the actual FORM, well you need to put it in a separate program or subroutine pool, then you can call it from within the method.
perform some_form in program zsubroutine_pool.
Regards,
RIch Heilman

Similar Messages

  • Can we use Perform statement in start routine ,Form and endform.

    Hi,
    Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
    Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
          Form ABC,
          ......<ABAP> code .....
          Endform.

    Hi,
    In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
    But you can surely try both the approaches.
    Reards,
    Durgesh.

  • How to write a perform in Sap Script

    Hi Guys,
    Can anyone let me know how to write a perform statement in Sap Script.
    Thanks,
    Ramesh

    I just took this example from SAP Help
    =======================================
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.

  • Problem with perform statement

    Hi All,
        I 'm in PAI event. i'm writing code for a check box. there
              CASE SY-UCOMM.
                  when 'FC'.
                 here i need to write a select statement like
         select field from database into itab where field1 = itab1-field1.
                    This itab1 data is in the following form.
    FORM user_comm USING r_ucomm LIKE sy-ucomm
                                      rs_selfield TYPE slis_selfield.
    so how can i use this form in my PAI?
    can anybody help me.
    thanks
    g.s.naidu

    Hi can anybody tell me how can i write a perform statement for a form statement.
    i want to write a perform statement for this
    " FORM user_double_click_on_sumry USING r_ucomm LIKE sy-ucomm
                                      rs_selfield TYPE slis_selfield.
    this is from alv grid function module   when we try to move to next screen we pass this parameter.
                i_callback_user_command = 'user_double_click_on_sumry'.
    now i want to use this form statement some where else. so can anybody tell me how can i write the perform for the above form statement.
    thanks
    g.s.naidu

  • Passing itab in a perform statement

    Hi Experts,
    In a Fucn Module, I need to write a perform statement and the corresponding FORM lies in an include. I need to pass an internal table(itab) & workarea(wa_itab) in perform as below :
    Declaration of itab:
    types: BEGIN OF ty_out1,
             f1(16) TYPE c,
             f2 TYPE wrbtr,
           END OF ty_out1.
    data : itab type standard table of ty_out1,
              wa_itab type ty_out1,
    PERFORM <form name> tables itab
      USING wa_itab
      test1.
    Dbl click on above perform takes us to an include prog and the form is declared as below -
    what should be the syntax of the FORM in INCLUDE statement.
    Note: I should not use the top include of the main prog for any declarations.
    form search_slash tables ptab2 like itab
                   using wa2_itab like wa_itab
                   test2 .
    Now what should be the syntax of the form above? Is the above right?
    Please suggest
    Thanks
    Dan

    Hi,
    If you want to pass only the internal table with header line,
    then use tables ptab2 structure wa2_itab
    For internal table with header line use:
    tables ptab2 like wa2_itab
    or
    tables ptab2[ ] like wa2_itab.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Can UCCHECK be performed on already UNICODE migrated system during ECC upgr

    Hi there,
    Can UCCHECK be performed on already UNICODE migrated system during ECC upgrade?
    If NO, why? What is the technical reason?
    Prakash

    Hi,
    first unicode means
    Unicode is a 16-bit code to represent universal character set, which is used to facilitate a better exchange of data between different systems.
    for uncheck
    The transaction UCCHECK is used to find Unicode related issues. You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
    why you are checking second time.
    Regards,
    Madhu

  • LABVIEW NI-XNET CAN WRITE DELAY

    Hi,
    I am really happy that I can read this article because it seems like it is the similar problem that I am facing right now. I also has a really bad CAN update delay when I want to write Data on CAN bus.  I was trying to following your solusion here, use frame in single point, frame out single point. But I am not so sure that I can continue. In our labview, we use frame in/out stream(sorry the screenshot cut is wrong). But if I want to change it to frame in/out single point, it will show an error saying: mising wiring on NI-XNET block.
    In our labview, we use a big sequence loop. So what in saw in the 1st pic I attached is the first sequence, then in the 2nd sequence we had a Frame Can write frame. Then in the 3rd one, which is in the 2nd pic, it shows the CAN write frame that contain a lot of message that I would like to write on CAN bus.
    The problem here is sometimes the CAN loop takes 0.3s(I use a shift register in the 3rd sequence showing CAN loop time) to update which is too low for me to use Vector Canalyzer to record data. For example, I did a 10 sec test of recording using Canalyzer, it only has 59 values from Labview. 
    In your article it said I need to 'Frame in single point' for my reads, and 'Frame out single point' for my writes. I do know i can use database editor to build a session and define every frame and signal it it. However, I do not know where to put it then? is that connect to NI-XNET write frame? It is the only thing I can think of to do now? But is that meanning all the blocks in the second pic would be deleted.
    Because our grogram is really very very big and it including so many info, I do not think I can post VI. I thought there might be possibility that because of the ''BIG'' thing has something inside that culprit for CAN transmission delay. But I have tried to move  everything except CAN in this loop to another newly built loop. The problem is still there. 
    Thank you so much. 

    You actually always have an XNET database. It's just a matter of whether you use an external database or whether you create objects on the fly.
    From your screenshot, it looks like you are creating objects on the fly using the in memory database.
    Looking at your frame configuration, I was surprised to see Remote frames being configured. Most devices that I've encountered don't use them.
    So what sort of session are you trying to create? Frame Out Stream does not allow for cyclic transmission. You can repeat transmissions using a software loop. If you really have cyclic frames, Frame Out Single Point or Frame Out Queued would work. The post you referred to earlier was using the Frame Out Single Point.
    The XNET help is actually pretty good about breaking down the session modes. From that help, "...  this mode does not repeat its transmit. Unlike the Frame Output Queued mode, the Frame Output
    Stream mode does not use CAN frame properties from the database."
    So if you're using this mode and getting unexpected delays, it's likely due to your sequencing.

  • Is it possible to read/write data from Salesforce using web service hub in Informatica?

    Anyone from Informatica can asnwer this question please

    Is it possible to read/write data from Salesforce using web service hub in Informatica? Not asking about PowerExchange for Salesforce or Informatica Cloud. Just using web service can we load data into Salesforce? Thanks ahead.

  • Mail has 16k  messages, and performance is very slow, with loading times taking up to 5 seconds every time I open Mail. How can I increase performance?

    Mail has 16k  messages, and performance is very slow, with loading times taking up to 5 seconds every time I open Mail.
    How can I increase performance?
    I'm running a MacBook Air 4GB 1.7GHz  10.7.2.
    Graham

    One possible solution would be to organise your inbox into folders.
    Its never relly good on any system to have one folder that has everything in it.
    Try going to you web gui for that mail account and organise your folders and move mails from your inbox into corresponding folders for better organisation.
    Several folders containing the same amount of one folder will usually load a little quicker as the folder may not be accessed to download its content unless veiwed.
    So having 10 folders with organised content, and you inbox as an area thats to hold only new emails would work much much quicker with imap.
    Most imap servers will only update the contents of a folder when its veiwed.

  • How I can write a program with pythagoras?

    I have a problem. I�m a 14-kears old Java-beginner and I�ll write a program for school ( I will get a better mark when i write the program). This programm should multiply 3 letters 30-times. But how I can write the damn thing? I habe no idea, please help me!
    Thnax a lot Devproger
    (Sorry for the bad English but I am a German Student who is still learning this language)

    I will only have a better mark in Maths... and wirte this Programm...Yes, you'll get a better grade by writing that program. Start programming then!
    If you run into problems, post the code that's not working here, and tell us what it is that's not working.
    When posting code, read this: http://forum.java.sun.com/help.jspa?sec=formatting
    Good luck.

  • HT204053 Good Morning, I have 2 Apple Account, will be possible to integrate each other in one account ? And if is possible, How can I do that ? Thanks, Fabio.

    Good Morning, I have 2 Apple Account, will be possible to integrate each other in one account ? And if is possible, How can I do that ? Thanks, Fabio.

    You don't have to do anything with the first iPod that you don't use anymore. If you are planning on keeping it, put in a drawer in your house and forget about it.
    You don't need a second account to use with the new iPod. I use one Appl e ID and iTunes library for two iPods, and two iPad. I have different content on all four devices. You can select exactly what you want to sync to each device and it can be different content on all devices.

  • How can I use my IPAD as a wifi for my IPHONE? Is that possible, How can I use my IPAD as a wifi for my IPHONE? Is that possible

    How can I use my IPAD as a wifi for my IPHONE? Is that possible, How can I use my IPAD as a wifi for my IPHONE? Is that possible

    Is there a reason you can't connect your iPhone to the same Wi-Fi network as your iPad?

  • In which part of the page i can write java script

    Hi
    I'm new with ADF and web development
    I have a java script function that show a tooltip.
    This is the function:
    *function positionTip(evt) {*
    *     if (!tipFollowMouse) {*
    *          standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body*
    *          mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;*
    *          mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;*
    *     // tooltip width and height*
    *     var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;*
    *     var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;*
    *     // document area in view (subtract scrollbar width for ns)*
    *     var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;*
    *     var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;*
    *     // check mouse position against tip and window dimensions*
    *     // and position the tooltip*
    *     if ((mouseX+offX+tpWd)>winWd)*
    *          tipcss.left = mouseX-(tpWd+offX)+"px";*
    *     else tipcss.left = mouseX+offX+"px";*
    *     if ((mouseY+offY+tpHt)>winHt)*
    *          tipcss.top = winHt-(tpHt+offY)+"px";*
    *     else tipcss.top = mouseY+offY+"px";*
    *     if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);*
    My ADF page source code is
    *<?xml version = '1.0' encoding = 'windows-1252'?>*
    *<page xmlns="http://xmlns.oracle.com/uix/controller"*
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
    xmlns:myTemplate="selfservice">
    *<templates xmlns="http://xmlns.oracle.com/uix/ui">*
    *<templateImport source="mainTemplate.uit"/>*
    *</templates>*
    *<content>*
    *<dataScope xmlns="http://xmlns.oracle.com/uix/ui">*
    *<provider>*
    *<!-- Add DataProviders (<data> elements) here -->*
    *</provider>*
    *<contents>*
    *<document>*
    *<metaContainer>*
    *<!-- Set the page title -->*
    *<head title="General Manager"/>*
    *</metaContainer>*
    *<contents>*
    *<body>*
    *<contents>*
    *<form name="form0">*
    *<contents>*
    *<myTemplate:SelfService title="General Manager">*
    *<contents/>*
    *<tabs/>*
    *<pageButtons/>*
    *<globalButtons/>*
    *<pageHeader/>*
    *<start/>*
    *<end/>*
    *<about/>*
    *<copyright/>*
    *<privacy/>*
    *<corporateBranding/>*
    *<productBranding/>*
    *</myTemplate:SelfService>*
    *<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>*
    *<table model="${bindings.HrsVEmpPhonesView1}" id="HrsVEmpPhonesView13" partialRenderMode="multiple" partialTargets="_uixState" showAll="yes" width="900">*
    *<contents>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'EmpNameAr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.EmpNameAr}" columns="10" readOnly="true" onMouseOver="&quot;showTooltip(event,'This is a tooltip with a transparent shadow effect. Can you see the letters underneath the shadow?');return false&quot;"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'JobDescr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.JobDescr}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'PhoneExt')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.PhoneExt}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntCellPhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntCellPhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntHomePhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntHomePhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'IaigcEmail')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model= "${uix.current.IaigcEmail}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *</contents>*
    *<tableSelection/>*
    *</table>*
    *</contents>*
    *</form>*
    *</contents>*
    *</body>*
    *</contents>*
    *</document>*
    *</contents>*
    *</dataScope>*
    *</content>*
    *<handlers>*
    *<!-- Add EventHandlers (<event> elements) here -->*
    *<event name="goto sort" source="HrsVEmpPhonesView13">*
    *<invoke method="handleTableUiEvent" javaType="oracle.cabo.adf.rt.AdfUtils">*
    *<parameters>*
    *<parameter javaType="oracle.adf.model.binding.DCIteratorBinding" value="${bindings.HrsVEmpPhonesView1Iterator}"/>*
    *<parameter javaType="oracle.cabo.servlet.expl.ControllerImplicitObject" value="${uix}"/>*
    *</parameters>*
    *</invoke>*
    *</event>*
    *<event name="select" source="HrsVEmpPhonesView13">*
    *<set target="${bindings.HrsVEmpPhonesView1Iterator}" property="currentRowIndexInRange" value="${ui:tableSelectedIndex(uix, 'HrsVEmpPhonesView13')}"/>*
    *</event>*
    *</handlers>*
    *</page>*
    I want to add this function to my page
    In which part exactly i can write this function
    thanks in advance

    To add to this, if you prefer you can separate your JavaScript from your JSF pages.
    Add a folder (I named mine 'js') to your application's ViewController project's public_html folder.
    Via JDeveloper, create a new JavaScript file inside your newly created folder and place your JavaScript functions inside it.
    You can then 'load' the .js file using the method Shantala described, with the addition of an added 'source' property to the af:reference tag.
    (This can also be a URI reference to a JavaScript file hosted on a web server)
    <f:facet name="metaContainer">
      <af:resource source="/js/myJsFile.js" type="javascript"/>
    </f:facet>The benefits of this 'split' are cleaner JSF page source and also code-highlighting and formatting within the .js file making finding and fixing bugs in your JavaScript much easier.
    It appears however, that when using <af:resource> to load scripts, once the page has been submitted even once, the JavaScript is no longer available to the page. Which isn't very useful.
    A solution is to use <trh:script>.
    Add xmlns:trh="http://myfaces.apache.org/trinidad/html" to your <jsp:root> tag and install the library.
    then in place of the above code use:
    <f:facet name="metaContainer">
      <trh:script id="script1" source="/js/myJsFile.js"/>
    </f:facet>Now after a page submit the JavaScript still functions.
    Edited by: Matthew Carrigy on 12/08/2009 10:39

  • Help on locking MySQL tables (many can read, but only one can write) Java

    Hi there,
    I have a question regarding locking of tables so that only one person can write to the file, but many are able to read the files (or tables entities).
    I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter.
    This java code is a working prototype of inserting a customer data into the database and that works fine. I just don't know how to implement it so that only one person can update the table at a time.
    Here is the Customer.java code that I have written.
    Help would be greatly appreciated, thanks so much.
    package business;
    //~--- non-JDK imports --------------------------------------------------------
    import shared.info.CustomerInfo;
    //~--- JDK imports ------------------------------------------------------------
    import java.sql.*;
    * @author
    public class Customer {
        static Connection    con  = DBConnection.getConnection();
        private CustomerInfo info = new CustomerInfo();
        private String               customerID;
        private String               firstName;
        private String               lastName;
        private String               email;
        private String               addressID;
        private String               homePhone;
        private String               workPhone;
        private String               unitNum;
        private String               streetNum;
        private String               streetName;
        private String               city;
        private String               provinceState;
        private String               country;
        private String               zipPostalCode;
        public Customer(String id) {
            try {
                PreparedStatement pstmt = con.prepareStatement("SELECT * FROM " +
                        "Customer NATURAL JOIN Address WHERE CustomerID = ?");
                pstmt.setString(1, id);
                ResultSet rs = pstmt.executeQuery();
                while (rs.next()) {
                    customerID    = rs.getString("CustomerID");
                    firstName     = rs.getString("FirstName");
                    lastName      = rs.getString("LastName");
                    homePhone     = rs.getString("HomePhone");
                    workPhone     = rs.getString("WorkPhone");
                    email         = rs.getString("Email");
                    city          = rs.getString("City");
                    provinceState = rs.getString("ProvinceState");
                    country       = rs.getString("Country");
                    zipPostalCode = rs.getString("ZipPostalCode");
                    unitNum       = rs.getString("UnitNum");
                    streetNum     = rs.getString("StreetNum");
                    streetName    = rs.getString("StreetName");
                    addressID     = rs.getString("AddressId");
            } catch (SQLException e) {
                e.printStackTrace();
            info.setCustomerID(customerID);
            info.setFirstName(firstName);
            info.setLastName(lastName);
            info.setHomePhone(homePhone);
            info.setWorkPhone(workPhone);
            info.setEmail(email);
            info.setCity(city);
            info.setProvinceState(provinceState);
            info.setCountry(country);
            info.setZipPostalCode(zipPostalCode);
            info.setUnitNum(unitNum);
            info.setStreetNum(streetNum);
            info.setStreetName(streetName);
            info.setAddressID(addressID);
        public static void addCustomer(CustomerInfo cust) {
            try {
                int id = -1;
                PreparedStatement pstmt = con.prepareStatement("INSERT INTO Address" +
                        "(UnitNum, StreetNum, StreetName, City, ProvinceState, Country," +
                        " ZipPostalCode) VALUES(?, ?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getUnitNum());
                pstmt.setString(2, cust.getStreetNum());
                pstmt.setString(3, cust.getStreetName());
                pstmt.setString(4, cust.getCity());
                pstmt.setString(5, cust.getProvinceState());
                pstmt.setString(6, cust.getCountry());
                pstmt.setString(7, cust.getZipPostalCode());
                pstmt.executeUpdate();
                ResultSet rs = pstmt.getGeneratedKeys();
                rs.next();
                id = rs.getInt(1);
                pstmt = con.prepareStatement("INSERT INTO Customer" +
                        "(FirstName, LastName, HomePhone, WorkPhone, Email, AddressID)"
                        + "VALUES(?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getFirstName());
                pstmt.setString(2, cust.getLastName());
                pstmt.setString(3, cust.getHomePhone());
                pstmt.setString(4, cust.getWorkPhone());
                pstmt.setString(5, cust.getEmail());
                pstmt.setInt(6, id);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
        public void setFirstName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET FirstName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            firstName = newName;
        public void setLastName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET LastName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            lastName = newName;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public void setHomePhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET HomePhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            homePhone = number;
        public String getHomePhone() {
            return homePhone;
        public void setWorkPhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET WorkPhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            workPhone = number;
        public String getWorkPhone() {
            return workPhone;
        public void setEmail(String email) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer" + " SET Email = ? WHERE CustomerID = ?");
                pstmt.setString(1, email);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.email = email;
        public String getEmail() {
            return email;
        public void setUnitNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET UnitNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            unitNum = num;
        public String getUnitNum() {
            return unitNum;
        public void setCity(String city) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET City = ? WHERE AddressId = ?");
                pstmt.setString(1, city);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.city = city;
        public String getCity() {
            return city;
        public void setStreetNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET StreetNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetNum = num;
        public String getStreetNum() {
            return streetNum;
        public void setStreetName(String name) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET StreetName = ? WHERE AddressId = ?");
                pstmt.setString(1, name);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetName = name;
        public String getStreetName() {
            return streetName;
        public void setZipPostalCode(String code) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET ZipPostalCode = ? WHERE AddressId = ?");
                pstmt.setString(1, code);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            zipPostalCode = code;
        public String getZipPostalCode() {
            return zipPostalCode;
        public CustomerInfo getInfo(){
            return info;
        static void deleteCustomer(String customerId) {
            try{
                PreparedStatement pstmt = con.prepareStatement("DELETE FROM Customer" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, customerId);
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
        static void updateCustomer(CustomerInfo custInf) {
            try{
                PreparedStatement pstmt = con.prepareStatement("UPDATE customer" +
                        " SET firstName = ?, SET lastName = ?," +
                        " SET homePhone = ?, SET workPhone = ?, SET email = ?" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, custInf.getFirstName());
                pstmt.setString(2, custInf.getLastName());
                pstmt.setString(3, custInf.getHomePhone());
                pstmt.setString(4, custInf.getWorkPhone());
                pstmt.setString(5, custInf.getEmail());
                pstmt.setString(6, custInf.getCustomerID());
                pstmt.executeUpdate();
                pstmt = con.prepareStatement("UPDATE address" +
                        " SET unitNum = ?, SET StreetNum = ?, SET StreetName = ?," +
                        " SET city = ?,SET Province = ?,SET country = ?,SET ZipPostalCode = ?" +
                        " WHERE AddressId = ?");
                pstmt.setString(1, custInf.getUnitNum());
                pstmt.setString(2, custInf.getStreetNum());
                pstmt.setString(3, custInf.getStreetName());
                pstmt.setString(4, custInf.getCity());
                pstmt.setString(5, custInf.getProvinceState());
                pstmt.setString(6, custInf.getCountry());
                pstmt.setString(7, custInf.getZipPostalCode());
                pstmt.setString(8, custInf.getAddressID());
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
    }In addition, here is my customer sql table.
    -- Table structure for table `customer`
    DROP TABLE IF EXISTS `customer`;
    CREATE TABLE `customer` (
    `CustomerID` mediumint(9) NOT NULL auto_increment,
    `FirstName` varchar(20) NOT NULL,
    `LastName` varchar(20) NOT NULL,
    `HomePhone` varchar(11) NOT NULL,
    `WorkPhone` varchar(11) default NULL,
    `Email` varchar(20) NOT NULL,
    `AddressID` mediumint(9) default NULL,
    PRIMARY KEY (`CustomerID`),
    KEY `AddressID` (`AddressID`),
    CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`AddressID`) REFERENCES `address` (`AddressID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    -- Dumping data for table `customer`
    LOCK TABLES `customer` WRITE;
    /*!40000 ALTER TABLE `customer` DISABLE KEYS */;
    /*!40000 ALTER TABLE `customer` ENABLE KEYS */;
    UNLOCK TABLES;

    to the best of my knowledge, this is something related to the database and not the programming. If you'd want to be the only user to read and edit the table, speicify only one user with that privilege and make it password protected. User must enter the password to write to the tables.

Maybe you are looking for