Error in calling method ?

Class Student has feilds(Name,Address,ID)
Class addmisions is to add and delete instances of Student from an arrayList
I get the following error message on this line- if(s.getID().equal(id))
Addmisions.java:43: cannot find symbol
symbol : method getID()
location: class Student
if(s.getID().equal(id))
(I am a begginer) My question is do I have to write a Method named getID in the class Student or Addmisions? If so How is that written ?
Here are my classes... Student & Addmisions
import java.util.Date;
public class Student
Name name;
Address addr;
String ID;
Date date;
Student(Name n,Address a,String id)
{ name = n;
addr = a;
ID = id;
date = new Date();
// name.getLastName();
import java.util.ArrayList;
public class Addmisions
ArrayList list; //member variables
int index;
Addmisions() //constructor
list = new ArrayList();
void add(Student s) //methods
list.add(s);
boolean Empty()
{return list.isEmpty();
int getindex()
return index;
Object removeItem (int i)
return list.remove(i);
boolean inList(String id)
int i = 0;
boolean found = false;
while(i<list.size() && !found)
{ Object o = list.get(i);
if (o instanceof Student)
{  Student s = (Student)o;
if(s.getID().equal(id))
     { found = true;}
     else i++;      
     }// if o
}//while
index = i;
return found;
}//inList
} //addmision

SAME QUESTION FORMATTED....
Class Student has feilds(Name,Address,ID)
Class addmisions is to add and delete instances of Student from an arrayList
I get the following error message on this line- if(s.getID().equal(id))
Addmisions.java:43: cannot find symbol
symbol : method getID()
location: class Student
if(s.getID().equal(id))
(I am a begginer) My question is do I have to write a Method named getID in the class Student or Addmisions? If so How is that written ?
Here are my classes... Student & Addmisions
import java.util.Date;
public class Student
Name name;
Address addr;
String ID;
Date date;
Student(Name n,Address a,String id)
{ name = n;
addr = a;
ID = id;
date = new Date();
// name.getLastName();
import java.util.ArrayList;
public class Addmisions
ArrayList list; //member variables
int index;
Addmisions() //constructor
list = new ArrayList();
void add(Student s) //methods
list.add(s);
boolean Empty()
{return list.isEmpty();
int getindex()
return index;
Object removeItem (int i)
return list.remove(i);
boolean inList(String id)
int i = 0;
boolean found = false;
while(i<list.size() && !found)
{ Object o = list.get(i);
if (o instanceof Student)
{ Student s = (Student)o;
if(s.getID().equal(id))
{ found = true;}
else i++;
}// if o
}//while
index = i;
return found;
}//inList
} //addmision>

Similar Messages

  • Error when calling method INIT in class cl_hrxss_rem for salary statements

    after configuring the our hrform to work with the new ess system in ecc 6.0 we configured the hrfor decision tree to $cedt$ and pointed the form variant to the edtin feature.
    Now we are getting a class error.
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Error when calling method INIT of class CL_HRXSS_REM
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:121)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.reportBapiRet2Error(FcRepFramework.java:525)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcExecAction(FcRepFramework.java:374)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.initModel(FcRepFramework.java:292)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFramework.initModel(InternalFcRepFramework.java:256)
         at com.sap.xss.hr.rep.fcrfw.FcRepFrameworkInterface.initModel(FcRepFrameworkInterface.java:136)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface.initModel(InternalFcRepFrameworkInterface.java:198)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface$External.initModel(InternalFcRepFrameworkInterface.java:258)
         at com.sap.xss.hr.rem2.selection.VcRem2Selection.onInit(VcRem2Selection.java:245)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2Selection.onInit(InternalVcRem2Selection.java:249)
         at com.sap.xss.hr.rem2.selection.VcRem2SelectionInterface.onInit(VcRem2SelectionInterface.java:161)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface.onInit(InternalVcRem2SelectionInterface.java:144)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface$External.onInit(InternalVcRem2SelectionInterface.java:220)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:564)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
         at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1246)
         at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:354)
         at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:547)
         at com.sap.portal.pb.PageBuilder.wdDoRefresh(PageBuilder.java:591)
         at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:822)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:684)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Thanks

    Hi,
    Maintain the EDTIN feature
    &CEDT$
    And UR problem solve

  • Error on Calling Methods Using an Object of a Class

    I keep getting the error cannot resolve variable addStud . I can't figure out why. I've created objects of classes before this way, then called methods within that class like this and it worked fine. I can't discern any difference between the syntax of the program that worked successfully and this one. I commented the parts where the error is when I tried to send a variable to a method in the class Recieve of which addStud is an object of. If you can see something that I can't I'd appreciate it. I've checked the obvious things like making sure the class name and method name is spelled the same way in both my frame and the class file.
    import java.awt.event.*;
    import java.awt.*;     /* Used by IntroTest3.java. */
    import javax.swing.*;
    public class RegFrame extends JInternalFrame
    {   // Begin class RegFrame
    static final int xOffset = 30, yOffset = 30;
         private JLabel nameLabel, displayLabel;  
         private JTextField nameField;
         private JTextArea displayText;
         private JButton addButton;
         private String name;
         private int numStu;
    public RegFrame() {     // Begin RegFrame constructor  
                  super(" Register a New Student ",
                  true, //resizable
                  true, //closable
                  true, //maximizable
                  true);//iconifiable
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            setSize(400,300);        //Set the window's location.
            setLocation(xOffset, yOffset);
            Container content = getContentPane();
            setBackground(Color.white);
            content.setBackground(Color.white);
            content.setLayout( new FlowLayout());
      //*   CREATE LABELS AND TEST ENTRY FIELDS FOR REGISTERING A NEW STUDENT       *
            *  HERE IS WHERE OBJECT OF RECIEVE IS CREATED *
         Recieve addStud = new Recieve();
         nameLabel = new JLabel(" Enter student name: ");
         nameField = new JTextField(20);
         content.add ( nameLabel );
         content.add ( nameField );
         addButton = new JButton( "Add Student" );
         content.add( addButton );
         addButton.addActionListener(
              new ActionListener()
         { // Open ActionListener
              public void actionPerformed (ActionEvent e)
                   getInput();
         } // Close ActionListener
        }   // End RegFrame Constructor
    // get input
        private void getInput()
              numStu++;
              name = nameField.getText();
              JOptionPane.showMessageDialog( null, "NAME: "  + name + "\n"
                    + "Student number:"+ numStu );
                    addStud.addName( name );   /** <--- HERE IS ERROR **/
    } // End class RegFrame;This is the class:
    public class Recieve
    { // Begin class Recieve
        private double stAssign[];
        private double stLab[];   
        private double stProject[];
        private double stQuiz[];
        private double stTest[];
        private String stNames[];       
        int snc;  
    public Recieve ()
            stAssign = new double[10];
            stLab = new double[10];
            stProject = new double[10];
            stQuiz = new double[10];
            stTest = new double[10];
            stNames = new String[10];
            snc = 0;    // Student Name Counter      
    public void addName (String stName)
            stNames[snc] = stName;
            snc++;
    } // End class Recieve

    1- Add the following class variable declaration for RegFrame:
    private Recieve addStud;2- Change in the RegFrame constructor:
    addStud = new Recieve();

  • Error in Call Method 'create_dynamic_table'.

    Hi Experts,
    i am working on Dynamic ALV.I have created a Dynamic Fieldcatalog,which is storing the correct field values as per requirement.
    When I debbug the code: I get the following error when I am calling method 'create_dynamic_table'.
    "Unable to interpret "MATERIALS(000010)". Possible 10 MATERIALS(000010)"
    DATA: g_table TYPE REF TO data.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = i_fieldcat
        IMPORTING
          ep_table                  = g_table.
    *    EXCEPTIONS
    *      generate_subpool_dir_full = 1
    *      OTHERS                    = 2.
    Please advice how do I approach this error.Is some change required in  my piece of code?
    Thanks.

    Hi Marcin,
    Thanks for all the help,finally solved the issue.I made a small error while coding the Fieldcatalog:
    now the changed code looks like the following code:
    LOOP AT i_tckh3 INTO w_tckh3.
          LOOP AT i_tckh1 INTO w_tckh1 WHERE elemt = w_tckh3-elemt.
            lcount = lcount + 1.
            WRITE w_tckh1-txele TO w_fieldcat-seltext   LEFT-JUSTIFIED.
            CONCATENATE 'KST' w_tckh3-el_hv INTO w_fieldcat-fieldname.
            TRANSLATE w_fieldcat-fieldname              TO UPPER CASE.
            w_fieldcat-col_pos   =  lcount.
            w_fieldcat-ref_field = 'KST001'.
            w_fieldcat-ref_table = 'KEPH'.
            w_fieldcat-datatype  = 'CURR'.
            APPEND w_fieldcat TO i_fieldcat.
            CLEAR  w_fieldcat.
            CLEAR: w_tckh1.
          ENDLOOP.
          CLEAR:w_tckh3.
        ENDLOOP.
    Emphasis on the COncatenate statement in the loop.Earlier I was passing the TXELE field to fieldname,which was wrong.
    Thanks a Ton!!!!
    I have a small dount in the next step:While assigning the values to the final internal table:
    LOOP AT i_final INTO w_final.
        ASSIGN COMPONENT 'WERKS' OF STRUCTURE <i_value> TO <fs1>.
        <fs1> = w_final-werks.
        ASSIGN COMPONENT 'MATNR' OF STRUCTURE <i_value> to <fs1>.
        <fs1> = w_final-matnr.
         LOOP AT i_keph INTO w_keph WHERE kalnr = w_final-kalnr.
          ASSIGN COMPONENT  'KST001' OF STRUCTURE <i_value> TO <fs1>.
          <fs1> = <FS1> + w_keph-kst001.
        ENDLOOP.
        APPEND <i_value> TO <i_table>.
        CLEAR: <i_value>.
      ENDLOOP.
    Now the LOOP AT I_KEPH: has all the values of the cost fields.I need to assign the appropriate value of KSTXXX to the corresponding Dynamic fieldcatalog:What should the procedure be.I am NOT able to check what values are there in dynamic calatog.
    Hope this point is not too confusing.

  • Calendar invitation errors: cannot call method 'index of' of undefined

    I added an event to iCal and it sent out some email invitaions. When people click "Accept" in their emails, they get this eror "an error has occurred which prevents application from running: cannot call method 'indexOf' of undefined". Anyone know what's going on here?

    Roginator,
    I too have been experiencing this in the past couple of days.  We have two iPhones (4s), and my wife and I add each other to our schedules.  We have tried at least 5 tests recently, and only 1 worked.  The error occurs in Safari on the iphone and also in my web browsers -Chrome, IE, and Firefox.
    Can we get someone from Apple, on the iCloud side involved with this ASAP.  I am sure many others are experiencing this.
    Thanks.

  • Error when calling method with a return of double in j2me

    hello all,
    i have following problem with a j2me program:
    if i call a method with a return of double, then i get following error
    message:
    ERROR: floating-point constants should not appear
    Error preverifying class test.hallo
    what i'm doing wrong
    thanks in regard
    ----------------example----------------------------
    double yourValue(int y, int m, int d)
    double v = 0.10;
    v = 3.39 y m *d
    return v;
    public void startApp()
    int td;
    int y =2;
    int m =2;
    int d =2;
    td = yourValue(y,m,d);
    return(td);

    It's true for MIDP 1.0.
    But you can always use implementation of the float
    point arithmetic which was written by independent
    developers. For example see J2ME section of my
    homepage http://henson.newmail.ru
    anyway, double is reserved word in java, the way you wrote the source code in your example neither the preverifier nor the compiler will recognize that you intend to use your own types for double and float. maybe with Double or Float it would be different ...
    further question: you declare a void function, in the body, however, you try to return some value. something wrong with this function??
    regards
    bernard

  • Error when calling method on EJB

    Hi,
    I have the following problem:
    From my action class I'm calling a method on EJB through Business Object and getting the following error:
    org.apache.struts.action.RequestProcessor Unhandled Exception thrown: class gov.nyc.fisa.wbas.exceptions.ServerException
    [3/6/08 13:53:44:700 EST] 1acdd938 WebGroup E SRVE0026E: [Servlet Error]-[SERVER EXCEPTION CALLING searchBenefitGroups() METHOD ]: gov.nyc.fisa.wbas.exceptions.ServerException: SERVER EXCEPTION CALLING searchBenefitGroups() METHOD
    The following are parts of my code:
    In Action Class:
    BenefitGroupBO bo = new BenefitGroupBO();
    BenefitGroupsColView cView = new BenefitGroupsColView();
    try{
        cView = bo.searchBenefitGroups(transferObject,true);
    catch (ServerException e){
        throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
    In Business Object:
    private BenefitGroupImpl benGrpImpl = null;
        try{
               System.out.println("1. BenefitGroupBO - searchBenefitGroups()");
               collectionView = benGrpImpl.searchBenefitGroups(transferObject, isSearch);
               System.out.println("2. BenefitGroupBO - searchBenefitGroups()");
    catch (RemoteException e){
                throw new ServerException("Remote exception calling BenefitGroupImplBean: searchBenefitGroups()", e);
    .....It never executes the second print statement in the method
    In Remote Interface:
    public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch)
                                                                           throws ServerException, java.rmi.RemoteException;
    In the EJB
    public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch){
                                                                        throws ServerException                
             System.out.println("1. BenefitGroupImplBean - searchBenefitsGroups() method");
             BenefitGroupsColView collectionView = new BenefitGroupsColView();
             System.out.println("2. BenefitGroupImplBean - searchBenefitsGroups() method");
              return collectionView;
    .....It never executes first Print statement in that method and I do not think it ever goes into the actual EJB class.
    Can anyone tell me what am I doing wrong?
    Thank you

    Hi
    BenefitGroupBO bo = new BenefitGroupBO();
    BenefitGroupsColView cView = new BenefitGroupsColView();
    try{
        cView = bo.searchBenefitGroups(transferObject,true);
    catch (ServerException e){
        throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
    How are you trying to catch Exception within try{ } ? Because as i know usage is try { }catch (Exception e) { } Could you send full code?
    Bye.

  • Error in calling method of loaded swf

    I have two classes. One is loading class and another is Main2 class. Loading class is our document class of Load.fla.
    The code of loading class is:
    package
              import flash.display.MovieClip;
              import flash.display.SimpleButton;
              import flash.text.TextField;
              import flash.display.Loader;
              import flash.events.*;
              import flash.net.URLRequest;
              public class Loading extends MovieClip
                          private var url:String;
                          private var loader:Loader;
                          public function Loading()
                                      init();
                          private function init():void
                                      url='my_swf.swf';
                                      var request:URLRequest=new URLRequest(url);
                                      loader=new Loader();
                                      initListeners(loader.contentLoaderInfo);
                                      loader.load(request);
                          private function initListeners(dispatcher:IEventDispatcher):void
                                      dispatcher.addEventListener(Event.COMPLETE,completato);
                          public function onStartClick(event:Event):void
                                      trace("MenuStart")
                          private function completato(event:Event):void
                                      loader.contentLoaderInfo.content.addEventListener("startClick",onStartClick)
                                      addChild(loader);
                                      loader.y=10;
                                      var main2:Main2;
                                      main2=new Main2(this,MovieClip(loader.content));
    And the code of Main2 class is :
    package
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              import flash.events.Event;
              public class Main2 extends MovieClip
                          private var _fla:MovieClip;
                          private var mia_root:MovieClip;
                          public function Main2(fla:MovieClip,m:MovieClip)
                                      _fla=fla;
                                      mia_root=m;
                                      callClip();
                          private function callClip():void
                                      mia_root.test_mc.addEventListener(MouseEvent.CLICK, onStartClick);
                          private function onStartClick(e:MouseEvent):void
                                      trace("hi")
                                      dispatchEvent(new Event("startClick"));
    Here I have loaded 'my_swf file in Loading class. Actually  there is one movie clip  in my_swf . its name is test_mc. When I press on this (test_mc) movie clip
    I got trace value “hi”. But I dispatch one event startClick. I didnot listen in Loading class. How can I listen.

    First, what's up with this huge font?
    Second, your architecture feels convoluted and it can be simplified. But, assuming everything is OK, try this (inside function completato listener is added to the instance main2):
    package
         import flash.display.MovieClip;
         import flash.display.SimpleButton;
         import flash.text.TextField;
         import flash.display.Loader;
         import flash.events.*;
         import flash.net.URLRequest;
         public class Loading extends MovieClip
              private var url:String;
              private var loader:Loader;
              public function Loading()
                   init();
              private function init():void
                   url = 'my_swf.swf';
                   loader = new Loader();
                   initListeners(loader.contentLoaderInfo);
                   loader.load(new URLRequest(url));
              private function initListeners(dispatcher:IEventDispatcher):void
                   dispatcher.addEventListener(Event.COMPLETE,completato);
              public function onStartClick(event:Event):void
                   trace("MenuStart")
              private function completato(event:Event):void
                   addChild(loader);
                   loader.y = 10;
                   var main2:Main2 = new Main2(this, MovieClip(loader.content));
                   main2.addEventListener("startClick", onStartClick);
                   addChild(main2);

  • CALL METHOD ABAP run SQL wrong

    Dear All
             I have a problem in ABAP connect SQL,Below is my code snippet sentence.
    CONCATENATE 'Insert Into [timportcortrol]'
                    '(zucode,zstate,zdate,zkind) Values('''
                      VG_PCID ''','''
                      '1'','''
                      SY-DATUM ''','''
                      '1' ''')'
                     INTO SQL.
        CALL METHOD OF REC 'Execute'
         EXPORTING #1 = SQL
         #2 = CON
         #3 = '1'.
    IF NOT SY-SUBRC = 0.
        MESSAGE I000 WITH 'Download  to [timportcortrol] failure,Please Check the SQL Connect!!! '.
        EXIT.
      ENDIF.
    Con:is the connect SQL String ,the connect SQL is Okay.
    I debug this code,when I used u2018Select u2026sentenceu2019,the program can work.if I  use u2018insert intou2019 then canu2019t work,but I copied the SQL of the u2018inset Into sentenceu2026u2019run it into SQL server then it can work also.
    And I found the SY-SUBRC eq u20182u2019.whatu2019s mean about of the sy-subrc eq u20182u2019.
    I think the insert into sentence in abap I have write the wrong ,but I canu2019t assurance.
    The Insert Into Sentence is:u2019 Insert Into [timportcortrol](zucode,zstate,zdate,zkind) Values('20080807094713','1','20080807','1')u2019
    Could you give me some advice for this issue?
    Thanks of all
    Sun.

    Have you checked whether it's a problem with mixed case?  Some SQL dialects are case sensitive.
    The not very helpful meanings of the sy-subrc value can be found in ABAP help.
    0 Successful processing of the method meth.
    1 Communication Error to SAP GUI.
    2 Error when calling method meth.
    3 Error when setting a property.
    4 Error when reading a property
    matt

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Error while calling a super class public method in the subclass constructor

    Hi ,
    I have code like this:
    CLASS gacl_applog DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS:
                create_new_a
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXPORTING  pfx_log_hndl TYPE balloghndl
                   EXCEPTIONS error
    ENDCLASS.
    CLASS gacl_applog IMPLEMENTATION.
      METHOD create_new_a.
        DATA: ls_log TYPE bal_s_log.
      Header aufsetzen
        MOVE pf_extnumber TO ls_log-extnumber.
        ls_log-object     = pf_obj.
        ls_log-subobject  = pf_subobj.
        ls_log-aluser     = sy-uname.
        ls_log-alprog     = sy-repid.
        ls_log-aldate     = sy-datum.
        ls_log-altime     = sy-uzeit.
        ls_log-aldate_del = ls_log-aldate + 1.
        CALL FUNCTION 'BAL_LOG_CREATE'
             EXPORTING
                  i_s_log      = ls_log
             IMPORTING
                  e_log_handle = pfx_log_hndl
             EXCEPTIONS
                  OTHERS       = 1.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID      sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    CLASS gcl_applog_temp DEFINITION INHERITING FROM gacl_applog.
      PUBLIC SECTION.
        DATA: log_hndl   TYPE balloghndl READ-ONLY
            , t_log_hndl TYPE bal_t_logh READ-ONLY
        METHODS: constructor
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXCEPTIONS error
               , msg_add      REDEFINITION
               , display      REDEFINITION
    ENDCLASS.
    CLASS gcl_applog_temp IMPLEMENTATION.
      METHOD constructor.
        CALL METHOD create_new_a
               EXPORTING  pf_obj       = pf_obj
                          pf_subobj    = pf_subobj
                          pf_extnumber = pf_extnumber
               IMPORTING  pfx_log_hndl = log_hndl.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    A public method of Super class has been called from the constructor of the sub class. we are getting the syntax error :
    ' In the constructor method, you can only access instance attributes, instance methods, or "ME" after calling the constructor of the superclass…'
    Can you please suggest how to change the code with out affecting the functioanlity.
    Thank you ,
    Lakshmi.

    Hi,
    Call that method by instance of Subclass.   OR
    SUPER-->method.
    Read very useful document
    Constructors
    Constructors are special methods that cannot be called using CALL METHOD. Instead, they are called automatically by the system to set the starting state of a new object or class. There are two types of constructors - instance constructors and static constructors. Constructors are methods with a predefined name. To use them, you must declare them explicitly in the class.
    The instance constructor of a class is the predefined instance method CONSTRUCTOR. You declare it in the public section as follows:
    METHODS CONSTRUCTOR
            IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..
            EXCEPTIONS.. <ei>.
    and implement it in the implementation section like any other method. The system calls the instance constructor once for each instance of the class, directly after the object has been created in the CREATE OBJECT statement. You can pass the input parameters of the instance constructor and handle its exceptions using the EXPORTING and EXCEPTIONS additions in the CREATE OBJECT statement.
    The static constructor of a class is the predefined static method CLASS_CONSTRUCTOR. You declare it in the public section as follows:
    CLASS-METHODS CLASS_CONSTRUCTOR.
    and implement it in the implementation section like any other method. The static constructor has no parameters. The system calls the static constructor once for each class, before the class is accessed for the first time. The static constructor cannot therefore access the components of its own class.
    Pls. reward if useful....

  • Error calling methods CL_GUI_FRONTEND_SERVICES

    Hi all,
    I have a requirement in BAPI (integrating solman to portal) to download file from app. server to local directory. I used the below FM to get temp directory of presntation server.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
       CHANGING
         TEMP_DIR             =  LV_TEMP_DIR
       EXCEPTIONS
         CNTL_ERROR           = 1
         ERROR_NO_GUI         = 2
         NOT_SUPPORTED_BY_GUI = 3
         others               = 4.
       CALL METHOD cl_gui_cfw=>flush.
    It works fine in R3, but when i called it from portal it shows Access not possible using 'NULL' object reference with a short dump .
    st22 shows
    Error in ABAP application program.
    The current ABAP program "CL_GUI_FRONTEND_SERVICES======CP" had to be
    terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    An exception occurred. This exception is dealt with in more detail belo
    . The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL',
    neither
    caught nor passed along using a RAISING clause, in the procedure
    "GET_TEMP_DIRECTORY" "(METHOD)"
    Since the caller of the procedure could not have expected this exceptio
    to occur, the running program was terminated.
    The reason for the exception is:
    Attempt to access a component using 'NULL' object reference (points
    to nothing).
    An object reference must point to an object (an instance of a class)
    before you can use it to access components (variable:
    "CL_GUI_FRONTEND_SERVICES=>HANDLE").
    Either the reference has not yet been set, or it has been reset to
    'NULL' by a CLEAR statement.
    When i put external break point and the dump comes during execution of CALL METHOD cl_gui_cfw=>flush.
    Is it not possible to use CL_GUI_FRONTEND_SERVICES in RFC ??.
    thanks and regards
    Jijo

    Hi,
    the dump is because you cannot use that function from a BSP application, which runs in internet or intranet. The procedure in this case is different:
    DATA: flights  TYPE flighttab,
            flight   LIKE LINE OF flights,
            appl     TYPE string,
            filetype TYPE string,
            output   TYPE string,
            output2  TYPE xstring,
            response     TYPE REF TO if_http_response,
            l_len        TYPE i,
            seatsmax     TYPE string,
            seatsocc     TYPE string.
      appl = 'application/msexcel'.
      filetype = 'attachment;filename=mi archivo.xls'.
      SELECT * FROM sflight
         INTO TABLE flights
         UP TO 20 ROWS.
      LOOP AT flights INTO flight.
        seatsmax = flight-seatsmax. CONDENSE seatsmax.
        seatsocc = flight-seatsocc. CONDENSE seatsocc.
        CONCATENATE output
        flight-carrid cl_abap_char_utilities=>horizontal_tab
        flight-connid cl_abap_char_utilities=>horizontal_tab
        flight-fldate cl_abap_char_utilities=>horizontal_tab
        flight-planetype cl_abap_char_utilities=>horizontal_tab
        seatsmax cl_abap_char_utilities=>horizontal_tab
        seatsocc cl_abap_char_utilities=>horizontal_tab
        cl_abap_char_utilities=>cr_lf
        INTO output.
      ENDLOOP.
      response = runtime->server->response.
      response->delete_header_field( name = if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires ).
      response->delete_header_field( name = if_http_header_fields=>pragma ).
      response->set_header_field( name = if_http_header_fields=>content_type
                                  value = appl ).
      response->set_header_field( name = 'content-disposition'
                                  value = filetype ).
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          text     = output
          mimetype = 'text/unicode; charset=utf-16le'
        IMPORTING
          buffer   = output2.
      CONCATENATE cl_abap_char_utilities=>byte_order_mark_little
                  output2 INTO output2 IN BYTE MODE.
      l_len = XSTRLEN( output2 ).
      response->set_data( data = output2
                          length = l_len ).
      navigation->response_complete( ).
    This is the code for downloading an Excel file.

  • Operation not found error while calling AM methods from managed bean

    Hi,
    operation not found error while calling AM methods from managed bean.
    written a method with two parameters in AM.
    exposed the method in AM client interface
    in the page bindings added the method in method action ..left empty in the value fields of the parameters.
    calling the method from managed bean like below
    String userNameVal = (String)userName.getValue();
    String passwordVal = (String)password.getValue();
    OperationBinding operationBinding =
    ADFUtils.findOperation("verifyLogin");
    operationBinding.getParamsMap().put("userName",userNameVal);
    operationBinding.getParamsMap().put("password",passwordVal);
    operationBinding.execute();
    i am getting operation verifyLogin not found error.Please suggest me something to do.
    Thanks
    Satya

    Hi vlsn,
    Can you try with the below code
    // in your backing bean
    OperationBinding operation = bindings.getOperationBinding("verifyLogin");
    //Put your both parameters here
    operation.getParamsMap().put("parameter_name1", parameterValue1);
    operation.getParamsMap().put("parameter_name2", parameterValue2);
    operation.execute();
    if (operation.getResult() != null) {
    Boolean result = (Boolean) operation.getResult();
    and share the result.
    regards,
    Rajan

  • Error when calling a Webservice's public method in Forms10g

    Hi,
    I'm getting the following error when calling a webservice's public method, i'm using Forms10g 10.1.2.3
    java.rmi.RemoteException; nested exception is: HTTP transport error javax.xml.soap.SOAPException
    java.security.PrivilegedActionException javax.xml.soap.SOAPException
    Message send failed javax.net.ssl.SSLException SSL handshake failed X509CertChI have added the Jar containing the client proxy in both Classpaths(system variable and default.env), the jar has been made with jdk 1.4
    I also have tested the client proxy from jDeveloper and it's working there, but in Forms i'm getting this error.
    I guess my problem might be that i'm calling a webservice that is secured since the url starts with https
    what should i do to fix this ??
    Regards
    Carlos

    I understand, so i have a doubt, why the webservice works on jDeveloper ??Not just JDeveloper even soapUI and Neatbeans have a way of working without a client certificate installed.
    I do not know how they achieve it. I know that they work without a client DC.
    Cheers,
    PS: See this http://stackoverflow.com/questions/8887434/webservices-ssl-https, it offers a clue.
    The java programs run unhindered when one-way authentication is being used. These products ship with a digital certificate that is in the path of most popular CAs.
    Corollary, if the Web Server is configured for mutual authentication then you need to install and configure the client certificate in the tools.
    Edited by: Prabodh on Dec 5, 2012 8:36 PM

  • Error when calling a method inside a form routine...

    Hello experts,
    I am trying to call a method inside a form but it is giving me an error. The error is:
    Access not possible using 'NULL' object reference.
    Anyway, below is my code guys:
    START-OF-SELECTION.
      DATA: main          TYPE REF TO lcl_main,
            old_and_new   TYPE REF TO lcl_old_and_new,
            check_changes TYPE REF TO lcl_check_changes,
            messages      TYPE REF TO lcl_messages.
      CREATE OBJECT: main, old_and_new, check_changes, messages.
          FORM get_orig_contents_of_zts0001                             *
    FORM get_orig_contents_of_zts0001.
      CALL METHOD main->export_old_recs.
    ENDFORM.
    Help would be greatly appreciated. Thanks a lot and take care!

    Before the "START-OF-SELECTION " just add this sentense :
    <b>class lcl_main definition deferred.</b>
    CLASS Definition.
    ENDCLASS.
    CLASS Implementation.
    ENDCLASS.
    START-OF-SELECTION.
    *Do your coding here
    <b>in this way we are deferring the class definition for later</b>

Maybe you are looking for