Learn about classes and perfom in abap

hallow
i wont to learn how to use classes and perform
in abap, any document will help
regards

I will send you the documents...
please give your mail address...
it's good to here about ABAP OOPS.
Regards,
Jayant
Please award if helpful

Similar Messages

  • Learning about classes

    Hi,
    I'm working my way through "The Java Programming Language, Fourth Editition" by Sun Microsystems. There are exercises through the book, but they don't give the solutions (which is helpful!!!).
    They show a simple class, then ask you to produce an identical one to keep track of vehicles. Based on their sample code this should be the code:
    class Vehicle {
         public int speed;
         public String direction;
         public String owner;
         public long idNum;
         public static long nextID = 0;
      }Then then ask you to write a class called LinkedList giving no coding examples 'that has a field type Object and a reference to the next LinkedList element in the list. Can someone help me to decipher what this means and the appropriate code?
    They then show how to create objects linked to the vehicle class, which based on their sample code should be
    Vehicle car = new Vehicle();
    car.idNum = Vehicle.nextID++;
    car.speed = 120
    car.direction = "North"
    car.owner = "Metalhead":
    This is the bit that next confuses me. They ask you to write a main method for your Vehicle class that creates a few vehicles and prints their field values.
    The next exercise is to write a main method for LinkedList class that creates a few objects of type vehicle and places them into successive nodes in the list.
    Is'nt it correct that the above code starting 'Vehicle car' would be the code used to create the object which would go in the LinkerList calling on the Vehicle method which has already been defined? For example, successive entries could be for bus, bike etc in the LinkerList. What does it mean though to place these into successive 'nodes' on the list? And why would you create vehicles in the main method of the Vehicle class. Shouldn't they just be created in the LinkerList?
    I'm only learning about classes and I'm confused already?
    Any help (and code) would be great!!!!
    Thanks for any help,
    Tim
    p.s. I know what I have written sounds vague, bu the book doesn't really give much extra helpful info.

    First of all, the variables of the "Vehicle" class should all be private.
    You should not be able to directly retrieve each variable from this class
    Example:
    Vehicle car = new Vehicle();
    car.idNum = Vehicle.nextID++;
    car.speed = 120
    car.direction = "North"
    car.owner = "Metalhead"You should have methods that can change this data as well as retrieve the data.
    Example:
    class Vehicle {
         private int speed;
         private String direction;
         private String owner;
         private static long nextID = 0;
            public Vehicle() {
                speed = 0;
                direction = "";
                owner = "";
                ++nextID;
            // These methods retrieve the attributes
         public int getSpeed() { return speed; }
            public String getDirection()  { return new String(direction);}
            public String getOwner() { return new String(owner);}
            public long getidNum() { return idNum; }
            // These methods change the attributes
         public int setSpeed(int i) { speed = i; }
            public String setDirection(String s)  { direction = new String(s); }
            public String setOwner(String s) { owner = new String(s); }
    }Now, they want you to create another CLASS that shows what your Vehicle class can do.
    Example:
    public class SomeRandomExampleClass {
        public static void main(String[] args) {
            Vehicle v1 = new Vehicle();
            // Now let's fix up our vehicle
            v1.setSpeed(100);
            v1.setOwner("Zeus");
            v1.setDirection("North");
            // Do note that since idNum is a static variable, it will be increased everytime you create
            // an instance of a Vehicle, and works with the class rather than the object.
            // For instance, if you create Vehicle's v1, v2, and v3, then v1's idNum = 1, v2's idNum = 2;
            // and v3's idNum = 3.
            Vehicle v2 = new Vehicle() ;
            v2.setSpeed(500);
            v2.setOwner("Ricky Bobby");
            v2.setDirection("NorthEast");
            System.out.println(v1.getSpeed()); // prints v1's speed.
            System.out.println(v1.getOwner()); // prints Owner
            System.out.println(v1.getDirection); // Prints Direction
            System.out.println(v1.getidNum());  // prints idNum
            System.out.println(v2.getSpeed()); // prints v1's speed.
            System.out.println(v2.getOwner()); // prints Owner
            System.out.println(v2.getDirection); // Prints Direction
            System.out.println(v2.getidNum());  // prints idNum
    }A linked list is what it sounds like. It can hold a list of (let's say vehicles) and you can print their
    attributes from there.
    For instance, let's say we have a list called list1.
    list1.add(vehicle1);
    list1.add(vehicle2);
    Then you can iterate(move) through your list and print the attributes of each vehicle, instead of having to
    call v1.doThis() v1.doThis(), v2.doThis().
    I find it amusing they want you to create a LinkedList when you are first using/learning classes.
    To understand how to create a linked list, you can visit:
    http://leepoint.net/notes-java/data/collections/lists/simple-linked-list.html
    Or you can use:
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedList.html
    *Note: I wrote the code from nothing so some of it could have syntax errors.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Call Java Class and Methods from ABAP

    Hi
    I install de JCo, But how i can call java class and methods from ABAP?. somebody has an example?
    The tutorial say that's is possible,  but don't explain how do that?
    Thanks.
    Angel G. Hurtado

    If you need only simple java program, you do not need to install JCo. The following codes can call java class.
    DATA: COMMAND TYPE STRING VALUE 'C:\j2sdk1.4.2_08\bin\java',
          DIR TYPE STRING VALUE D:\eclipse\workspace',
          PARAMETER TYPE STRING VALUE 'Helloworld'. "here the name of your java program
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
       EXPORTING
         APPLICATION = COMMAND
         PARAMETER = PARAMETER
         DEFAULT_DIRECTORY = DIR
       MAXIMIZED =
         MINIMIZED = 'X'     "If you need the DOS window to be minimized
      EXCEPTIONS
        CNTL_ERROR = 1
        ERROR_NO_GUI = 2
        BAD_PARAMETER = 3
        FILE_NOT_FOUND = 4
        PATH_NOT_FOUND = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED = 7
        OTHERS = 8.
    Tell me if it works.
    Nuno.

  • Reg : Classes And Methods In ABAP HR

    Hii...
    Can anyone tell me what are the standard OOPS classes and Interfaces related to ABAP HR Technical. I want to know the detailed view of all the classes and interfaces which can be used in HR technically.
    Or is there any way I can find.
    Your suggestions will be helpful for me. So, Kindly help me with this.
    Thanks,
    Regards,
    Rahul Gupta

    Venkat,
        Try look for any SAP Note or create Customer Message to SAP. It's clearly Program Error. We can't collect  "lcl_transform" class into Transport Request Independently as it was local Class not Global Class.
    Try transporting Transformations again, if it still gives problem. Contact SAP.
    Let us know if you implement any SAP Notes.
    all the best.
    Regards,
    Nagesh Ganisetti.
    Assign Points if it helps.

  • About classes and Inheritance

    hi every one,
    i want use class with object in data block and i want know how i can use inheritance with objects.
    becouse i have interview in this two subjects, can any body support my.
    thanks,,,,,,,

    Hello,
    Start Forms Builder, the press F1 to display the online help.
    In the search tab, you can type "Class Property" or "Object Library" to find documentation on those topics:
    About Property Classes A property class is a named object that contains a list of properties and their settings. Once you create a property class you can base other objects on it. An object based on a property class can inherit the setting of any property in the class that makes sense for that object. Property class inheritance is an instance of subclassing. Conceptually, you can consider a property class as a universal subclassing parent. There can be any number of properties in a property class, and the properties in a class can apply to different types of objects. For example, a property class might contain some properties that are common to all types of items, some that apply only to text items, and some that apply only to check boxes. When you base an object on a property class, you have complete control over which properties the object should inherit from the class, and which should be overridden locally. Property classes are separate objects, and, as such, can be copied between modules as needed. Perhaps more importantly, property classes can be subclassed in any number of modules.
    or
    Using the Object Library These topics contain information about using the Object Library in Oracle Forms: About the Object Library Removing an Object from the Object Library Creating a tab in the Object Library Deleting a Tab in the Object Library Saving an Object in the Object Library Opening an Object Library Module Displaying the Object Library Closing the Object Library Commenting Objects in the Object Library
    Francois

  • Using Learn About FireFox and the 'Markers' disappeared never to return?

    Downloaded and installed FF4 for Mac
    Elected to ‘Learn about FireFox’, the browser complete with the Markers and dotted track/order to access line was displayed.
    Hit the first Marker and the relevant info window displayed.
    Hit the next Marker and then was distracted by another link and hit that.
    Returning (back button probably) to the learning session found all the Markers had disappeared.
    Tried various things to get the Markers to reappear but no luck so far.
    I did not restart FF4 but surely this should not be necessary?
    I will do this now but think this needs attention.
    Cheers, NSN
    EDIT: From the links obtained via a Google, I followed the most prominent to Mozilla.com and the info lead me to believe I was downloading FF4. I see this is not so!

    Unfortunately I tried that and it didn't work. Thanks for the help though. I tried to uninstall and it said I couldn't because the file is corrupt or something, but I think I finally got it uninstalled and/or deleted or whatever, but now I try to reinstall/download it again from the beginning and I can't. No matter what I do I can not get Firefox working again. No matter how many times I try to redownload it. Any other suggestions?

  • I don't know what's wrong with my code. it's about class and object.

    * This is generic type of Person
    package myManagement;
    * @author roadorange
    public class Person {
    private String SS;
    private String firstName;
    private String lastName;
    private String middleName;
    private String phoneNumber;
    private String address;
    private String birthDay;
    public void setSS (String SS) {
    this.SS = SS;
    public String getSS() {
    return SS;
    public void setFirstName (String firstName) {
    this.firstName = firstName;
    public String getFirstName() {
    return firstName;
    public void setLastName (String lastName) {
    this.lastName = lastName;
    public String getLastName() {
    return firstName;
    public void setMiddleName (String middleName) {
    this.middleName = middleName;
    public String getMiddleName() {
    return middleName;
    public void setPhoneNumber (String phoneNumber) {
    this.phoneNumber = phoneNumber;
    public String getPhoneNumber() {
    return phoneNumber;
    public void setAddress (String address) {
    this.address = address;
    public String getAddress() {
    return address;
    public void setBirthDay (String birthDay) {
    this.birthDay = birthDay;
    public String getBirthDay() {
    return birthDay;
    public void Person() {
    SS = "1234567890";
    this.firstName = "abc"; //test the keyword "this"
    this.lastName = "xyz";
    middleName = "na";
    phoneNumber = "123456789";
    address = "11-11 22st dreamcity ny 11111";
    birthDay = "11-11-1980";
    public void print() {
    System.out.println("Display Database\n"
    + "Social Security Number: *********" + "\n"
    + "First Name: " + getFirstName() + "\n"
    + "Middle Name: " + getMiddleName() + "\n"
    + "Last Name: " + getLastName() + "\n"
    + "Phone Number: " + getPhoneNumber() + "\n"
    + "Address: " + getAddress() + "\n"
    + "getBirthDay: " + getBirthDay() );
    package myManagement;
    //this class is used to test other class or test other object
    public class testClass extends Person{
    public static void main(String[] args) {
    Person obj1 = new Person();
    obj1.print();
    System.out.println(obj1.getFirstName()); //test the object
    Result:
    Display Database
    Social Security Number: *********
    First Name: null
    Middle Name: null
    Last Name: null
    Phone Number: null
    Address: null
    getBirthDay: null
    null
    i don't know why it's all null. i assign something in the default constructor. it shouldn't be "null".
    does anyone know why?

    when you create 2 class using netbean editor, person.java and test.java
    i never compile person.java.
    when i finish typing these 2 class and i just right click test.java and run.
    my question is do i need to compile person.java before i run test.java directly??
    does Netbean compile it automatically when i run test.java first time?
    i add another constructor Person constuctor with one parameter in Person.java and create 2nd object to test the 2nd constuctor and run.
    All the codes work, so does the first default constructor. i don't why is that.
    Then i removed what i added and restore back to where it didn't work before and test again. it works.
    @_@. so weird.
    problem solved. thank you
    Edited by: roadorange on Feb 25, 2008 7:43 PM

  • Want to know more about class and class type and characters in batch determ

    hi ,
    i want to know abt class functionality and how it is related to batch mgt,means functions of class type , characters etc.
    ok thanks

    Hi ,
    Find the Class and Class Type for Batch Determination.
    Create Class for Batch Management
    Use
    In this step, you define two classes for use with batches. One class contains the characteristic LOBM_VFDAT: Expiration Date, and the other class with three characteristics:
    LOBM_RL: Remaining shelf life for batch,
    LOBM_LFDAT Batch determination delivery date, and
    LOBM_VFDAT Expiration date, shelf life.
    Procedure1.
    Access the activity using one of the following navigation options:
    Transaction Code: CL02SAP R/3 Role Menu     Installation ® Create Class for Batch Management
    2.Choose Create and maintain the necessary master data manually. The relevant data can be found in the file:
      Class     Class type     Description     Characteristic        Characteristic     Characteristic
    023_001     023     Products with Expiration Date     LOBM_VFDAT     
    023_002     023     Search class with expiration date     LOBM_RLZ     LOBM_LFDAT     LOBM_VFDAT
    Result
    The materials are later assigned to class 023_001 in the material masters. 023_002 is used in the batch determination search strategies for SD and PP/PI. 
    Regards,
    SAROSH

  • About Classes and Interfaces

    How can we define the classes and interfaces in an interview can u give me any realtime example for this

    How can we define the classes and interfaces in an
    interviewThe easiest explanation probably is to say that an interface in Java is a special class, namely a totally abstract one, that has been given a separate name.
    Classes and interfaces (because they're classes in disguise) both constitute types, meaning that variables can be declared of them. The difference is that a class can carry implementation whereas an interface cannot (because it's totally abstract).
    Java has single inheritance of implementation which means the the inheritance of classes is restricted to exactly one while you can inherit as many interfaces you like.

  • Which of this is true about class and object?

    (a) A class is made of objects
    (b) A class is a collection of objects
    (c) A class supplies or delivers objects to the rest of the application
    (d) A class is used as a template to create objects
    (e) An object inherits its variables and their values from its class
    (f) An object inherits its variables and methods from its class
    (g) An object inherits its variables and methods from its class and its superclasses
    (h) The variables and methods of a class are defined in its objects
    (i) The variables and methods of an object are defined in its class
    (j) The variables, variable values and methods of an object are given in its class

    (a) A class is made of objects - true
    (b) A class is a collection of objects - true
    (c) A class supplies or delivers objects to the rest of the application - true
    (d) A class is used as a template to create objects - true
    (e) An object inherits its variables and their values from its class - false
    (f) An object inherits its variables and methods from its class - true
    A class is a not collection of objects. A class not only contains objects
    A class represents objects and others.

  • A question about class and interface? please help me!

    the following is program:
    interface A{
    public class B implements A{
    public static void main(String [] args){
    A a = new B();
    System.out.println(a.toString());
    }i want to ask a question, the method toString() is not belong to interface A, why a can call method toString()? the interface call the method that isn't belong to, why? please help me...

    because a.toString() call the method toString() of class Object because B implements A, but extends Object and in the class Object there is a method toString(). infact if you override the method toString() in class B, a.toString() call toString() in class B.
    try this:
    interface A {}
    public class B implements A
      public String toString()
        return "B";
      public static void main(String [] args)
        A a = new B();
        System.out.println(a.toString());
      }by gino

  • I need to learn about memory and backing up my pictures to an external hard drive

    Can you point me to where I can find this info.  Thank you

    RAM (memory) is what the brains of the machine (the processor) uses temporality to work on things, it's not permanent.
    I think your referring to storage  space, which is on your permanent boot drive and holds your operating system, programs and files.
    So you want to make a backup to a external drive, there are various options.
    1: Entire drive backup of everything (TimeMachine or Carbon Copy Cloner)
    2: Just users files (storage drive)
    The easiest is just connecting a blank new external drive larger than the total space on your boot drive and when the pop up window asks to make a TimeMachine drive, say yes and allow it to work (for hours and hours)
    Slightly more difficult is Carbon Copy Cloner, however it's faster and the drive is bootable (advanced) it's also payware thus not free. (also the disk must first be formatted GUID OS X Extended Journaled in Disk Utility)
    If you want to backup just your pictures, you can drag and drop the Pictures folder onto a external storage drive (do not use TimeMachine if it asks) and it will make a copy. This is the fastest method as your avoiding everything else.
    Most commonly used backup methods
    Drives, partitions, formatting w/Mac's + PC's

  • Learning about Powershell and IPV6 for 70-410

    I was reading up on the 70-410 exam as I am trying to study up before I take it at the end of the month and it appears knowing Powershell and IPv6 is necessary. Alot of the links I've searched don't seem to cover how Powershell interacts with managing
    a Server 2012 R2 machine and cover things like scripting, etc. Also, I want to know how would one study IPv6 since this is also important to the exam.

    Hi Matthew,
    For IPV6 you can read:
    " http://technet.microsoft.com/en-us/library/dn610908.aspx  " 
    The best way to study PowerShell is to practice with PowerShell (i.e. Configure the Server Core). This is what I did. :)  Good Luck 
    Greets,
    Kenan
    P.s. : " Training Guide: Installing and Configuring Windows Server 2012 " is a good book that can help you for preparing for 70-410 exam 

  • Learn about ports and connectors of AirPort Express 802.11n (2nd Generation).

    support.apple.com/en-sa/HT202434
    support.apple.com/en-sa/HT3728

    Hamad137 wrote:
    how can i configer my airport express
    Start here:
    http://www.apple.com/support/airport/

  • Can someone please suggest some good projects for learning about usrp and labview for beginners?​??

    Can some1 please me suggest  some good things to work out on USRP using labview.. 

    https://decibel.ni.com/content/groups/ni-usrp-exam​ple-labview-vis?view=documents
    Omar

Maybe you are looking for

  • Workflow for using Sorenson Squeeze Compression Suite

    I am considering purchasing Sorenson Squeeze Compression Suite as I have noticed some unsatisfactory results in Compressor, even though I am generally impressed with Compressor and happy with the program and the options it gives, especially with expo

  • Is there a final cut x memory bleed?

    Hi folks, I've been using FCX on a 2010 Mac Pro 12 core w/ 32 GB Ram over the last year. In January of this year, I bought a nMP 12 core w/ 16 GB Ram.  Both now on Yosemite and latest versions of FCX and Compressor. The 2010 MP was on Mavericks previ

  • I am going on vacation and would like to download lightroom to my husbands laptop- is it possible from my licensed copy of lightroom 5

    I am going on vacation and would like to download lightroom to my husbands laptop- is it possible from my licensed copy of lightroom 5

  • Macbook power supply

    I just recently purchased a black macbook from the Apple store in Japan. I have a apple travel adapter kit, but what I was wondering is this, can I use my 17" powerbook G4 prong cable with the macbook's magsafe brick? The prong extention cord that co

  • SOLVED wlan0 not found by ifconfig

    Network interface device is a wireless usb D-Link DWL-G122 C1. Laptop Dell Latitude C600 kernel-2.6.24-ARCH I am new to Arch, with some Linux experience. Arch is nice and seems right for my old laptop, but this problem has stumped me. The wireless in