Calling an implemented method from an external class.

Hey guys...
I'm writing a package to be put into a program I'm writing for a project (for Uni), but I also want to use the package in other programs.
Basically, the package will return a JScrollPane that can be put into any JFrame or JPanel or whatever.
It draws boxes on the JScrollPane in different colours and locations depending on what information is passed to it (kind of like iCal or Microsoft Outlook Calendar), and is to be used for a Resource Allocation Program that requires drag and drop of boxes for moving bookings around etc.
http://www.pixel2.com.au/ethos/class_diagram.png
This is a copy of the class diagram for the relevant classes. ViewFrame is the class that instantiates the JScrollPane (AllocationTable). It implements the AllocationInterface to implement methods such as moveAllocation() newAllocation() etc.
BookingPanel is the content pane for the JScrollPane. AllocatedBox is the individual bookings, or boxes that are painted onto the BookingPanel.
BookingPanel implements ActionListener, MouseListener and MouseMotionListener, which enables drag and drop functionality.
What I want to do, is when mouseReleased() is called by dropping a box, call the method moveAllocation() in ViewFrame to make the changes to the database to move the booking around.
I don't know how to access that from BookingPanel as the name of ViewFrame will change obviously for different programs.
If you could help me out, that would be great!
If you need anything else explained, please let me know.
Thanks,
Ryan.

LeRyan wrote:
Hey guys...
I'm writing a package to be put into a program I'm writing for a project (for Uni), but I also want to use the package in other programs.
Basically, the package will return a JScrollPane that can be put into any JFrame or JPanel or whatever.I think you have some terminology issues that might stand in your way of getting help or understanding the issues. A Package is a grouping of classes, so a package doesn't return anything...
It draws boxes on the JScrollPane in different colours and locations depending on what information is passed to it (kind of like iCal or Microsoft Outlook Calendar), and is to be used for a Resource Allocation Program that requires drag and drop of boxes for moving bookings around etc.So from your description of the function of this thing, I think you mean a class - some sort of JComponent?
>
http://www.pixel2.com.au/ethos/class_diagram.png
This is a copy of the class diagram for the relevant classes. ViewFrame is the class that instantiates the JScrollPane (AllocationTable). It implements the AllocationInterface to implement methods such as moveAllocation() newAllocation() etc.
BookingPanel is the content pane for the JScrollPane. AllocatedBox is the individual bookings, or boxes that are painted onto the BookingPanel.
BookingPanel implements ActionListener, MouseListener and MouseMotionListener, which enables drag and drop functionality.
What I want to do, is when mouseReleased() is called by dropping a box, call the method moveAllocation() in ViewFrame to make the changes to the database to move the booking around.
I don't know how to access that from BookingPanel as the name of ViewFrame will change obviously for different programs.
If I follow, and I am not sure that I do - you want a reference to the ViewFrame in the BookingPanel. So either on construction of the BookingPanel via a parameter in the constructor, or as a separate step via a setter, place a reference to the ViewFrame in BookingPanel. Then when you call mouseReleased you can call moveAllocation through that reference.
If you could help me out, that would be great!
If you need anything else explained, please let me know.
Thanks,
Ryan.

Similar Messages

  • How can i call a main method  from a different class???

    Plzz help...
    i have 2 classes.., T1 and T2.. Tt2 is a class with a main method....i want to call the main method in T2......fromT1..is it possibl..plz help

    T2.main(args);

  • Calling a method from an abstract class in a seperate class

    I am trying to call the getID() method from the Chat class in the getIDs() method in the Outputter class. I would usually instantiate with a normal class but I know you cant instantiate the method when using abstract classes. I've been going over and over my theory and have just become more confused??
    Package Chatroom
    public abstract class Chat
       private String id;
       public String getID()
          return id;
       protected void setId(String s)
          id = s;
       public abstract void sendMessageToUser(String msg);
    Package Chatroom
    public class Outputter
    public String[] getIDs()
         // This is where I get confused. I know you can't instantiate the object like:
            Chat users=new Chat();
            users.getID();
    I have the two classes in the package and you need to that to be able to use a class' methods in another class.
    Please help me :(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I have just looked over my program and realised my class names are not the most discriptive, so I have renamed them to give you a clearer picture.
    package Chatroom
    public abstract class Chatter
    private String id;
    public String getID()
    return id;
    protected void setId(String s)
    id = s;
    I am trying to slowly build a chatroom on my own. The Chatter class is a class that will be used to represent a single logged in user and the user is given an ID when he logs in through the setId and getID() methods.
    package Chatroom;
    import java.util.Vector;
    public class Broadcaster
    private Vector<Chatter> chatters = new Vector<Chatter>();
    public String[] getIDs()
    // code here
    The Broadcaster class will keep a list of all logged-in users keeps a list of all the chats representing logged-in users, which it stores in a Vector.I am trying to use the getIDs() method to return an array of Strings comprising the IDs of all logged-in users, which is why im trying to use the getID() method from the Chat class.
    I apologise if I come across as clueless, it's just I have been going through books for about 4 hours now and I have just totally lossed all my bearings

  • Calling a method from a super class

    Hello, I'm trying to write a program that will call a method from a super class. This program is the test program, so should i include extends in the class declaration? Also, what code is needed for the call? Just to make things clear the program includes three different types of object classes and one abstract superclass and the test program which is what im having problems with. I try to use the test program to calculate somthing for each of them using the abstract method in the superclass, but its overridden for each of the three object classes. Now to call this function what syntax should I include? the function returns a double. Thanks.

    Well, this sort of depends on how the methods are overridden.
    public class SuperFoo {
      public void foo() {
         //do something;
      public void bar(){
         //do something
    public class SubFoo extends SuperFoo {
       public void foo() {
          //do something different that overrides foo()
       public void baz() {
          bar(); //calls superclass method
          foo(); //calls method in this (sub) class
          super.foo(); //calls method in superclass
    }However, if you have a superclass with an abstract method, then all the subclasses implement that same method with a relevant implementation. Since the parent method is abstract, you can't make a call to it (it contains no implementation, right?).

  • How to call a method from a separate class using IBAction

    I can't work out how to call a method form an external class with IBAction.
    //This Works 1
    -(void)addCard:(MyiCards *)card{
    [card insertNewCardIntoDatabase];
    //This works 2
    -(IBAction) addNewCard:(id)sender{
    //stuff -- I want to call [card insertNewCardIntoDatabase];
    I have tried tons of stuff here, but nothing is working. When i build this I get no errors or warnings, but trying to call the method in anyway other that what is there, i get errors.

    Can you explain more about what you are trying to do? IBAction is just a 'hint' to Interface Builder. It's just a void method return. And it's unclear what method is where from your code snippet below. is addNewCard: in another class? And if so, does it have a reference to the 'card' object you are sending the 'insertNewCardIntoDatabase' message? Some more details would help.
    Cheers,
    George

  • Calling a method from a different class?

    Ok..
    I been trying for hours... but im stumped.
    How can I get this to work?
    (Note: I cut this code down from over 600+ lines of code.. I left in a REALLY raw framework that shows where the basic problem is.)
    public class Client extends JPanel implements Runnable {
    // variable declarations...
        Socket connection;
        BufferedReader fromServer;
        PrintWriter toServer;
        public Client(){
    // GUI creation...
    // Create the login JFrame
        Login login = new Login()
        public void connect(){
        try {
                //Attempt to connect to the server
                connection = new Socket(ip,port);
                fromServer = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                toServer = new PrintWriter(connection.getOutputStream());
                //Launch a thread here to read incoming messages from the server
                //so I dont block on reading
                new Thread (this).start();
        } catch (Exception e) {
            e.printStackTrace();
        public void run(){
            // This keeps reading lines from the server
            String s;
            try {
                //Read messages sent from the server - add them to chat window
                while ((s=fromServer.readLine()) != null) {
                txtChat.append(s);
            } catch (Exception e) {}
        public static void main(String args[]){
            // some init frame stuff
            frame = new JFrame();
            frame.getContentPane().add(new Client(),BorderLayout.CENTER);
         frame.setVisible(true);
    class Login extends JFrame {
        JPanel pane;
        public Login() {
         super("Login");
         pane = new JPanel();
         JButton cmdConnect = new JButton("Connect");
            pane.add(cmdConnect);
         setContentPane(pane);
         setSize(300,300);
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         cmdConnect.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent ae){
              // I want to connect to the server when this button is pressed.
              // How can I call the connect method in the Client class?
    }

    Your posted code shows Login as an inner class. So one way to solve your problem is.
    1. Make an instance variable to hold the instance. For example, after "PrintWriter toServer;" add "private Client client;"
    2. In the Client constructor, add a line "client = this;"
    3. In the Login actionPerformed(), use "client.connect();"
    Another way is to have Login keep a reference to the Client that created it.
    1. Add an instance variable to Login "private Client client;"
    2. Change the Login constructor "public Login(Client c) {"
    3. Add a line in the constructor "client = c;"
    4. In the actionPerformed() "client.connect();"

  • How do I call an Application Module method from a EntityImpl class?

    Guys and Gals,
    Using Studio Edition Version 11.1.1.3.0.
    I've got a price update form, that when submitted, takes the part numbers and prices in the form and updates the corresponding Parts' price in the Parts table. Anytime this Parts view object's ReplacementPrice attribute is changed, an application module method needs to be called which updates a whole slew of related view objects. I know you can modify view objects via associations (How do I call an Application Module method from a ViewObjectImpl class? but that's not what I'm trying to do. These AppModuleImpl methods are the hub for all price updates, as many different operations may affect related pricing (base price lists, price buckets, etc) and hence, call the updatePartPricing(key) method.
    For some reason, the below code does not call / run / activate the application module's method. The AppModuleDataControl exists and recordPartHistory(key) is registered and public. At runtime, the am.<method> code is simply ignored, and as a weird side-effect, I cannot navigate out of my current page flow.
      public void setReplacementPrice(Number value)
        setAttributeInternal(REPLACEMENTPRICE, value);
        AppModuleImpl am = (AppModuleImpl)this.getDBTransaction().findApplicationModule("AppModuleDataControl");
        Key key = new Key(new Object[]
            { getPartNumber() });
        am.recordPartHistory(key);  // AppModuleImpl method which records pricing history
        am.updatePartPricing(key); // AppModuleImpl method which updates a whole slew of related pricing tables
      }Any ideas?

    Thanks Timo.
    Turns out the code provided was correct, but the AppModuleImpl method being called was not. A dependent ViewObject wasn't returning the row I was expecting. I then tried to perform some operations on that row, which in turn ... just stopped everything, but didn't give me an error.
    It was the lack of the error that threw me off. I had never messed with calling an AppModuleImpl method from the EntityImpl so I assumed that's what was messing up.
    You are correct. It is available from the ViewRow, but I thought it better to put it in the EntityImpl. This method will be called every time the replacement cost is modified. If I didn't put it in the EntityImpl, I'd have to remember to call it every time a replacement cost changed.

  • Need help calling a method from an immutable class

    I'm having difficulties in calling a method from my class called Cabin to my main. Here's the code in my main              if(this is where i want my method hasKitchen() from my Cabin class)
                        System.out.println("There is a kitchen.");
                   else
                        System.out.println("There is not a kitchen.");
                   }and here's my method from my Cabin class:public boolean hasKitchen()
         return kitchen;
    }

    You should first have an instance of Cabin created by using
       Cabin c = ....
       if (c.hasKitchen()) {
         System.out.println("There is a kitchen.");
       } else {
            System.out.println("There is not a kitchen.");
       }

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • Call a  Webservice method from DotNetApplication

    Hi all,
    I have created One web service using Axis. My WebServices are below:
    import java.util.*;
    public class NHLService {
      HashMap standings = new HashMap();
      public NHLService() {
        // NHL - part of the standings as per 04/07/2002
        standings.put("atlantic/philadelphia", "1");
        standings.put("atlantic/ny islanders", "2");
        standings.put("atlantic/new jersey", "3");
        standings.put("central/detroit", "1");
        standings.put("central/chicago", "2");
        standings.put("central/st.louis", "3");
      public String getCurrentPosition(String division, String team) {
        String p = (String)standings.get(division + '/' + team);
        return (p == null) ? "Team not found" : p;
    }Its name is NHLService.jws. Then I run this service in my localhost like this "http://localhost:8080/axis/NHLService.jws" It is running and show that
    There is a Web Service here
    Click to see the WSDL Now I can view the wsdl. Now I want to call this webservice method from DotNet Application.Please any one knows that can you guide me the steps.
    Thanks in Advance,
    Raj

    but i don't understand a thing...
    when i create a static stub client i link with the config-wsdl file the path of my webservices wdsl and the client compile and run well...
    why with the servlet i had to link .class file or jar file??
    thanks a loto

  • Calling a service method from a DataAction

    Hello!
    I'm trying to call a service method from a DataAction, cobbling ideas from the Oracle JDeveloper 10g Handbook and the Oracle ADF Data Binding Primer.
    I have created a service method and exposed it using the client interface node of the application module editor. It is called "process()" and it now appears in the data control palette under MyAppDataControl->Operations (just above the built-in action bindings Commit and Rollback). As part of this procedure, I modified MyAppImpl.java and put the process() method there.
    I don't want to call process() by dragging and dropping it onto a Data Action because depending on the outcome, I want to branch to different pages. process() returns an int that will tell me where to branch. Thus, I am trying to call it from an overridden invokeCustomMethod() method of the lifecycle of a DataAction, where I can get the int, create a new ActionForward, and set it in the DataActionContext. (If I'm barking up the wrong tree, let me know!)
    So, I need to call MyAppImpl.process() from within the invokeCustomMethod() method of my DataAction. Looking at the class declaration, I noticed that it extends ApplicationModuleImpl. I figure that, if I can get the ApplicationModule, I can cast it to MyAppImpl and call the process() method. Unfortunately, that doesn't work. When I got the application module, I checked the class and it's oracle.jbo.common.ws.WSApplicationModuleImpl. I tried casting it and got a class cast exception.
    Here's the code I'm using:
    protected void invokeCustomMethod(DataActionContext actionContext) {
    BindingContext ctx = actionContext.getBindingContext();
    DCDataControl dc = ctx.findDataControl("MyAppDataControl");
    log.debug("invokeCustomMethod(): dc.getClass().getName()=" + dc.getClass().getName()); // result is: oracle.jbo.uicli.binding.JUApplication
    ApplicationModule am = null;
    MyAppImpl myAppImpl = null;
    int processResult = 0;
    if (dc instanceof DCJboDataControl) { // this is true
    am = dc.getApplicationModule();
    log.debug("invokeCustomMethod(): am.getClass().getName()=" + am.getClass().getName()); // result is: oracle.jbo.common.ws.WSApplicaitonModuleImpl
    if (am instanceof ApplicationModuleImpl) { // this is false
    log.debug("invokeCustomMethod(): am is an instanceof ApplicationModuleImpl.");
    if (am instanceof MyAppImpl) { // this is false
    log.debug("invokeCustomMethod(): am is an instanceof MyAppImpl.");
    processResult = ((MyAppImpl)am).process();
    log.debug("invokeCustomMethod(): processResult=" + processResult);
    super.invokeCustomMethod(actionContext);
    What am I doing wrong? Can anyone explain the different class hierarchies and why my application module isn't the class I'm expecting?
    Thanks,
    -Anthony Carlos

    Georg,
    it was in the javadoc of oracle.adf.model.binding.DCBindingContainer
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/vtTopicFile.bc4jjavadoc36%7Crt%7Coracle%7Cadf%7Cmodel%7Cbinding%7CDCBindingContainer%7Ehtml/navId.4/navSetId._/
    However, I see it's not the case in other sub-classes of JboAbstractMap like DCControlBinding and DCDataControl.
    Weird... I'm keeping you informed if I find more information.
    Regards,
    Didier.

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • Problem calling a Java Method from C++

    hi everyone,
    i'm using JNI and i'm trying to call a Java method from C++, this is the code:
    SocketC.java
    public class SocketC
    private native void conectaServidor();
    private void recibeBuffer()
    System.out.println("HELLO!!!");
    public static void main(String args[])
    SocketC SC = new SocketC();
    SC.conectaServidor();
    static {
    System.loadLibrary("Server_TCP");
    Server_TCP.cpp
    char* recibirSock()
         int _flag = 1;
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
              recv(sock,buffer,sizeof(buffer),0);
              printf(" Mensaje del cliente: %s\n",buffer);
              _flag = strcmp(buffer,"salir");
         }//fin while
         return buffer;
    void enviarSock()
         int _flag = 1;
         getchar();
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//procedimiento para enviar
              printf("\n Escriba: ");
              gets(buffer);
         //     err=scanf("%s",buffer);
              send(sock,buffer,sizeof(buffer),0);
              _flag = strcmp(buffer,"salir");
         }//fin while
    }//fin enviarSock
    DWORD servicio(LPVOID lpvoid)//
         char *buf;
         printf("\n Cliente aceptado!!!!!\n");
         buf=recibirSock();
         return 0;
    JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)
    //void main()
    /*this is the problem i'm calling the method recibeBuffer*/
         jclass cls = env->GetObjectClass(obj);
         jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "(V)V");
         if (mmid == 0)
              return;
         env->CallVoidMethod(obj, mmid); //llama a Java
         WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock
         printf("TCP conexion Sockets\n\n");
         //estimez vous heureux que je foute pas de copyright ;)
         system("TITLE TCP Conexion Sockets (Version server)");
         //fo avouer que c'est plus joli
         int port;
         printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
         scanf("%i",&port);
         sinserv.sin_family=AF_INET;     //Je ne connais pas d'autres familles
         sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
         sinserv.sin_port=htons(port);
         server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
         //SOCK_STREAM pour le TCP
         bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
         //On lie les parametres du socket avec le socket lui meme
         listen(server,SOMAXCONN);//On se met � �couter avec server, 0 pour n'accepter qu'une seule connection
         printf(" Servidor conectado.");
         while(1)
              sinsize=sizeof(sin);
              if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
              {//accept : acepta cualquier conexion
                   if (hReadThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
                   servicio, 0, 0, &dwThreadID))
                        printf("\nHOLA!");
                        GetExitCodeThread(hReadThread,&dwExitCode);
                        CloseHandle (hReadThread);
                   else
                        // Could not create the read thread.
                        printf("No se pudo crear");
                        exit(0);
    when i'm running the proyect i get this error:
    C:\POT Files\UCAB\tesis\esmart\french>java SocketC
    Exception in thread "main" java.lang.NoSuchMethodError: recibeBuffer
    at SocketC.conectaServidor(Native Method)
    at SocketC.main(SocketC.java:16)
    i don't know why this is happening i got declare the method recibeBuffer in my SocketC.java class, but doesn;t work can anyone help me?
    PD: sorry for my bad english i'm from Venezuela

    Next time please paste your code between &#91;code&#93; tags with the code button just above the edit message area.
    To answer your question, you wrote the wrong method signature. It should be:jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "()V");Regards

  • Call of the method START_ROUTINE of the class LCL_TRANSFORM failed; wrong type for parameter SOURCE_PACKAGE

    Hi,
    My DTP load failed due to following error.
    Call of the method START_ROUTINE of the class LCL_TRANSFORM failed; wrong type for parameter SOURCE_PACKAGE
    I don't think anything wrong with the following code as data loads successfully every day. Can any one check?  What could be the issue?
    METHOD start_routine.
    *=== Segments ===
         FIELD-SYMBOLS:
           <SOURCE_FIELDS>    TYPE _ty_s_SC_1.
         DATA:
           MONITOR_REC     TYPE rstmonitor.
    *$*$ begin of routine - insert your code only below this line        *-*
    *   Fail safe which replaces DTP selection, just in case
         DELETE SOURCE_PACKAGE WHERE version EQ 'A'.
    *   Fill lookup table for the ISPG
         SELECT p~comp_code m~mat_plant m~/bic/zi_cpispg
           INTO TABLE tb_lookup
         FROM /bi0/pplant AS p INNER JOIN /bi0/pmat_plant AS m ON
           p~objvers EQ m~objvers AND
           p~plant   EQ m~plant
         FOR ALL ENTRIES IN SOURCE_PACKAGE
         WHERE p~objvers   EQ 'A' AND
               p~comp_code EQ SOURCE_PACKAGE-comp_code AND
               m~mat_plant EQ SOURCE_PACKAGE-material.
         SORT tb_lookup BY comp_code material.
    *$*$ end of routine - insert your code only before this line         *-*
       ENDMETHOD.     

    Hi,
    Compare the data types of the fields in your table tb_lookup with the data types in your datasource. Most probably there is an inconsistency with that. One thing that I realize is that
    I use the select statement in the format select ... from ... into... Maybe you need to change places of that, but I am not sure. You may put a break point and debug it with simulation.
    Hope it gives an idea.
    Yasemin...

  • How to call a set method from within a constructor

    Hello,
    I want to be able to call a set method from within a Scanner, to be used as the argument to pass to the Scanner (from a source file). Here's what i tried:
    private void openFiles()
            input = new Scanner( setSource );              
        and here is the set method:
    public String setSource( String in )
            source = in;
            return source;
        }obviously there will be more code in this method but i'm trying to tackle one problem at a time. Thanks in advance..

    The "String in" declaration says: "Nobody may ever invoke setSource() without specifying a certain String. The content of the String is known at run-time only."
    In no place in your code you say the compiler: "I want the 'in' variable (actually, parameter) of method setSource() to contain the first arg which is passed to the application".
    This is exactly the same mechanism allowing you to write "new Scanner" with something inside the two parentheses.

Maybe you are looking for

  • Oracle Provider for OLE  DB is missing

    Hello everyone, I am a newbie and I am trying to install the SAP IDM 7.2 on windows server 2008 x64 and Oracle 11.2.0.4. The JVM and the oracle client are 64bit. All components are installed on the same server. In the first step "adding an identity s

  • Duplicate Record

    Dear friend, i have form has master-detail, the detail block has id's and seq no's, and i have when validate item trigger on seq no that check if user use same id so ganna get message that duplicate recode is not allwoed, i put this code in iD(WHEN-V

  • Not another classpath problem...

    I'm trying to use the TableExample demo from jdk1.3.1. I'm using cloudscape as the database for this from the j2sdkee1.3.1. The database starts no problem (rmi mode). So I run the example and provide the database driver in the popup window, only to g

  • Thumbnails not matching underlying pictures

    When I open an event in iPhoto '08 the thumbnails do not consistently reflect the underlying photo. When I double-click the thumbnail, a different picture come up, the one that matches the ID info. I have a relatively large file (over 20K pix) stored

  • Does anyone know wherre i can get Videora iPOD Converter?

    ="= sry im really bad at these... can someone plz tell me where to get Videora iPOD Converter and guide me thru the process >_< i do very appreicate it! thank u!