Constructor and Class constructor

Hi all
Can any one explain me the functionality about Constructor and class constructor??
As well as normal methods, which you call using CALL METHOD, there are two special methods
called CONSTRUCTOR and CLASS_CONSTRUCTOR, which are automatically called when you
create an object (CONSTRUCTOR) or when you first access the components of a class
(CLASS_CONSTRUCTOR)
I have read the above mentioned document from SAP Documents but i found it bit difficult to understand can any one please help me on this??
Thanks and Regards,
Arun Joseph

Hi,
Constructor
Implicitly, each class has an instance constructor method with the reserved name constructor and a static constructor method with the reserved name class_constructor.
The instance constructor is executed each time you create an object (instance) with the CREATE OBJECT statement, while the class constructor is executed exactly once before you first access a class.
The constructors are always present. However, to implement a constructor you must declare it explicitly with the METHODS or CLASS-METHODS statements. An instance constructor can have IMPORTING parameters and exceptions. You must pass all non-optional parameters when creating an object. Static constructors have no parameters.
Class Constructor
The static constructor is always called CLASS_CONSTRUCTER, and is called autmatically before the clas is first accessed, that is before any of the following actions are executed:
Creating an instance using CREATE_OBJECT
Adressing a static attribute using ->
Calling a ststic attribute using CALL METHOD
Registering a static event handler
Registering an evetm handler method for a static event
The static constructor cannot be called explicitly.
For better understanding check the following code:
REPORT  z_constructor.
      CLASS cl1 DEFINITION
CLASS cl1 DEFINITION.
  PUBLIC SECTION.
    METHODS:
      add,
      constructor IMPORTING v1 TYPE i
                            v2 TYPE i,
      display.
    CLASS-METHODS:
     class_constructor.
  PRIVATE SECTION.
    DATA:
    w_var1   TYPE i,
    w_var2   TYPE i,
    w_var3   TYPE i,
    w_result TYPE i.
ENDCLASS.                    "cl1 DEFINITION
      CLASS cl1 IMPLEMENTATION
CLASS cl1 IMPLEMENTATION.
  METHOD constructor.
    w_var1 = v1.
    w_var2 = v2.
  ENDMETHOD.                    "constructor
  METHOD class_constructor.
    WRITE:
    / 'Tihs is a class or static constructor.'.
  ENDMETHOD.                    "class_constructor
  METHOD add.
    w_result = w_var1 + w_var2.
  ENDMETHOD.                    "add
  METHOD display.
    WRITE:
    /'The result is =  ',w_result.
  ENDMETHOD.                    "display
endclass.
" Main program----
data:
  ref1 type ref to cl1.
parameters:
  w_var1 type i,
  w_var2 type i.
  start-of-selection.
  create object ref1 exporting v1 = w_var1
                              v2 = w_var2.
   ref1->add( ).
   ref1->d isplay( ).
Regards,
Anirban Bhattacharjee

Similar Messages

  • Using the 'java.sound.*' libraries and classes

    Hello,
    I am a complete noob to Java. So please forgive me if I seem a little stupid in the things I ask.
    I would like to know which development kit I should download to be able to gain access to the 'java.sound.*' and midi libraries and classes.
    I downloaded the Java SE 6 SDK but I could get access to these classes.
    I use JCreator as my compiler and I kept getting an error along the lines of 'java.sound.* package does not exist'. I have tried compiling the code with NetBeans and also wiuth Eclipse and I still have no luck and I get the same message. I am guessing the compiler is not the problem and it is the SDK as I can access other classes such as javax.swing and java.awt etc.
    If you could give me a link to the relevant SDK and maybe a good compiler, it would be greatly appreciated.
    Also I am using Windows XP and Windows Vista so if you could provide me with support for either of these operating systems then that would be great.
    Thank You
    Lee

    Here's the code for an SSCCE (Small Self Contained Compilable Example) of a working java sound application. If you don't provide a file name, It does expect you to have a wave file of Ballroom Blitz in your javatest directory, but doesn't everybody?
    To build and run it do:
    javac -cp . SoundPlayer.java
    java -cp . SoundPlayer  yourWaveFile.wav  
    import java.io.*;
    import javax.sound.sampled.*;
    import javax.sound.sampled.DataLine.*;
    public class SoundPlayer implements LineListener
         private float bufTime;
         private File soundFile;
         private SourceDataLine line;
         private AudioInputStream stream;
         private AudioFormat format;
         private Info info;
         private boolean opened;
         private int frameSize;
         private long frames;
         private int bufFrames;
         private int bufsize;
         private boolean running;
         private boolean shutdown;
         private long firstFrame, lastFrame;
         private float frameRate;
         private long currentFrame;
         private float currentTime;
         private Thread playThread;
         // constructor, take a path to an audio file
         public SoundPlayer(String path)
              this(path, 2);     // use 2 second buffer
         // or a path and a buffer size
         public SoundPlayer(String path, float bt)
              this(new File(path),bt);
         public SoundPlayer(File sf)
              this(sf, 2);  // use 2 second buffer
         public SoundPlayer(File sf, float bt)
              bufTime = bt;          // seconds per buffer
              soundFile = sf;
              openSound();
         private void openSound()
              System.out.println("Opening file"+soundFile.getName());
              try
                   firstFrame = 0;
                   currentFrame = 0;
                   shutdown = false;
                   running = false;
                   stream=AudioSystem.getAudioInputStream(soundFile);
                   format=stream.getFormat();
                   if(format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED)
                        System.out.println("Converting Audio stream format");
                        stream = AudioSystem.getAudioInputStream(AudioFormat.Encoding.PCM_SIGNED,stream);
                        format = stream.getFormat();
                   frameSize = format.getFrameSize();
                   frames = stream.getFrameLength();
                   lastFrame = frames;
                   frameRate = format.getFrameRate();
                   bufFrames = (int)(frameRate*bufTime);
                   bufsize = frameSize * bufFrames;
                   System.out.println("frameRate="+frameRate);
                   System.out.println("frames="+frames+" frameSize="+frameSize+" bufFrames="+bufFrames+" bufsize="+bufsize);
                   info=new Info(SourceDataLine.class,format,bufsize);
                   line = (SourceDataLine)AudioSystem.getLine(info);
                   line.addLineListener(this);
                   line.open(format,bufsize);
                   opened = true;
              catch(Exception e)
                   e.printStackTrace();
         public void stop()
              System.out.println ("Stopping");
              if(running)
                   running = false;
                   shutdown = true;
                   if(playThread != null)
                        playThread.interrupt();
                        try{playThread.join();}
                        catch(Exception e){e.printStackTrace();}
              if (opened) close();
         private void close()
              System.out.println("close line");
              line.close();
              try{stream.close();}catch(Exception e){}
              line.removeLineListener(this);
              opened = false;
         // set the start and stop time
         public void setTimes(float t0, float tz)
              currentTime = t0;
              firstFrame = (long)(frameRate*t0);
              if(tz > 0)
                   lastFrame = (long)(frameRate*tz);
              else lastFrame = frames;
              if(lastFrame > frames)lastFrame = frames;
              if(firstFrame > lastFrame)firstFrame = lastFrame;
         public void playAsync(float start, float end)
              setTimes(start,end);
              playAsync();
         // play the sound asynchronously */
         public void playAsync()
              System.out.println("Play async");
              if(!opened)openSound();
              if(opened && !running)
                   playThread = new Thread(new Runnable(){public void run(){play();}});
                   playThread.start();
         public void play(float start, float end)
              setTimes(start,end);
              play();
         // play the sound in the calling thread
         public void play()
              if(!opened)openSound();
              if(opened && !running)
                   running = true;
                   int writeSize = frameSize*bufFrames/2; // amount we write at a time
                   byte buf[] = new byte[writeSize];     // our io buffer
                   int len;
                   long framesRemaining = lastFrame-firstFrame;
                   int framesRead;
                   currentFrame=firstFrame;
                   System.out.println("playing file, firstFrame="+firstFrame+" lastFrame="+lastFrame);
                   try
                        line.start();
                        if(firstFrame > 0)
                             long sa = firstFrame * frameSize;
                             System.out.println("Skipping "+firstFrame+" frames="+sa+" bytes");
                             while(sa > 0)sa -= stream.skip(sa);
                        while (running && framesRemaining > 0)
                             len = stream.read(buf,0,writeSize); // read our block
                             if(len > 0)
                                  framesRead = len/frameSize;
                                  framesRemaining -= framesRead;
                                  currentTime = currentFrame/frameRate;
                                  if(currentTime < 0)throw(new Exception("time too low"));
                                  System.out.println("time="+currentTime+" writing "+len+" bytes");
                                  line.write(buf,0,len);
                                  currentFrame+=framesRead;
                             else framesRemaining = 0;
                        if(running)
                             line.drain();                     // let it play out
                             while(line.isActive() && running)
                                  System.out.println("line active");
                                  Thread.sleep(100);
                             shutdown = true;
                        running = false;
                   catch(Exception e)
                        e.printStackTrace();
                        shutdown = true;
                        running = false;
                   if(shutdown)
                        close();
         // return current time relative to start of sound
         public float getTime()
              return ((float)line.getMicrosecondPosition())/1000000;
         // return total time
         public float getLength()
              return (float)frames / frameRate;
         // stop the sound playback, return time in seconds
         public float  pause()
              running = false;
              line.stop();
              return getTime();
         public void update(LineEvent le)
              System.out.println("Line event"+le.toString());
         // play a short simple PCM encoded clip
         public static void playShortClip(String fnm)
              java.applet.AudioClip clip=null;
              try
                   java.io.File file = new java.io.File(fnm);     // get a file for the name provided
                   if(file.exists())                    // only try to use a real file
                        clip = java.applet.Applet.newAudioClip(file.toURL()); // get the audio clip
                   else
                        System.out.println("file="+fnm+" not found");
              catch(Exception e)
                   System.out.println("Error building audio clip from file="+fnm);
                   e.printStackTrace();
              if(clip != null)     // we may not actually have a clip
                   final java.applet.AudioClip rclip = clip;
                   new Thread
                   (new Runnable()
                             public void run()
                                  rclip.play();
                   ).start();
         public boolean isOpened()
              return opened;
         public boolean isRunning()
              return running;
        public void showControls() {
            Control [] controls = line.getControls();
            for (Control c :controls) {
                System.out.println(c.toString());
        public void setGain(float gain) {
            FloatControl g = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
            g.setValue(gain);
        public static void main(String [] args) {
            float gain = 0;
            String file = "c:\\javatest\\BallroomBlitz.wav";
              for(String arg : args) {
                for(int i = 0; i < arg.length(); i++) {
                    char c  = arg.charAt(i);
                    if (c == '-') {
                        gain -= 1;
                    } else if (c == '+') {
                        gain += 1;
                    } else {
                             file = arg;
            SoundPlayer sp = new SoundPlayer(file);
            sp.showControls();
            System.out.println("setting gain to " + gain);
            sp.setGain(gain);
            sp.play();
    }

  • [svn] 4885: Flex SDK Framework - Update mx.filters API and class hierarchy

    Revision: 4885
    Author: [email protected]
    Date: 2009-02-06 16:12:32 -0800 (Fri, 06 Feb 2009)
    Log Message:
    Flex SDK Framework - Update mx.filters API and class hierarchy
    - Removed BaseFilter.as, BaseDimensionFilter.as, and GradientFilter.as
    - Renamed IBitmapFilter.as to IFlexBitmapFilter.as
    - Changed IBitmapFilter.clone to createBitmapFilter
    - Moved properties and functions from base classes up to filter subclasses
    - Changed ColorMatrixFilter constructor parameter from Array to Object
    - Added Change metadata to all filter classes
    - Changed notifyFilterChanged from public to private
    - Added ASDoc comments
    - Added copyright info
    - Added a number of formatting and style fixes
    QE Notes: Need to update tests based on API changes. Missing tests for DisplacementMapFilter.as.
    Doc Notes: Need extensive ASDoc review. Consider using @copy for properties that match the flash.filters properties
    Bugs: n/a
    Reviewer: Gordon
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInst ance.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BevelFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BlurFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ConvolutionFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DisplacementMapFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DropShadowFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GlowFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientBevelFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientGlowFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.a s
    flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
    Added Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IFlexBitmapFilter.as
    Removed Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as

    Yup. The source files are simply missing from the 4.5 source releases....I'm hitting the same issue when trying to rebuild the SDK with flexcover changes applied.

  • What is the field and Table for "Batch Class" and "Class Type" in QM.

    Hi All,
    What is the field and Table for "Batch Class" and "Class Type" in QM.
    Thanks,

    Hi,
      For batch class the class type value is '023' . This you can find from KLAH table and the fileld for class type is KLART..
    And also all the data related to batch class are found in tables INOB, KLAH,KKSK and for the characeteristics of batch materials you can refer AUSP table.
    In INOB table, for batch class, you need to give 023 in KLART field and  value MCH1 in OBTAB filed.
    Please check this and let me know if this you need any more details?

  • How to find classtype and class for a material.

    Hi,
    How to find classtype and class for a material.
    which table contains this data.
    Thanks
    Kiran

    Hi Kiran,
    Check below sample code. Use this BAPI which will give all info about the class for the material.
      DATA:      l_objectkey_imp    TYPE bapi1003_key-object
                                         VALUE IS INITIAL.
      CONSTANTS: lc_objecttable_imp TYPE bapi1003_key-objecttable
                                         VALUE 'MARA',
                 lc_classtype_imp   TYPE bapi1003_key-classtype
                                         VALUE '001',
                 lc_freight_class   TYPE bapi1003_alloc_list-classnum
                                         VALUE 'FREIGHT_CLASS',
                 lc_e               TYPE bapiret2-type VALUE 'E',
                 lc_p(1)            TYPE c             VALUE 'P',
                 lc_m(1)            TYPE c             VALUE 'M'.
      SORT i_deliverydata BY vbeln posnr matnr.
      CLEAR wa_deliverydata.
      LOOP AT i_deliverydata INTO wa_deliverydata.
        REFRESH: i_alloclist[],
                 i_return[].
        CLEAR:   l_objectkey_imp.
        l_objectkey_imp = wa_deliverydata-matnr.
    *Get classes and characteristics
        CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
          EXPORTING
            objectkey_imp         = l_objectkey_imp
            objecttable_imp       = lc_objecttable_imp
            classtype_imp         = lc_classtype_imp
    *   READ_VALUATIONS       =
            keydate               = sy-datum
            language              = sy-langu
          TABLES
            alloclist             = i_alloclist
    *   ALLOCVALUESCHAR       =
    *   ALLOCVALUESCURR       =
    *   ALLOCVALUESNUM        =
            return                = i_return
    Thanks,
    Vinod.

  • Loading .jar and .class in MX7

    I have a cfx tag that includes a .class and .jar file. I
    could do this on the old MX server but in MX7 the option is not in
    the cfide/administrator.
    I copied the .jar and .class files into the
    c:\cfusionmx7\runtime\lib\ directory and then added them to the
    bottom of the jvm.config file with the following entry. (note: The
    .jar file is called MYNEWFILE.jar)
    java.class.path={application.home}/servers/lib,{application.home}/../lib/macromedia_driver s.jar,{application.home}/lib/cfmx_mbean.jar,{application.home}/lib,{application.home}/lib/ MYNEWFILE.jar,{application.home}/../wwwroot/WEB-INF/lib/
    I then rebooted the server. I also have a ".class" file that
    goes with this. I have no idea where to put that thing. The cfx
    (which I mapped in the administrator).
    I get the standard 500 error saying:
    HTTP 500 - Internal server error
    Internet Explorer
    even though I have debugging going to my laptop.
    Here is the output of the exception.log
    "Error","jrpp-0","07/05/07","16:04:14",,"com/allaire/cfx/CustomTag
    The specific sequence of files included or processed is:
    C:\Inetpub\wwwroot\Pauly\example.cfm "
    java.lang.NoClassDefFoundError: com/allaire/cfx/CustomTag
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown
    Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:69)
    at
    coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:207)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at coldfusion.tagext.CfxTag.doStartTag(CfxTag.java:88)
    at
    coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1908)
    at
    cfexample2ecfm2026642798.runPage(C:\Inetpub\wwwroot\Pauly\example.cfm:3)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:105)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    "Information","Thread-10","07/05/07","16:14:10",,"Address
    already in use: JVM_Bind"
    java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at
    coldfusion.server.jrun4.metrics.CfstatServer.run(CfstatServer.java:64)
    Any help would be greatly appreciated, as I've been working
    on this for a while. I couldn't find a solution in the forums so I
    thought I would post. Thanks!
    Pauly

    >> java.lang.NoClassDefFoundError:
    com/allaire/cfx/CustomTag
    Is the CFX.jar in the classpath?
    > The option is not in the cfide/administrator.
    What option? The administrator has several options for custom
    jars, tags, et.
    - Extensions -> Custom Tag Paths
    - Extensions -> CFX Tags
    CF will also look in these directories automatically
    - {cf_webroot}/WEB-INF/classes (for classes)
    - {cf_webroot}/WEB-INF/lib (for jars)

  • Batch Management and Class and Characteristics Assignment

    Dear Team,
    Recently We Configured Batch Management in SD, and Batch is determining in Sales order, delivery and Billing. Its working fine.
    Issue-1: While posting stock (Quality server) with moment type 561, production date entered manually but system not calculating Expiry date automatically, i maintained Total shelf Time and Min. Rem. Shelf time.
    Issue-2: In sales order I want determine batch as FIFO Method, in present system it will consider LIFO method,
    I come to know to over come this Issues i need to maintain some Characteristics and Class, Please help me out in creating of characteristics and class and other process,
    Thanking you in advance,
    Sudheer.U

    Dear Team,
    Recently We Configured Batch Management in SD, and Batch is determining in Sales order, delivery and Billing. Its working fine.
    Issue-1: While posting stock (Quality server) with moment type 561, production date entered manually but system not calculating Expiry date automatically, i maintained Total shelf Time and Min. Rem. Shelf time.
    Issue-2: In sales order I want determine batch as FIFO Method, in present system it will consider LIFO method,
    I come to know to over come this Issues i need to maintain some Characteristics and Class, Please help me out in creating of characteristics and class and other process,
    Thanking you in advance,
    Sudheer.U

  • Difference Between Business Object And Class Object

    Hi all,
    Can any one tel me the difference between business object and class Object....
    Thanks...
    ..Ashish

    Hello Ashish
    A business object is a sematic term whereas a class (object) is a technical term.
    Business objects are all important objects within R/3 e.g. sales order, customer, invoice, etc.
    The business objects are defined in the BOR (transaction SWO1). The have so-called "methods" like
    BusinessObject.Create
    BusinessObject.GetDetail
    BusinessObject.Change
    which are implemented (usually) by BAPIs, e.g.:
    Business Object = User
    User.Create => BAPI_USER_CREATE1
    User.GetDetail => BAPI_USER_GET_DETAIL
    CONCLUSION: Business Object >< Class (Object)
    Regards
      Uwe

  • To view database Java Source and Class code in SQL Developer - Do this...

    I've wanted something like this for a while.. Hope this helps someone else...
    Make a master detail report...
    1. Click the reports tab.
    2. Right click on "user defined reports" and select "add report"
    3. Type "Java Source Object and Class Code" into the name field.
    4. Make sure "Style" is set to "Table".
    5. Paste this code into the "SQL" window.
    select OBJECT_NAME, OBJECT_TYPE, to_char(created,'DD-MON-YYYY HH24:MI:SS') Created, to_char(LAST_DDL_TIME,'DD-MON-YYYY HH24:MI:SS') "Last DDL", STATUS
         from user_objects
        where object_type in ('JAVA SOURCE')
        order by object_name6. Click "Add child"
    7. Make sure "Style" is set to "Code" in the child.
    8. Paste the following code into the SQL window of the child.
    select text from user_source where name = :OBJECT_NAME order by line9. Click Apply..
    10. Enjoy...
    no semicolons after the sql....
    Message was edited by:
    slugo

    Mark,
    Thanks Check this out people can now subscribe to the public reports out no the exchange.
    http://krisrice.blogspot.com/2007/10/marks-post-on-forums-got-me-to-do.html
    -kris

  • How to get ATINN value based on material number and Class Type ?

    I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN.
    However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different.
    So how can I get ATINN(Internal characteristic) value based on material number and Class Type?
    -Obtain the batch characterstic value for the Material******************
      SELECT atwrt
        UP TO 1 ROWS
        INTO v_charvalue
        FROM ausp
       WHERE objek = mcha-matnr
         AND atinn = '0000000381'   " 'US80_FRENCH_ON_LABEL'
         AND klart = '001'.
    THANKS N ADVANCE.

    Hi SAm,
    use the Below function module to get the Atinn for Atwrt for thr Class and MAterial combination..
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtype          = '023'       "Class type
            object             = w_object  "Material number with Leading zeros
            no_value_descript  = 'X'      "Default X
            objecttable        = 'MCH1'    "Table name Mara or MCH1 or MARC
          TABLES
            t_class            = t_class   "It return the Batch class available for the above combination
            t_objectdata       = t_char  "Return Batch characteristics(ATWRT) and their value ATINN in this table
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
    Regards,
    Prabhudas

  • From which table I can find the "Class type" and "Class" of the material?

    From which table I can find the "Class type" and "Class" of the material?
    Thanks in advance for the answers....

    Hi,
    try following table
    KSSK     Material number to class     
    KLAS     Class description     
    KSML     Characteristic name     
    CABN/CABNT     Characteristic name description     
    CAWN/CAWNT     Characteristic name
    [http://www.sap-img.com/materials/classification-view-of-material-master.htm]
    [http://wiki.sdn.sap.com/wiki/display/ERPLO/FrequentlyUsedTables]
    Regards
    kailas Ugale

  • Why java file name and class name are equal

    could u explain why java file name and class name are equal in java

    The relevant section of the JLS (?7.6):
    When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (?7.2.2), the host system must not impose such restrictions. In practice, many programmers choose to put each class or interface type in its own compilation unit, whether or not it is public or is referred to by code in other compilation units.

  • Any hints for preloading and classes?

    Hi all on forum.
    I have made a class that loads a website (pretty ordinary..)
    but since all of the site is generated as Childobjects and
    class-code, I was trying to make a preloader, but it wont
    work.Seems that the class loads first and then generates the whole
    site before the first frame is loaded (where my loader is)..
    so any hints?

    use a preloader swf that loads your main swf.

  • Building Tree hierarchy Using nested loops and class cl_gui_column_tree

    Hello gurus,
    I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are created as constants and hardcoded. I want to create hierarchy using nested loops. For this i took one example of a hierarchy of VBAK-VBELN->VBAP-POSNR Like One sales order has many line items and each line item can have number of line items in billing plan.
    I have done some coding for it.
    FORM build_tree USING node_table TYPE treev_ntab
                                           item_table TYPE zitem_table.              " i created the zitem_table table type of mtreeitm in SE11.
      DATA: node TYPE treev_node,
                 item TYPE mtreeitm.
      node-node_key = root.
      CLEAR node-relatkey.
      CLEAR node-relatship.
      node-hidden = ' '.
      node-disabled = ' '.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-isfolder = 'X'.
      node-expander = 'X'.
      APPEND node TO node_table.
      item-node_key = root.
      item-item_name = colm1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Root'.
      APPEND item TO item_table.
      item-node_key = root.
      item-item_name = colm2.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Amount'.
      APPEND item TO item_table.
      LOOP AT it_vbeln INTO wa_vbeln.
        node-node_key = wa_vbeln-vbeln.
        node-relatkey = root.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = 'X'.
        node-expander = 'X'.
        APPEND node TO node_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-vbeln.
        APPEND item TO item_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-netwr.
        APPEND item TO item_table.
        LOOP AT it_posnr INTO wa_posnr.
        node-node_key = wa_posnr-posnr.
        node-relatkey = wa_vbeln-vbeln.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = ' '.
        node-expander = ' '.
        APPEND node TO node_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-posnr.
        APPEND item TO item_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-netpr.
        APPEND item TO item_table.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    Now this program compiles fine and runs till there is only one level. That is root->vbeln. But when i add one more loop of it_posnr it gives me runtime error of message type 'X'. The problem i found was uniqueness of item-item_name as all the sales order have posnr = 0010. What could be done? I tried giving item_name unique hierarchy level using counters just like stufe field in prps eg. 10.10.10, 10.10.20,10.20.10,10.20.20,20.10.10 etc.. etc.. but still i am getting runtime error when i add one more hierarchy using nested loop. Plz guide.
    Edited by: Yayati6260 on Jul 14, 2011 7:25 AM

    Hello all,
    Thanks the issue is solved. The node key was not getting a unique identification as nodekey. I resolved the issue by generating unique identification for each level. Thanks all,
    Regards
    Yayati Ekbote

  • Abstract method and class

    I'm a beginner in Java and just learn about abstract method and class.
    However, i am wondering what is the point of using abstract method/class?
    Because when I delete the abstract method and change the class name to public class XXXX( changed from "abstract class XXXX), my program still runs well, nothing goes different.
    Is it because I haven't encountered any situation that abstract method is necessary or ?
    Thanks!

    Yes - you probably haven't encountered a situation where you need an abstract.
    Abstract classes are not designed to do anything on their own. They are designed to provide a template for other classes to extend by inheritance. What you have build sounds like a concrete class - one which you are creating instances of. Abstract classes are not designed to be ever instantiated in their pure form - they act like a partial building block, which you will complete in a class which extends the abstract.
    An example might be a button class, which provides some core functionality (like rollover, rollout etc) but has an empty action method which has to be overwritten by a relevant subclass like 'StartButton'. In general, abstract classes may not be the right answer, and many people would argue that it is better to use an interface, which can be implemented instead of extended, meaning that you can ADD instead of REPLACING.
    Not sure if that helps.. there are whole chapters in books on this kind of thing, so it's hard to explain in a couple of paragraphs. Do some google searches to find out more about how they work.

Maybe you are looking for