Re: How to create More two class with one object

haii,
         i have small information How to create More two class with one object,
bye
bye
babu

Hello
I assume you want to create multiple instance of your class.
Assuming that you class is NOT a singleton then simply repeat the CREATE OBJECT statement as many times as you need.
TYPES: begin of ty_s_class.
TYPES: instance   TYPE REF TO zcl_myclass.
TYPES: end of ty_s_class.
DATA:
  lt_itab      TYPE STANDARD TABLE OF ty_s_class
                 WITH DEFAULT KEY,
  ls_record  TYPE ty_s_class.
  DO 10 TIMES.
    CLEAR: ls_record-instance.
    CREATE OBJECT ls_record-instance.
    APPEND ls_record TO lt_itab.
  ENDDO.
Regards
  Uwe

Similar Messages

  • How to Create Multiple Sources/Classes with one Script

    I am trying to get all of my java sources, or classes, into one script so that I can move them all to another server without having to compile each file individually. When I concatenate two files and try to compile I get an ORA-29536: badly formed source error.
    How can I get multiple definitions into one file and compile all of the classes?
    Thanks,
    Gregory

    Gregory:
    If you want to upload several Java classes in one script the solution is .sql file, for example:
    set define ?
    create or replace and compile java source named "my.Sleep" as
    package my;
    import java.lang.Thread;
    public class Sleep {
    public static void main(String []args) throws java.lang.InterruptedException {
    if (args != null && args.length>0) {
    int s = Integer.parseInt(args[0]);
    Thread.sleep(s*1000);
    } else
    Thread.sleep(1000);
    create or replace and compile java source named "my.App" as
    package my;
    public class App {
    public static void main(String []args) throws java.lang.InterruptedException {
    System.out.println(args[0]);
    exit
    Then the .sql file can be parsed using the SQLPlus, JDeveloper or SQLDeveloper tools.
    HTH, Marcelo.

  • How to create a container class for 2 object?

    I use JDK to create 2 objects, one is Customer and one is Book. I need to enqueue these 2 objects, but they canot share the same queue class. Some one told me that I can create a container class for these 2 objects but I don't know how to create it. Can some one tell me how to create the container class?

    I use JDK to create 2 objects, one is Customer and one
    is Book. I need to enqueue these 2 objects, but they
    canot share the same queue class. Some one told me
    that I can create a container class for these 2
    objects but I don't know how to create it. Can some
    one tell me how to create the container class?
    class CustomerBook{
    Book m_book;
    Customer m_customer;
    pulbic CustomerBook (Customer customer, Book book){
    m_book = book;
    m_customer = customer;
    }If you want to create a class that represents one customer and many books, do this:
    class CustomerBooks{
    Vector m_books;
    Customer m_customer;
    pulbic CustomerBook (Customer customer){
    m_books = new Vector();
    m_customer = customer;
    public void addBook (Book book){
    m_books.addElement (book);
    public void displayBooks (){
    //I assume the Book class has a toString method or something similar
    for (int i = 0;i < m_books.size();i++){
      System.out.println ("book: "+((Book)m_books.elementAt(i)).toString());

  • How to create 2 icloud accounts with one apple id

    I would like to find out how to create 2 iCloud accounts using the same apple id. Currently, my husband's iphone4S and my iPhone 4 have merged contacts which we don't want, and when he texts it shows that it is from me.

    You can't do that.  One of you will have to create a new icloud account with a new ID and connect the device to it.
    TO GET DATA FROM ONE ACCOUNT TO A NEW ACCOUNT:
    When connected to the account you want to GET data from, Go to Settings>iCloud and turn all data that is syncing with iCloud (contacts, calendars, etc.) to Off. 
    When prompted choose to keep the data on the iPhone. 
    After everything is turned off, scroll to the bottom and tap Delete Account.  Next, set up a new iCloud account using a different Apple ID and turn iCloud data syncing for contacts, etc. back to On.  When prompted, choose Merge.  This will upload the data to this new account.
    Note that this only affects the "Apple data" like contacts, calendars, reminders, etc.  Many third party apps also use iCloud to store data files there.  These files may be lost in the process, unless the apps also keep the data locally on the device.
    NOTE:  Photos in the photo stream (if you use it) will not transfer to the new account.  It is advised that you save the photos to a computer before performing the account switch. 
    CREATING A NEW ID:
    Each user should have their own icloud account, otherwise they end up getting the same emails, contacts, calendars, notes, reminders, etc. - usually not what you want.  But if all have been sharing the same itunes ID, keep it that way, you can have different IDs for itunes and icloud.
    If you already have another icloud account, and want to set it up on a device, then go to Settings>icloud, scroll to bottom of screen and tap Delete Account.  This only disconnects the device from that account, no data is lost on icloud.  Then enter the account ID that you want to use.
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/

  • How to create a blinking starfield with one mc

    I have create one blinking star in a mc.
    It´s moving in a circle and blinking and changing
    colors.
    Now I want to create a starfield with blinking stars where
    every individual
    star is moving in a different way.
    The problem is, if I copy and past 100 of this mc with my
    blinking star in the
    same timeline (main) Theres no individuality. (I hope you
    understand my swedish/english).
    I know that I can copy an paste the same mc at 100 different
    frames..but that´s "low tech.
    Now then:
    How the should the actionscript looks like which manage to
    solve this problem?
    random something...??
    I know I can read and learn, but I ´ve been working with
    this site for over a year now and I have
    become halfblind (not really - I use glasses) of reading
    actionsript all nights long and working
    at my regular job from 9 to 5.
    The technical stuff It´s in other words not my strenght
    :wink
    Here´s my portfolio site:
    http://www.goodwill.se
    (The actionscripting is done with a lot of help from this
    forum)

    Creating a blinking starfield from one blinking mc.
    >you need to give your star movie clip a linkage name.
    lets say star_mc. Then loop 100 times. in each loop you attach the
    >star_mc in a random place on the stage. lets say the width of
    your stage is 500wx500h. The code should look like that:
    >for(var i:Number=0;i<100;i++){
    >star_mc=_root.attachMovie("star_mc","star_mc"+i,_rott.getNextHiestDepth())
    >star_mc._x=random(500)
    >star_mc._y=random(500)
    >}
    Cool, this is the first step- to spread the mc all over.
    But I wonder if they can be spread in time.
    So every star move individual in time.
    Now they move and blinking as a group, where every
    star is in the exactly same position in their tweening
    process, in time.
    (the blinking status is exactly the same for eveyone)

  • How to create a JClient form with one master block & multiple detail block?

    Hello,
    I am using Jdevelopver 10.1.2
    I want to have a JClient Form with one master table A and two detail tables B, C.
    But in the JClient Form wizard, I can only create a one master with one detail relationship. Can I create multiple details in that wizard ?
    Thanks
    Stephen

    Create a JPanel based on the second detail table with the wizard and add manually the JPanel to the Master-detail Form.
    Regards
    Fred

  • How to create more body tags under one region

    Good Day,
    All Concerns,
    I need help in a thingi. i created a page, in page created reports which comes under body tag.
    I wanted to create more than one body tags. How can i create that

    i wanted to create a page that contains in first row only one columns and in second row contains 2 columns. I think i can acheive this by adding another body tag . If there is another simple way to do this kinldy guide

  • Service Interface: How to create an SDO graph with tow Objects

    Hi,
    I want to create a Web service interface on top of my application module. Using the Service Interface I select the app mod, service methods and view objects from the data model. My data model consists of a master detail relationship. The Web service should provide an interface that uses a master and its details as parameters in an operation.
    For example a customer and his credit cards. A GET-Operation should return a data structure that groups all objects.
    I do not know how I can configure such a web service.
    How can I achieve such a web service?
    Do I have to code a service method and what is the return type of the method?
    Can I work with existing VOs?
    Do I need 'special' preconditions like a composition between master and detail?
    Any idea?
    Thanks,
    Markus

    Hi Scott
    Bad news. I read several time this thread, but I have not found error in my program ... .
    And I can not see what are really doing APIs of APEX.
    Time is going - so we have make a decision now.
    Probably (as I have no more answers at this forum) - we can not use APEX (as nobody using APEX sessions as I asked),
    as we can not manage its sessions programmatically (too risky).
    Thanks for your answer.
    Andres

  • How do I use two iphones with one itunes

    My wife and I are using iphones. Unfortunately we got only one Windows PC. How do we set them both woth our own emails because everytime it is set now, she sync to my emails.

    Create her own user acount on the PC.

  • How to ichat between two computers with one .mac account

    My husband and I travel a lot separately and need to be able to ichat when one of us is away.
    We have an iMac at home, and an iBook on the road (both about a year old with the latest software updated). We tried using an AIM account on one and our .mac account on the other which worked once, but now we can't seem to get it to work.
    Can anyone help us with this?
    Thanks very much.

    Hi tarnia,
    Welcome to the  Discussions
    That really is too little information to work with.
    See this FAQ fro hints to start with and some questions to answer
    http://discussions.apple.com/thread.jspa?threadID=527902
    10:25 PM Sunday; September 16, 2007

  • How to create a Sales order with ref to Contract using Function Module

    How to create a Sales order with ref to Contract using Function Module BAPI_SALESDOCU_CREATEFROMDATA ?

    We have a unique situation where we like change the sold-to customer of the sales order
    once order has been created. These orders have been created using either by function module
    BAPI_SALESDOCUMENT_COPY or using BDC (VA01, Copy with reference).
    These two processes work abosolutely fine except someone might have change the sold-to
    customer of the ship-to customer of the original sales order. If this the case then the new
    sales order will be created with the old sold-to and with not the new sold-to.
    We tried using BAPI_SALESDOCUMENT_CHANGE and commit afterwards. We checked
    the returned parameteres of the BAPIs and they are all successful but sold-to remains the
    same old one.
    Any help would be much more appreciated.

  • Class override, how to create the child class and then the base class

    I started to write a program for a smart DMM, the problem is every version of the DMM the company change the communication commend.
    My idea is to write a child class for every DMM version and every SubVI of the child will override the base class SubVI.
    My problem is, i want first to create one child class and after i will see every thing is work,  start to create the base class. that way i will see if am thinking the right way.
    My question is
    How can i create a child class and then create the base class and configure the SubVi of the child class to be Override of the base class?
    I tried to search in the property of the class but i didn't see nothing.
    Thanks
    Solved!
    Go to Solution.

    This can be done and I've done it on occasion.
    You simply create the base class with the dynamic dispatch methods you require (connector panes need to be identical to thos of the child class).
    Then set the inheritance of the class to inherit from this base class.  If your method is defined as a dynamic dispatch method in the parent, you'll most likely now have some errors (unless your child method was already DD in which case you might just be OK already).
    To change the inheritance of a class, right-click the properties of the class in your project and select properties.  I believe the ineritance tree is at the lower end of the properties.  Click on the "change inheritance" (or something similar) to choose the class from which you now wish to inherit.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • How to create an unsolved cube with awm???

    hi all,
    I readed the "Oracle Olap developer's guide to the Oalp api" and I found there's 2 type of Cube: Solved and Unsolved Cubes. And this document says: "... if all the data for a cube is specified by the DBA, then the cube is considered to be Solved. If some or all of the aggregate data must be calculated by Oracle OLap, then the cube is unsolved ..."
    I tried with awm 10.2.0.3.0A to create an unsolvedCube but I can't. All cubes I created are solvedCube. To know if a cube is solved or unsolved, I wrotte an program in Java to read informations of package mtm.
    Some one can tell me how to create an unsolved cube with AWM ou other soft please!

    SH is not a relational OLAP data model which is quite different from the GLOBAL schema which is based on an Analytic Workspace.
    If you change the aggregation method you will need to re-compute the whole cube which can be a very big job! You might be able to force the unsolved status be de-selecting all the levels on the Rules tab in AWM. However, I think by default analytic workspace OLAP models always provide a fully solved cube to the outside world. This is the nature of the multi-dimensional model.
    Relationally, as keys are located in separate columns a cube can be unsolved in that the key column only contains values for a single level from the corresponding dimension tables. If more than keys for different levels within the same dimension appear within the fact key column then the cube is deemed as being solved.
    Therefore, I am not sure you are going to get the information you require from the API. To changes the aggregation method you will have to switch off all pre-compute options and also disable the session cache to prevent previously calculated data being returned when you change the aggregation method.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?

    1. How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?
    When multiple tables are involved , and the actual number of rows returned is more than what the explain plan tells. How can I find out what change is needed  in the stat plan  ?
    2. Does rowsource statistics gives some kind of  understanding of Extended stats ?

    You can get Row Source Statistics only *after* the SQL has been executed.  An Explain Plan midway cannot give you row source statistics.
    To get row source statistics either set STATISTICS_LEVEL='ALL'  in the session that executes theSQL OR use the Hint "gather_plan_statistics"  in the SQL being executed.
    Then use dbms_xplan.display_cursor
    Hemant K Chitale

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

Maybe you are looking for

  • How do I show invisibles in Pages for iPad?

    I'm using Pages on an iPad 2.  I'd like to show "invsibles" or formatting marks in my documents but don't know how to do it.  Can anyone please help? Thanks Alison

  • What's a good setting for my Firewall?

    Running a Mac - do we need to buy into a internet security plan? And what are the differences in my Firewall settings? How dangerous is it to leave it on "allow all incoming connections"?

  • Xls/pdf Download Options not available in interactive report on group by

    Hello All, I have the similar problem like mentioned here: export from IR with group by there I didn't find any response, Please let me know why it is happening, is there any solution to this. thanks Tauceef Edited by: Tauceef on Feb 9, 2011 4:02 PM

  • SAP ECC S&OP Macro for this requirement

    Hi there, I am doing flexible planning in S&OP and as a result maintained a row to calculate the actual inventory cost. The S&OP is done at Product Group level with many FERT in it per group. So when I do my S&OP plan I want to be able to calculate t

  • How to install the Solairs 9 without change my existing partition?

    I got 2 partitions on my hard drive: 1)Primary partition, running Win2000, occupied 40% of my hard drive. 2)Ext partition, which divided into two drives E & F. I want to install the Solaris 9 on the E drive with out change to other drives(C,F). Q1: W