Static methods vs instant methods

hi to all abap gurus
thanks in advance
all of the objects in the class can acess its its static attributes . and if u change the static attribute in an  object the change is visible in all other objects in the calsssss.
can u pls expain this and tell the diffrence bewteen static and instance metod s?

Hi,
<b>Instance Method</b>
You can declare instance methods by using the METHODS statement. They play a very important role as they can access all of the attributes of a class and can trigger all of the events of the class.
<b>Static Methods</b>
You can declare static methods by using the CLASS-METHODS statement. They are important and can only access static attributes and trigger static events.
<b>STATIC METHODS</b>
CAN ONLY USE STATIC COMPONENTS IN THEIR IMPLEMENTATION PART
CAN BE CALLED USING THE CLASS
Static methods (also referred to as class methods) are called using CALL METHOD <classname>=><class_method>.
If you are calling a static method from within the class, you can omit the class name.
You access static attributes using <classname>=><class_attribute>
Regards,
Padmam.

Similar Messages

  • Use of 'static' keyword in synchronized methods. Does it ease concurrency?

    Friends,
    I have a query regarding the use of 'synchronized' keyword in a programme. This is mainly to check if there's any difference in the use of 'static' keyword for synchronized methods. By default we cannot call two synchronized methods from a programme at the same time. For example, in 'Program1', I am calling two methods, 'display()' and 'update()' both of them are synchronized and the flow is first, 'display()' is called and only when display method exits, it calls the 'update()' method.
    But, things seem different, when I added 'static' keyword for 'update()' method as can be seen from 'Program2'. Here, instead of waiting for 'display()' method to finish, 'update()' method is called during the execution of 'display()' method. You can check the output to see the difference.
    Does it mean, 'static' keyword has anything to do with synchronizaton?
    Appreciate your valuable comments.
    1. Program1
    public class SynchTest {
         public synchronized void display() {
              try {
                   System.out.println("start display:");
                   Thread.sleep(7000);
                   System.out.println("end display:");
              } catch (InterruptedException e) {
                   e.printStackTrace();
         public synchronized void update() {
              try {
                   System.out.println("start update:");
                   Thread.sleep(2000);
                   System.out.println("end update:");
              } catch (InterruptedException e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              System.out.println("Synchronized methods test:");
              final SynchTest synchtest = new SynchTest();
              new Thread(new Runnable() {
                   public void run() {
                        synchtest.display();
              }).start();
              new Thread(new Runnable() {
                   public void run() {
                        synchtest.update();
              }).start();
    Output:
    Synchronized methods test:
    start display:
    end display:
    start update:
    end update:
    2. Program2
    package camel.java.thread;
    public class SynchTest {
         public synchronized void display() {
              try {
                   System.out.println("start display:");
                   Thread.sleep(7000);
                   System.out.println("end display:");
              } catch (InterruptedException e) {
                   e.printStackTrace();
         public static synchronized void update() {
              try {
                   System.out.println("start update:");
                   Thread.sleep(2000);
                   System.out.println("end update:");
              } catch (InterruptedException e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              System.out.println("Synchronized methods test:");
              final SynchTest synchtest = new SynchTest();
              new Thread(new Runnable() {
                   public void run() {
                        synchtest.display();
              }).start();
              new Thread(new Runnable() {
                   public void run() {
                        synchtest.update();
              }).start();
    Output:
    Synchronized methods test:
    start display:
    start update:end update:
    end display:

    the synchronized method obtain the lock from the current instance while static synchronized method obtain the lock from the class
    Below is some code for u to have better understanding
    package facado.collab;
    public class TestSync {
         public synchronized void add() {
              System.out.println("TestSync.add()");
              try {
                   Thread.sleep(2000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("TestSync.add() - end");          
         public synchronized void update() {
              System.out.println("TestSync.update()");
              try {
                   Thread.sleep(2000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("TestSync.update() - end");          
         public static synchronized void staticAdd() {
              System.out.println("TestSync.staticAdd()");
              try {
                   Thread.sleep(2000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("TestSync.staticAdd() - end");
         public static synchronized void staticUpdate() {
              System.out.println("TestSync.staticUpdate()");
              try {
                   Thread.sleep(2000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              System.out.println("TestSync.staticUpdate() - end");
         public static void main(String[] args) {
              final TestSync sync1 = new TestSync();
              final TestSync sync2 = new TestSync();
              new Thread(new Runnable(){
                   public void run() {
                        sync1.add();
              }).start();
              new Thread(new Runnable(){
                   public void run() {
                        sync2.update();
              }).start();
              try {
                   Thread.sleep(3000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              new Thread(new Runnable(){
                   public void run() {
                        sync1.staticAdd();
              }).start();
              new Thread(new Runnable(){
                   public void run() {
                        sync2.staticUpdate();
              }).start();
    }

  • About the setting method of  Instant Messaging(collabo4.01)

    Please teach me the setting method of Instant Messaging ID ( yahoo ).
    Although an icon is displayed, it will not be in an offline state.

    Hi,
    You can debug you JSPDynpage either from NWDS with the help of break points or by writing log statements in your code which will be written in defaultTrace log file.
    Check this to debug from NWDS:
    NetWeaver Portal Debugging
    Check this to write log statements:
    http://help.sap.com/saphelp_nw70/helpdata/EN/b0/003c41325fa831e10000000a1550b0/frameset.htm
    Netweaver Portal Log Configuration & Viewing (Part 3)
    Regards,
    Praveen Gudapati

  • Using a variable from another method within another method

    I have a couple methods. In the beginning of the class I declared the double variables. Then I have a method1 that in that class that changes those double variables. Then the last method2 runs, and is suppose to print information to the screen with the changed variable information all being called from another class. How do I get those changed double variables to be read in method2?

    Sorry about all that, when I paste it in from the compiler it's skews it some, but hopefully this should be more readable
    * Project Filename: Lab1s2
    * Program Filename: Lab1s2.java
    * I/O Files used:
    * Fuction:          This program will use interactive input to ask cost of a
    *                   product in dollars and cents (eg. 17.50).  If the product
    *                   is not less than $100.00, an error message will be displayed
    *                   and input will be requested again.  Once a valid value is
    *                   given, the program will calculate the fewest bills and change
    *                   to be returned if the customer gives a $100.00 bill.
    * Formulas:         (100 - amount = change)
    * Algorithm:
    * Purpose:          The main method calls other methods found in the MoneyXX class
    *                   that will accomplish the function of the project.
    public class Lab2sl
         public static void main( String[] args ) // main method begins program execution
         Money2sl myMoney2sl = new Money2sl(); // create myMoney2sl object and assign it to Money2sl
            myMoney2sl.inputSL();// calls input method and pass argument
            myMoney2sl.changeSL(); // calls change method
            System.out.println(); // output a blank line
         myMoney2sl.outputSL(); //calls outputSL to show results
    * Project Filename: Money2SL.java
    import java.util.Scanner;
    import java.util.Calendar;
    public class Money2sl
         Scanner input = new Scanner( System.in ); // create Scanner to obtain input from command window
        private double change,
                       amount; // instant variable, stores amount
        private double twentyD = 20.00;
        private double tenD = 10.0;
        private double fiveD = 5.0;
         private double dollar = 1.0;
         private double quarter = 0.25;
         private double dime = 0.10;
         private double nickel = 0.05;
         private double penny = 0.01;
         private double numTwentyD;
         private double numTenD;
         private double numFiveD;
         private double numDollar;
         private double numQuarter;
         private double numDime;
         private double numNickel;
         private double numPenny;
        // inputSL() method gets amount, checks to see if it is under $100, stores amount into variable
        public void inputSL() //input method
             Calendar dateTime = Calendar.getInstance(); // get current date and time
            //print date and time
            System.out.printf( "%s\n", "nothing" );
            System.out.printf( "%1$ta, %1$tB. %1$te, %1$tY %1$tr\n\n", dateTime );
             //print output
                System.out.println( "Please enter the amount of money (less than $100) that you will spend: ");  // prompt
              amount = input.nextDouble();
              while ( amount > 100 )
                  System.out.println( "error - enter amount less than $100");
                System.out.println( "Please enter the amount of money (less than $100) that you will spend: ");  // prompt
                  amount = input.nextDouble();
             } // end inputSL method
        // changeSL() calculates change from amount entered out of $100
         public void changeSL()
              change = 100 - amount; // calculate change
              while(change > 0)
            if ( change - fiveD >= 0 )
                        numFiveD ++;
                       change -= fiveD;
              if ( change - fiveD >= 0 )
                        numFiveD ++;
                       change -= fiveD;
              if ( change - dollar >= 0 )
                        numDollar++;
                       change -= dollar;
              if ( change - quarter >= 0 )
                        numQuarter ++;
                       change -= quarter;
              if ( change - dime >= 0 )
                        numDime ++;
                       change -= dime;
              if ( change - nickel >= 0 )
                       numNickel ++;
                       change -= nickel;
              if ( change - penny >= 0 )
                        numPenny ++;
                       change -= penny;
         } // end changeSL method
        //outputSL() displays original amount, change dollar amount, and change in individual bills and coins
        public void outputSL()
             System.out.printf( "$%.2f dollars will return $%.2f, which is: ",
                                 amount, change );
            System.out.println(); // blank line
             System.out.println(); // blank line
            if ( numTwentyD > 0 )
                 if ( numTwentyD > 1)
                      System.out.println( numTwentyD + " twenty dollar bills" );
                 System.out.println( numTwentyD + " twenty dollar bill" );
            if ( numTenD > 0)
                 if ( numTenD > 1 )
                      System.out.println( numTwentyD + " ten dollar bills" );
                 System.out.println( numTwentyD + " ten dollar bill" );
            if ( numFiveD > 0)
                 if ( numFiveD > 1 )
                      System.out.println( numFiveD + " five dollar bills" );
                 System.out.println( numFiveD + " five dollar bill" );
            if ( numDollar > 0)
                 if ( numDollar > 1 )
                      System.out.println( numDollar + " one dollar bills" );
                 System.out.println( numDollar + " one dollar bill" );
              if ( numQuarter > 0)
                 if ( numQuarter > 1 )
                      System.out.println( numQuarter + " quarters" );
                 System.out.println( numDollar + " quarter" );
              if ( numDime > 0)
                 if ( numDime > 1 )
                      System.out.println( numDime + " dimes" );
                 System.out.println( numDime + " dime" );
              if ( numNickel > 0)
                 if ( numNickel > 1 )
                      System.out.println( numNickel + " nickels" );
                 System.out.println( numNickel + " nickel" );
              if (numPenny > 0)
                 if ( numPenny > 1 )
                      System.out.println( numPenny + " pennies" );
                 System.out.println( numPenny + " penny" );
    }

  • Class-data versus data and methods versus class-methods in OO ABAP

    Hi
    I was going thorugh following OO ABAP code.
    CLASS vessel DEFINITION.
      PUBLIC SECTION.
        METHODS: constructor,
                 drive IMPORTING speed_up TYPE i,
                 get_id RETURNING value(id) TYPE i.
        CLASS-METHODS: start,
                       objects,
                       inheritance,
                       interfaces,
                       events.
      PROTECTED SECTION.
        DATA: speed TYPE i,
              max_speed TYPE i VALUE 100.
      PRIVATE SECTION.
        CLASS-DATA object_count TYPE i.
        DATA id TYPE i.
    ENDCLASS.
    Whats is difference between methods and class-methods ?
    What is the difference between data and class-data ?

    Hi Rajesh,
    There are two types of componenets in a class
    1)Static components
    2) Instance components
    Instance components exist for every instance of the class, while static exist only once for any number of instances of the class.
    Components of the class are methods, attributes, events etc.
    static attributes are represented by CLASS-DATA and instance attributes are represented by DATA.
    static methods hence are done by CLASS-METHODS and can access only static attributes.
    Instance methods are done by METHODS and can access any attribute.
    For eg: supposing that in a class, there is a static attribute. Suppose after one instance is created, we are setting this static attribute value as 10. Now we are creating another instance of the same class. Now when you try to display the value of this attribute, it will be 10.ie. it needs to be initialized once and can be shared between instances.
    Just go through this document..You will get nice info from this.
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    If you want to go deeper, like object persistence and all, just refer this document.
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    Regards,
    SP.

  • Passing a method to a method

    Hi all, is it possible for me to pass a method to a method? Or to somehow store a method as a variable or an object or in something? I'm sorry if I sound vague, I am kind of confusing myself with this question. I basically want a method to take a method to use in its method, but the method could be one of three methods.

    I agree, reflection should be a last resort. An
    interface would not be useful if you don't know what
    method you want to invoke at compile time. Interfaces
    are useful when you know the method you want to
    invoke, but not the class.That's not true. This is a really lame-ass example but it shows the point.
    public interface RuntimeMethod
       public void method();
    class AClass {
       public static void main(Sting[] args)
          new AClass.handleAtRuntime(
             Factory.getRuntimeMethod(Integer.parse(args[0])));
       public void handleAtRuntime(RuntimeMethod runtime)
          runtime.method();
    class Factory
       public static getRuntimeMethod(int method)
          switch(method)
             case 0: return new RuntimeMethod
                public void method()
                   methodA();
             case 2: return new RuntimeMethod
                public void method()
                   methodB();
             default:
                throw new IllegalArgumentException("bad input");
    }

  • Display which method called the method (gives you a headache doesn't it)

    Hi,
    This question might sound a little weird, so maybe read it twice:
    I would like to see which method called the method.
    public void test1()
       test2();
    public void test2()
       System.out.println(....);
    The program output should be, test1 or classname.test1 or something like that. Is that possible?
    Thanx in advance, Yvo van Beek

    This should give you an idea:   public static void main (String args[]) {
          wereAreWe();
          caller2();
        public static void wereAreWe() {
          try {
            throw new RuntimeException("here we are");
          catch (Exception ex) {
            System.out.println("");       
            ex.printStackTrace(System.out);
        public static void caller1() {
          wereAreWe();
        public static void caller2() {
          caller1();
        }You can parse the result of printStackTrace() to get a more precise output.

  • Cant call simple method from main method

    hi guys, this maybe a stupid question, im a newbie to java programming. Im trying to call the method calculateArea in main method and its not working.
    Any ideas?
    Thanks.
    package project1;
    public class makePurchase {
        public int calculateArea(int width, int height){
                int myArea = width * height;
                return myArea;
        public static void main(String[] args){
            int vTestResult = calculateArea(1,3);
            System.out.println("The total is:" +vTestResult);
    }

    jverd wrote:
    mishmash wrote:
    Is there a easy way of determining if the method should be static? maybe only if your using a math class and not using the method in any other class?Static means associated with the class as a whole, not with any particular instance. If your method doesn't use or set any state that is part of individual instances, it may be a candidate to be static. Another difference is that static methods cannot be overridden. That is, you can't defer until runtime which class' implementation of a static method to call.
    public class Person {
    private static int numPersonsCreated;
    private String name;
    private Date birthdate;
    public int calculateAgeInYears () {
    // use birthdate to calculate age
    public static int getNumPersonsCreated() {
    return numPersonsCreated;
    }Here, the calc method cannot be static, since it uses the birthdate field that is particular to each Person object created. The number of Person objects created by your program, however, is not associated with any particular Person object, but with the Person class as a whole, so it can be static.Perhaps to expand a bit more...
    Highly reusable methods are candidates for static such as utility methods that may be used multiple times.This is true if this methods API remains consistent and does not care a bout the surrounding class. Usually such a method would require all its fields to be provided by parameters or as static members as any instance variables would not make this methods reusable.
    in jverd's example you can see that many related classes may be interested in finding out how many people have been created and they may wish to know so at the same time. It certainly makes sense to provide such a method as static as it does not change and most likely never will. More importantly all interested classes now are assured of seeing the exact same method because that is what static is: It exposes the same to all interested parties.
    Edited by: Yucca on Oct 19, 2009 6:35 AM

  • How do I access array elements in one method from another method?

    Hi all!
    How do I access the array's elements from another method so that method 2 can have access to method 1's array elements? Thanks for any help!
    I am trying to create a simply program that will use a method to create an array and a SEPARATE method that will sort the array's elements (without using java's built in array features). I can create the program by simply having one method and sorting the array within that same method, BUT I want to sort the array from another method.
    Here's my code so far:
    public class ArraySort {
       public static void createArray(int size){
           double myArray[] = new double[size];    //create my new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);   //fill the array with random numbers
       public static void sortArray(){
           // I WANT THIS METHOD TO ACCESS THE ARRAY ELEMENTS IN THE METHOD ABOVE, BUT DON'T KNOW
          //  HOW???? Please help!
        public static void main(String[] args) {
            createArray(4);    //call to create the array
    }Thanks again!
    - Johnny

    Thanks for the help all! I ve managed to get the program working, using java's built in array sort, but when i try to call on the array sort method from WITHIN my main method, nothing happens!
    Can somebody please tell me why I am not able to call on the sort method from within my main class???? Thanks!
    public class ArraySort {
       public void createArray(double[] arrayName, int size){
           double myArray[] = new double[size];  //create new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);    //populate array with
           }                                                 //random Numbers
           sortArray(myArray); 
       } //Sort array(if I delete this & try to use it in Main method --> doesn't work???
       public void sortArray(double[] arrayName){
           DecimalFormat time = new DecimalFormat("0.00");
           Arrays.sort(arrayName);      //sort array using Java's built in array method
           for(int i = 0; i <arrayName.length; i++)
               System.out.println(time.format(arrayName)); //print arary elements
    public static void main(String[] args) {
    ArraySort newArray = new ArraySort(); //create a new instance
    double myArray[] = new double[0]; //create a new double array
    newArray.createArray(myArray,4); //build the array of indicated size
    //newArray.sortArray(myArray); //This will not work???? WHY?????//

  • How to add more methods to class methods

    Hello all
    I don?t know how exactly explain my problem but I will try .
    I have base class that has some methods that I use on the jsp page.
    my base class looks like this :
    class base {
             public static String getName(){
                 String myName =  new String("miki");
                 return myName;
             public static int  getAge(){
                 int myAge =  new Int(30);
                 return myAge;
    }now I will like this methods to have more methods for example toBoolean()
    so if I will do :
    <%
    base.getAge().toBoolean();
    or
    base.getAge().toBoolean();
    %>
    it will return me true or false if age is less then 0 so false
    and if the name string len is 0 also flase
    and other wise true ;
    how can I implement this functions on my methods?
    hope I made my self clear
    thanks

    Think about what is actually happening with those strung calls. Using your example, what would toBoolean() be being called on. It is not being called on base, and you cannot call a method on a method, so it is not being called on getAge(). What it is being called on, is what is returned by getAge(). The only way to string calls in this manner, is when the object returned by the previous method, contains the next method. Since getAge() returns an int, you can't string anything onto it. You would have to modify getAge to return an object that you created, which, of course, would also mean to modify anything that has used getAge() up to this point to expect your new object and use it, rather than an int.

  • Adding an updateProduct method which this method should call

    i would like to add an updateProduct method which this method should call the updateProduct method of the ProductDAO object to update the product.
    import java.util.Scanner;
    public class ProductMaintApp
    // declare two class variables
    private static ProductDAO productDAO = null;
    private static Scanner sc = null;
    public static void main(String args[])
    System.out.println("Welcome to the Product Maintenance application modified by Royce\n");
    // set the class variables
    productDAO = DAOFactory.getProductDAO();
    sc = new Scanner(System.in);
    // display the command menu
    displayMenu();
    // perform 1 or more actions
    String action = "";
    while (!action.equalsIgnoreCase("exit"))
    // get the input from the user
    action = Validator.getString(sc,
    "Enter a command: ");
    System.out.println();
    if (action.equalsIgnoreCase("list"))
    displayAllProducts();
    else if (action.equalsIgnoreCase("add"))
    addProduct();
    else if (action.equalsIgnoreCase("update"))
         updateProduct();
    else if (action.equalsIgnoreCase("del") ||
    action.equalsIgnoreCase("delete"))
    deleteProduct();
    else if (action.equalsIgnoreCase("help") ||
    action.equalsIgnoreCase("menu"))
    displayMenu();
    else if (action.equalsIgnoreCase("exit"))
    System.out.println("Bye.\n");
    else
    System.out.println("Error! Not a valid command.\n");
         public static void displayMenu()
    System.out.println("COMMAND MENU");
    System.out.println("list - List all products");
    System.out.println("add - Add a product");
    System.out.println("update - Update a product");
    System.out.println("del - Delete a product");
    System.out.println("help - Show this menu");
    System.out.println("exit - Exit this application\n");
    public static void displayAllProducts()
    System.out.println("PRODUCT LIST");
    System.out.println(productDAO.getProductsString());
    public static void addProduct()
    String code = Validator.getString(
    sc, "Enter product code: ");
    String description = Validator.getLine(
    sc, "Enter product description: ");
    double price = Validator.getDouble(
    sc, "Enter price: ");
    Product product = new Product();
    product.setCode(code);
    product.setDescription(description);
    product.setPrice(price);
    productDAO.addProduct(product);
    System.out.println();
    System.out.println(description
    + " has been added.\n");
    public static void deleteProduct()
    String code = Validator.getString(sc,
    "Enter product code to delete: ");
    Product p = productDAO.getProduct(code);
    System.out.println();
    if (p != null)
    productDAO.deleteProduct(p);
    System.out.println(p.getDescription()
    + " has been deleted.\n");
    else
    System.out.println("No product matches that product code.\n");

    i would like to add an updateProduct method which this method should call the updateProduct method of the ProductDAO object to update the product. Permission granted.

  • Helper method / method calling a method?

    How can a method call a method, i.e. what does it look like? I'm trying to write two seperate helper methods to do two seperate calculations. Each is a private void method and one calls the other. However, when I try it the compiler tells me it can't recognize the called method. What am I missing?

    I guess you didn't understand the code that the previous poster posted. To me it seems to be exactly what you want to do. Here is the same post with a few comments:
    public class method_use {
    private void met01()   // this is the 1st method which is private
    System.out.println("Met01");  // this is just an example of what you can do in the 1st method
    // you put your 1st calculation code here
    met02();   // here is the call to the 2nd method which is also private
    private void met02()  // this is the 2nd method which is called from the 1st method met01
    System.out.println("Met02");   // this is just an example of what you can do in the 2nd method
    // you put your 2nd calculation code here
    public static void main(String[] args)
    method_use obj = new method_use();
    obj.met01();
    }Now, if you want to call a method in another class then that method (in the other class) must be declared public.

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • Data is not refelct by Set_data method in post method of ME_PROCESS_PO_CUST

    Hi OO gurus,
    I'm calling Set_data method to set line item data of PO in POST method in ZME_PROCESS_PO_CUST.
    But data is not updating.
    Can any body give logic how to call set data method in POST method?
    Thanks in advance.
    Edited by: v bheem on Jan 27, 2010 12:51 PM

    Hi,
    Do like the below code...
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
    DATA: re_data TYPE mepoitem.
    DATA: RE_HEADER TYPE MEPOHEADER.
    DATA: L_HEADER TYPE REF TO IF_PURCHASE_ORDER_MM.
    DATA: L_HEADDATA TYPE MEPOHEADER.
    CALL METHOD im_item->get_data
    RECEIVING
    RE_DATA = RE_DATA.
    L_HEADER = im_item->get_header( ).
    L_HEADDATA = L_HEADER->GET_DATA( ).
    next modify feilds  which you want to update of re_data and set values...
    CALL METHOD im_item->set_data
    EXPORTING
    IM_DATA = RE_DATA.
    Thanks,
    Shailaja Ainala.

  • How to pass a internal table used in one method to another method in a view

    hi all,
    Is it possible to pass a internal table from one method to another method in a view??
    If so , kindly help me.

    Hi Bala,
    If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
    However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
    Regards,
    Uday

Maybe you are looking for

  • "Export to CSV" option is not working.

    Hi, When I am trying to use "Export to CSV" option for "Item Price Deviation" report. The issue happened, when we lock filter on "Spend by Category" report and then opened Item Price Deviation report. Then I selected More Actions --> "Export to CSV".

  • Multiple windows open in itunes 11

    I modify playlists frequently, these playlists are used later, I do not make them up 'un the fly' as it were. My preferred method of doing this was to open a window containing the playlist I was editing as it showed information I needed like year of

  • U-Verse VOIP into house wiring: "Line-in-Use"

    All,       ATT converted our DSL to U-Verse high-speed Internet + VOIP 5 months ago. This included VOIP connection to original phone-wiring in the house (built in 1989), supporting 3 extensions.  All worked fine until last week, when all extensions s

  • Coherence | Indexing a Collection based attribute isn't working as expected

    I have an Employee object private String employeeId private List<String> subjects; I push the following data to a Coherence 3.7.1 instance      employeeId=100      subjects = {"maths", "english", "physics"}      employeeId=101      subjects = {"biolo

  • RME Fireface 800 iMac G5

    I recently purchased an RME FF 800 to use with my home recording projects. I use it to mainly record myself playing guitar with added loops in logic pro. The Total MIx to me is hard to undrstand. I was also told recently to disable software monitorin